DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (002cae39b87d)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
  $ . $TESTDIR/hgext/overlay/tests/helpers.sh

  $ hg init source
  $ cd source
  $ mkdir dir0
  $ echo dir0/file0 > dir0/file0
  $ echo dir0/file1 > dir0/file1
  $ hg -q commit -A -m 'add dir0/file0 and dir0/file1'
  $ mkdir dir1
  $ echo dir1/file0 > dir1/file0
  $ hg -q commit -A -m 'add dir1/file0' -u 'Another User <another@example.com>'
  $ hg serve -d --pid-file hg.pid -p $HGPORT
  $ cat hg.pid >> $DAEMON_PIDS

  $ cd ..

  $ hg init dest
  $ cd dest
  $ echo foo > foo
  $ hg -q commit -A -m initial
  $ hg -q up null

  $ hg overlay http://localhost:$HGPORT --into subdir 'user("another@example.com")'
  pulling http://localhost:$HGPORT into $TESTTMP/dest/.hg/localhost~3a* (glob)
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 2 changesets with 3 changes to 3 files
  new changesets 44791c369f4c:3b2a19679264 (?)
  3b2a19679264 -> e9b986f72c98: add dir1/file0

  $ hg log -p --debug
  changeset:   1:e9b986f72c9857034d84cef7f1348a93afcb1c4e
  tag:         tip
  phase:       draft
  parent:      0:21e2edf037c2267b7c1d7a038d64bca58d5caa59
  parent:      -1:0000000000000000000000000000000000000000
  manifest:    1:177de7a23eaa5f26e7c8e97f0c6be3a07dbc3e6e
  user:        Another User <another@example.com>
  date:        Thu Jan 01 00:00:00 1970 +0000
  files+:      subdir/dir1/file0
  extra:       branch=default
  extra:       subtree_revision=3b2a1967926470d5fbfdcdadca4ef639e2bbee94
  extra:       subtree_source=https://example.com/repo
  description:
  add dir1/file0
  
  
  diff --git a/subdir/dir1/file0 b/subdir/dir1/file0
  new file mode 100644
  --- /dev/null
  +++ b/subdir/dir1/file0
  @@ -0,0 +1,1 @@
  +dir1/file0
  
  changeset:   0:21e2edf037c2267b7c1d7a038d64bca58d5caa59
  phase:       draft
  parent:      -1:0000000000000000000000000000000000000000
  parent:      -1:0000000000000000000000000000000000000000
  manifest:    0:9091aa5df980aea60860a2e39c95182e68d1ddec
  user:        Test User <someone@example.com>
  date:        Thu Jan 01 00:00:00 1970 +0000
  files+:      foo
  extra:       branch=default
  description:
  initial
  
  
  diff --git a/foo b/foo
  new file mode 100644
  --- /dev/null
  +++ b/foo
  @@ -0,0 +1,1 @@
  +foo
  
  $ hg files -r tip
  foo
  subdir/dir1/file0