| 1 |
#testcases flat tree |
| 2 |
|
| 3 |
$ . "$TESTDIR/narrow-library.sh" |
| 4 |
|
| 5 |
#if tree |
| 6 |
$ cat << EOF >> $HGRCPATH |
| 7 |
> [experimental] |
| 8 |
> treemanifest = 1 |
| 9 |
> EOF |
| 10 |
#endif |
| 11 |
|
| 12 |
create full repo |
| 13 |
|
| 14 |
$ hg init master |
| 15 |
$ cd master |
| 16 |
|
| 17 |
$ mkdir inside |
| 18 |
$ echo inside > inside/f1 |
| 19 |
$ mkdir outside |
| 20 |
$ echo outside > outside/f1 |
| 21 |
$ hg ci -Aqm 'initial' |
| 22 |
|
| 23 |
$ echo modified > inside/f1 |
| 24 |
$ hg ci -qm 'modify inside' |
| 25 |
|
| 26 |
$ echo modified > outside/f1 |
| 27 |
$ hg ci -qm 'modify outside' |
| 28 |
|
| 29 |
$ cd .. |
| 30 |
|
| 31 |
$ hg clone --narrow ssh://user@dummy/master narrow --include inside |
| 32 |
requesting all changes |
| 33 |
adding changesets |
| 34 |
adding manifests |
| 35 |
adding file changes |
| 36 |
added 3 changesets with 2 changes to 1 files |
| 37 |
new changesets *:* (glob) |
| 38 |
updating to branch default |
| 39 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 40 |
$ cd narrow |
| 41 |
|
| 42 |
Can show patch touching paths outside |
| 43 |
|
| 44 |
$ hg log -p |
| 45 |
changeset: 2:* (glob) |
| 46 |
tag: tip |
| 47 |
user: test |
| 48 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 49 |
summary: modify outside |
| 50 |
|
| 51 |
|
| 52 |
changeset: 1:* (glob) |
| 53 |
user: test |
| 54 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 55 |
summary: modify inside |
| 56 |
|
| 57 |
diff -r * -r * inside/f1 (glob) |
| 58 |
--- a/inside/f1 Thu Jan 01 00:00:00 1970 +0000 |
| 59 |
+++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000 |
| 60 |
@@ -1,1 +1,1 @@ |
| 61 |
-inside |
| 62 |
+modified |
| 63 |
|
| 64 |
changeset: 0:* (glob) |
| 65 |
user: test |
| 66 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 67 |
summary: initial |
| 68 |
|
| 69 |
diff -r 000000000000 -r * inside/f1 (glob) |
| 70 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 71 |
+++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000 |
| 72 |
@@ -0,0 +1,1 @@ |
| 73 |
+inside |
| 74 |
|
| 75 |
|
| 76 |
$ hg status --rev 1 --rev 2 |
| 77 |
|
| 78 |
Can show copies inside the narrow clone |
| 79 |
|
| 80 |
$ hg cp inside/f1 inside/f2 |
| 81 |
$ hg diff --git |
| 82 |
diff --git a/inside/f1 b/inside/f2 |
| 83 |
copy from inside/f1 |
| 84 |
copy to inside/f2 |