##// END OF EJS Templates
tests: fold narrow treemanifest tests into main test file using testcases...
Augie Fackler -
r36101:dc014846 default
parent child Browse files
Show More
@@ -1,79 +1,89 b''
1 #testcases flat tree
2
1 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
2
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
3 create full repo
12 create full repo
4
13
5 $ hg init master
14 $ hg init master
6 $ cd master
15 $ cd master
7
16
8 $ mkdir inside
17 $ mkdir inside
9 $ echo inside > inside/f1
18 $ echo inside > inside/f1
10 $ mkdir outside
19 $ mkdir outside
11 $ echo outside > outside/f1
20 $ echo outside > outside/f1
12 $ hg ci -Aqm 'initial'
21 $ hg ci -Aqm 'initial'
13
22
14 $ echo modified > inside/f1
23 $ echo modified > inside/f1
15 $ hg ci -qm 'modify inside'
24 $ hg ci -qm 'modify inside'
16
25
17 $ echo modified > outside/f1
26 $ echo modified > outside/f1
18 $ hg ci -qm 'modify outside'
27 $ hg ci -qm 'modify outside'
19
28
20 $ cd ..
29 $ cd ..
21
30
22 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
31 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
23 requesting all changes
32 requesting all changes
24 adding changesets
33 adding changesets
25 adding manifests
34 adding manifests
26 adding file changes
35 adding file changes
27 added 3 changesets with 2 changes to 1 files
36 added 3 changesets with 2 changes to 1 files
28 new changesets *:* (glob)
37 new changesets *:* (glob)
29 updating to branch default
38 updating to branch default
30 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 $ cd narrow
40 $ cd narrow
32
41
33 $ hg update -q 0
42 $ hg update -q 0
34
43
35 Can not modify dirstate outside
44 Can not modify dirstate outside
36
45
37 $ mkdir outside
46 $ mkdir outside
38 $ touch outside/f1
47 $ touch outside/f1
39 $ hg debugwalk -I 'relglob:f1'
48 $ hg debugwalk -I 'relglob:f1'
40 matcher: <includematcher includes='(?:(?:|.*/)f1(?:/|$))'>
49 matcher: <includematcher includes='(?:(?:|.*/)f1(?:/|$))'>
41 f inside/f1 inside/f1
50 f inside/f1 inside/f1
42 $ hg add outside/f1
51 $ hg add outside/f1
43 abort: cannot track 'outside/f1' - it is outside the narrow clone
52 abort: cannot track 'outside/f1' - it is outside the narrow clone
44 [255]
53 [255]
45 $ touch outside/f3
54 $ touch outside/f3
46 $ hg add outside/f3
55 $ hg add outside/f3
47 abort: cannot track 'outside/f3' - it is outside the narrow clone
56 abort: cannot track 'outside/f3' - it is outside the narrow clone
48 [255]
57 [255]
49 $ rm -r outside
58 $ rm -r outside
50
59
51 Can modify dirstate inside
60 Can modify dirstate inside
52
61
53 $ echo modified > inside/f1
62 $ echo modified > inside/f1
54 $ touch inside/f3
63 $ touch inside/f3
55 $ hg add inside/f3
64 $ hg add inside/f3
56 $ hg status
65 $ hg status
57 M inside/f1
66 M inside/f1
58 A inside/f3
67 A inside/f3
59 $ hg revert -qC .
68 $ hg revert -qC .
60 $ rm inside/f3
69 $ rm inside/f3
61
70
62 Can commit changes inside. Leaves outside unchanged.
71 Can commit changes inside. Leaves outside unchanged.
63
72
64 $ hg update -q 'desc("initial")'
73 $ hg update -q 'desc("initial")'
65 $ echo modified2 > inside/f1
74 $ echo modified2 > inside/f1
66 $ hg commit -m 'modify inside/f1'
75 $ hg commit -m 'modify inside/f1'
67 created new head
76 created new head
68 $ hg files -r .
77 $ hg files -r .
69 inside/f1
78 inside/f1
70 outside/f1
79 outside/f1 (flat !)
80 outside/ (tree !)
71 Some filesystems (notably FAT/exFAT only store timestamps with 2
81 Some filesystems (notably FAT/exFAT only store timestamps with 2
72 seconds of precision, so by sleeping for 3 seconds, we can ensure that
82 seconds of precision, so by sleeping for 3 seconds, we can ensure that
73 the timestamps of files stored by dirstate will appear older than the
83 the timestamps of files stored by dirstate will appear older than the
74 dirstate file, and therefore we'll be able to get stable output from
84 dirstate file, and therefore we'll be able to get stable output from
75 debugdirstate. If we don't do this, the test can be slightly flaky.
85 debugdirstate. If we don't do this, the test can be slightly flaky.
76 $ sleep 3
86 $ sleep 3
77 $ hg status
87 $ hg status
78 $ hg debugdirstate --nodates
88 $ hg debugdirstate --nodates
79 n 644 10 set inside/f1
89 n 644 10 set inside/f1
@@ -1,94 +1,104 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
7 $ cd master
15 $ cd master
8 $ cat >> .hg/hgrc <<EOF
16 $ cat >> .hg/hgrc <<EOF
9 > [narrow]
17 > [narrow]
10 > serveellipses=True
18 > serveellipses=True
11 > EOF
19 > EOF
12
20
13 $ mkdir inside
21 $ mkdir inside
14 $ echo inside1 > inside/f1
22 $ echo inside1 > inside/f1
15 $ echo inside2 > inside/f2
23 $ echo inside2 > inside/f2
16 $ mkdir outside
24 $ mkdir outside
17 $ echo outside1 > outside/f1
25 $ echo outside1 > outside/f1
18 $ echo outside2 > outside/f2
26 $ echo outside2 > outside/f2
19 $ hg ci -Aqm 'initial'
27 $ hg ci -Aqm 'initial'
20
28
21 $ echo modified > inside/f1
29 $ echo modified > inside/f1
22 $ hg ci -qm 'modify inside/f1'
30 $ hg ci -qm 'modify inside/f1'
23
31
24 $ hg update -q 0
32 $ hg update -q 0
25 $ echo modified > inside/f2
33 $ echo modified > inside/f2
26 $ hg ci -qm 'modify inside/f2'
34 $ hg ci -qm 'modify inside/f2'
27
35
28 $ hg update -q 0
36 $ hg update -q 0
29 $ echo modified2 > inside/f1
37 $ echo modified2 > inside/f1
30 $ hg ci -qm 'conflicting inside/f1'
38 $ hg ci -qm 'conflicting inside/f1'
31
39
32 $ hg update -q 0
40 $ hg update -q 0
33 $ echo modified > outside/f1
41 $ echo modified > outside/f1
34 $ hg ci -qm 'modify outside/f1'
42 $ hg ci -qm 'modify outside/f1'
35
43
36 $ hg update -q 0
44 $ hg update -q 0
37 $ echo modified2 > outside/f1
45 $ echo modified2 > outside/f1
38 $ hg ci -qm 'conflicting outside/f1'
46 $ hg ci -qm 'conflicting outside/f1'
39
47
40 $ cd ..
48 $ cd ..
41
49
42 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
50 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
43 requesting all changes
51 requesting all changes
44 adding changesets
52 adding changesets
45 adding manifests
53 adding manifests
46 adding file changes
54 adding file changes
47 added 6 changesets with 5 changes to 2 files (+4 heads)
55 added 6 changesets with 5 changes to 2 files (+4 heads)
48 new changesets *:* (glob)
56 new changesets *:* (glob)
49 updating to branch default
57 updating to branch default
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 $ cd narrow
59 $ cd narrow
52
60
53 $ hg update -q 0
61 $ hg update -q 0
54
62
55 Can merge in when no files outside narrow spec are involved
63 Can merge in when no files outside narrow spec are involved
56
64
57 $ hg update -q 'desc("modify inside/f1")'
65 $ hg update -q 'desc("modify inside/f1")'
58 $ hg merge 'desc("modify inside/f2")'
66 $ hg merge 'desc("modify inside/f2")'
59 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 (branch merge, don't forget to commit)
68 (branch merge, don't forget to commit)
61 $ hg commit -m 'merge inside changes'
69 $ hg commit -m 'merge inside changes'
62
70
63 Can merge conflicting changes inside narrow spec
71 Can merge conflicting changes inside narrow spec
64
72
65 $ hg update -q 'desc("modify inside/f1")'
73 $ hg update -q 'desc("modify inside/f1")'
66 $ hg merge 'desc("conflicting inside/f1")' 2>&1 | egrep -v '(warning:|incomplete!)'
74 $ hg merge 'desc("conflicting inside/f1")' 2>&1 | egrep -v '(warning:|incomplete!)'
67 merging inside/f1
75 merging inside/f1
68 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
76 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
69 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
77 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
70 $ echo modified3 > inside/f1
78 $ echo modified3 > inside/f1
71 $ hg resolve -m
79 $ hg resolve -m
72 (no more unresolved files)
80 (no more unresolved files)
73 $ hg commit -m 'merge inside/f1'
81 $ hg commit -m 'merge inside/f1'
74
82
75 TODO: Can merge non-conflicting changes outside narrow spec
83 TODO: Can merge non-conflicting changes outside narrow spec
76
84
77 $ hg update -q 'desc("modify inside/f1")'
85 $ hg update -q 'desc("modify inside/f1")'
78 $ hg merge 'desc("modify outside/f1")'
86 $ hg merge 'desc("modify outside/f1")'
79 abort: merge affects file 'outside/f1' outside narrow, which is not yet supported
87 abort: merge affects file 'outside/f1' outside narrow, which is not yet supported (flat !)
88 abort: merge affects file 'outside/' outside narrow, which is not yet supported (tree !)
80 (merging in the other direction may work)
89 (merging in the other direction may work)
81 [255]
90 [255]
82
91
83 $ hg update -q 'desc("modify outside/f1")'
92 $ hg update -q 'desc("modify outside/f1")'
84 $ hg merge 'desc("modify inside/f1")'
93 $ hg merge 'desc("modify inside/f1")'
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 (branch merge, don't forget to commit)
95 (branch merge, don't forget to commit)
87 $ hg ci -m 'merge from inside to outside'
96 $ hg ci -m 'merge from inside to outside'
88
97
89 Refuses merge of conflicting outside changes
98 Refuses merge of conflicting outside changes
90
99
91 $ hg update -q 'desc("modify outside/f1")'
100 $ hg update -q 'desc("modify outside/f1")'
92 $ hg merge 'desc("conflicting outside/f1")'
101 $ hg merge 'desc("conflicting outside/f1")'
93 abort: conflict in file 'outside/f1' is outside narrow clone
102 abort: conflict in file 'outside/f1' is outside narrow clone (flat !)
103 abort: conflict in file 'outside/' is outside narrow clone (tree !)
94 [255]
104 [255]
@@ -1,76 +1,84 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
7 $ cd master
15 $ cd master
8
16
9 $ mkdir inside
17 $ mkdir inside
10 $ echo inside > inside/f1
18 $ echo inside > inside/f1
11 $ mkdir outside
19 $ mkdir outside
12 $ echo outside > outside/f1
20 $ echo outside > outside/f1
13 $ hg ci -Aqm 'initial'
21 $ hg ci -Aqm 'initial'
14
22
15 $ echo modified > inside/f1
23 $ echo modified > inside/f1
16 $ hg ci -qm 'modify inside'
24 $ hg ci -qm 'modify inside'
17
25
18 $ echo modified > outside/f1
26 $ echo modified > outside/f1
19 $ hg ci -qm 'modify outside'
27 $ hg ci -qm 'modify outside'
20
28
21 $ cd ..
29 $ cd ..
22
30
23 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
31 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
24 requesting all changes
32 requesting all changes
25 adding changesets
33 adding changesets
26 adding manifests
34 adding manifests
27 adding file changes
35 adding file changes
28 added 3 changesets with 2 changes to 1 files
36 added 3 changesets with 2 changes to 1 files
29 new changesets *:* (glob)
37 new changesets *:* (glob)
30 updating to branch default
38 updating to branch default
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ cd narrow
40 $ cd narrow
33
41
34 Can show patch touching paths outside
42 Can show patch touching paths outside
35
43
36 $ hg log -p
44 $ hg log -p
37 changeset: 2:* (glob)
45 changeset: 2:* (glob)
38 tag: tip
46 tag: tip
39 user: test
47 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000
48 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: modify outside
49 summary: modify outside
42
50
43
51
44 changeset: 1:* (glob)
52 changeset: 1:* (glob)
45 user: test
53 user: test
46 date: Thu Jan 01 00:00:00 1970 +0000
54 date: Thu Jan 01 00:00:00 1970 +0000
47 summary: modify inside
55 summary: modify inside
48
56
49 diff -r * -r * inside/f1 (glob)
57 diff -r * -r * inside/f1 (glob)
50 --- a/inside/f1 Thu Jan 01 00:00:00 1970 +0000
58 --- a/inside/f1 Thu Jan 01 00:00:00 1970 +0000
51 +++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000
59 +++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000
52 @@ -1,1 +1,1 @@
60 @@ -1,1 +1,1 @@
53 -inside
61 -inside
54 +modified
62 +modified
55
63
56 changeset: 0:* (glob)
64 changeset: 0:* (glob)
57 user: test
65 user: test
58 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
59 summary: initial
67 summary: initial
60
68
61 diff -r 000000000000 -r * inside/f1 (glob)
69 diff -r 000000000000 -r * inside/f1 (glob)
62 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
63 +++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000
71 +++ b/inside/f1 Thu Jan 01 00:00:00 1970 +0000
64 @@ -0,0 +1,1 @@
72 @@ -0,0 +1,1 @@
65 +inside
73 +inside
66
74
67
75
68 $ hg status --rev 1 --rev 2
76 $ hg status --rev 1 --rev 2
69
77
70 Can show copies inside the narrow clone
78 Can show copies inside the narrow clone
71
79
72 $ hg cp inside/f1 inside/f2
80 $ hg cp inside/f1 inside/f2
73 $ hg diff --git
81 $ hg diff --git
74 diff --git a/inside/f1 b/inside/f2
82 diff --git a/inside/f1 b/inside/f2
75 copy from inside/f1
83 copy from inside/f1
76 copy to inside/f2
84 copy to inside/f2
@@ -1,148 +1,163 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
7 $ cd master
15 $ cd master
8 $ cat >> .hg/hgrc <<EOF
16 $ cat >> .hg/hgrc <<EOF
9 > [narrow]
17 > [narrow]
10 > serveellipses=True
18 > serveellipses=True
11 > EOF
19 > EOF
12
20
13 $ mkdir inside
21 $ mkdir inside
14 $ echo inside > inside/f1
22 $ echo inside > inside/f1
15 $ mkdir outside
23 $ mkdir outside
16 $ echo outside > outside/f1
24 $ echo outside > outside/f1
17 $ hg ci -Aqm 'initial'
25 $ hg ci -Aqm 'initial'
18
26
19 $ echo modified > inside/f1
27 $ echo modified > inside/f1
20 $ hg ci -qm 'modify inside'
28 $ hg ci -qm 'modify inside'
21
29
22 $ hg co -q 0
30 $ hg co -q 0
23 $ echo modified > outside/f1
31 $ echo modified > outside/f1
24 $ hg ci -qm 'modify outside'
32 $ hg ci -qm 'modify outside'
25
33
26 $ echo modified again >> outside/f1
34 $ echo modified again >> outside/f1
27 $ hg ci -qm 'modify outside again'
35 $ hg ci -qm 'modify outside again'
28
36
29 $ cd ..
37 $ cd ..
30
38
31 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
39 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
32 requesting all changes
40 requesting all changes
33 adding changesets
41 adding changesets
34 adding manifests
42 adding manifests
35 adding file changes
43 adding file changes
36 added 3 changesets with 2 changes to 1 files (+1 heads)
44 added 3 changesets with 2 changes to 1 files (+1 heads)
37 new changesets *:* (glob)
45 new changesets *:* (glob)
38 updating to branch default
46 updating to branch default
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 $ cd narrow
48 $ cd narrow
41 $ cat >> $HGRCPATH <<EOF
49 $ cat >> $HGRCPATH <<EOF
42 > [extensions]
50 > [extensions]
43 > strip=
51 > strip=
44 > EOF
52 > EOF
45
53
46 Can strip and recover changesets affecting only files within narrow spec
54 Can strip and recover changesets affecting only files within narrow spec
47
55
48 $ hg co -r 'desc("modify inside")'
56 $ hg co -r 'desc("modify inside")'
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
58 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
51 $ hg strip .
59 $ hg strip .
52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
61 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
54 $ hg unbundle .hg/strip-backup/*-backup.hg
62 $ hg unbundle .hg/strip-backup/*-backup.hg
55 adding changesets
63 adding changesets
56 adding manifests
64 adding manifests
57 adding file changes
65 adding file changes
58 added 1 changesets with 1 changes to 1 files (+1 heads)
66 added 1 changesets with 1 changes to 1 files (+1 heads)
59 new changesets * (glob)
67 new changesets * (glob)
60 (run 'hg heads' to see heads, 'hg merge' to merge)
68 (run 'hg heads' to see heads, 'hg merge' to merge)
61
69
62 Can strip and recover changesets affecting files outside of narrow spec
70 Can strip and recover changesets affecting files outside of narrow spec
63
71
64 $ hg co -r 'desc("modify outside")'
72 $ hg co -r 'desc("modify outside")'
65 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 $ hg log -G -T '{rev} {desc}\n'
74 $ hg log -G -T '{rev} {desc}\n'
67 o 2 modify inside
75 o 2 modify inside
68 |
76 |
69 | @ 1 modify outside again
77 | @ 1 modify outside again
70 |/
78 |/
71 o 0 initial
79 o 0 initial
72
80
73 $ hg debugdata -m 1
81 $ hg debugdata -m 1
74 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc)
82 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
75 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc)
83 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
84 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
85 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
76
86
77 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
87 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
78 $ hg strip .
88 $ hg strip .
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
90 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
81 $ hg unbundle .hg/strip-backup/*-backup.hg
91 $ hg unbundle .hg/strip-backup/*-backup.hg
82 adding changesets
92 adding changesets
83 adding manifests
93 adding manifests
84 adding file changes
94 adding file changes
85 added 1 changesets with 0 changes to 0 files (+1 heads)
95 added 1 changesets with 0 changes to 0 files (+1 heads)
86 new changesets * (glob)
96 new changesets * (glob)
87 (run 'hg heads' to see heads, 'hg merge' to merge)
97 (run 'hg heads' to see heads, 'hg merge' to merge)
88 $ hg log -G -T '{rev} {desc}\n'
98 $ hg log -G -T '{rev} {desc}\n'
89 o 2 modify outside again
99 o 2 modify outside again
90 |
100 |
91 | o 1 modify inside
101 | o 1 modify inside
92 |/
102 |/
93 @ 0 initial
103 @ 0 initial
94
104
95 Check that hash of file outside narrow spec got restored
105 Check that hash of file outside narrow spec got restored
96 $ hg debugdata -m 2
106 $ hg debugdata -m 2
97 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc)
107 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
98 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc)
108 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
109 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
110 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
99
111
100 Also verify we can apply the bundle with 'hg pull':
112 Also verify we can apply the bundle with 'hg pull':
101 $ hg co -r 'desc("modify inside")'
113 $ hg co -r 'desc("modify inside")'
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 $ rm .hg/strip-backup/*-backup.hg
115 $ rm .hg/strip-backup/*-backup.hg
104 $ hg strip .
116 $ hg strip .
105 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
106 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
118 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
107 $ hg pull .hg/strip-backup/*-backup.hg
119 $ hg pull .hg/strip-backup/*-backup.hg
108 pulling from .hg/strip-backup/*-backup.hg (glob)
120 pulling from .hg/strip-backup/*-backup.hg (glob)
109 searching for changes
121 searching for changes
110 adding changesets
122 adding changesets
111 adding manifests
123 adding manifests
112 adding file changes
124 adding file changes
113 added 1 changesets with 1 changes to 1 files (+1 heads)
125 added 1 changesets with 1 changes to 1 files (+1 heads)
114 new changesets * (glob)
126 new changesets * (glob)
115 (run 'hg heads' to see heads, 'hg merge' to merge)
127 (run 'hg heads' to see heads, 'hg merge' to merge)
116
128
117 $ rm .hg/strip-backup/*-backup.hg
129 $ rm .hg/strip-backup/*-backup.hg
118 $ hg strip 0
130 $ hg strip 0
119 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
120 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
132 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
121 $ hg incoming .hg/strip-backup/*-backup.hg
133 $ hg incoming .hg/strip-backup/*-backup.hg
122 comparing with .hg/strip-backup/*-backup.hg (glob)
134 comparing with .hg/strip-backup/*-backup.hg (glob)
123 changeset: 0:* (glob)
135 changeset: 0:* (glob)
124 user: test
136 user: test
125 date: Thu Jan 01 00:00:00 1970 +0000
137 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: initial
138 summary: initial
127
139
128 changeset: 1:9e48d953700d
140 changeset: 1:9e48d953700d (flat !)
141 changeset: 1:3888164bccf0 (tree !)
129 user: test
142 user: test
130 date: Thu Jan 01 00:00:00 1970 +0000
143 date: Thu Jan 01 00:00:00 1970 +0000
131 summary: modify outside again
144 summary: modify outside again
132
145
133 changeset: 2:f505d5e96aa8
146 changeset: 2:f505d5e96aa8 (flat !)
147 changeset: 2:40b66f95a209 (tree !)
134 tag: tip
148 tag: tip
135 parent: 0:a99f4d53924d
149 parent: 0:a99f4d53924d (flat !)
150 parent: 0:c2a5fabcca3c (tree !)
136 user: test
151 user: test
137 date: Thu Jan 01 00:00:00 1970 +0000
152 date: Thu Jan 01 00:00:00 1970 +0000
138 summary: modify inside
153 summary: modify inside
139
154
140 $ hg pull .hg/strip-backup/*-backup.hg
155 $ hg pull .hg/strip-backup/*-backup.hg
141 pulling from .hg/strip-backup/*-backup.hg (glob)
156 pulling from .hg/strip-backup/*-backup.hg (glob)
142 requesting all changes
157 requesting all changes
143 adding changesets
158 adding changesets
144 adding manifests
159 adding manifests
145 adding file changes
160 adding file changes
146 added 3 changesets with 2 changes to 1 files (+1 heads)
161 added 3 changesets with 2 changes to 1 files (+1 heads)
147 new changesets *:* (glob)
162 new changesets *:* (glob)
148 (run 'hg heads' to see heads, 'hg merge' to merge)
163 (run 'hg heads' to see heads, 'hg merge' to merge)
@@ -1,355 +1,365 b''
1 #testcases flat tree
1 $ . "$TESTDIR/narrow-library.sh"
2 $ . "$TESTDIR/narrow-library.sh"
2
3
4 #if tree
5 $ cat << EOF >> $HGRCPATH
6 > [experimental]
7 > treemanifest = 1
8 > EOF
9 #endif
10
3 $ hg init master
11 $ hg init master
4 $ cd master
12 $ cd master
5 $ cat >> .hg/hgrc <<EOF
13 $ cat >> .hg/hgrc <<EOF
6 > [narrow]
14 > [narrow]
7 > serveellipses=True
15 > serveellipses=True
8 > EOF
16 > EOF
9
17
10 $ mkdir inside
18 $ mkdir inside
11 $ echo 'inside' > inside/f
19 $ echo 'inside' > inside/f
12 $ hg add inside/f
20 $ hg add inside/f
13 $ hg commit -m 'add inside'
21 $ hg commit -m 'add inside'
14
22
15 $ mkdir widest
23 $ mkdir widest
16 $ echo 'widest' > widest/f
24 $ echo 'widest' > widest/f
17 $ hg add widest/f
25 $ hg add widest/f
18 $ hg commit -m 'add widest'
26 $ hg commit -m 'add widest'
19
27
20 $ mkdir outside
28 $ mkdir outside
21 $ echo 'outside' > outside/f
29 $ echo 'outside' > outside/f
22 $ hg add outside/f
30 $ hg add outside/f
23 $ hg commit -m 'add outside'
31 $ hg commit -m 'add outside'
24
32
25 $ cd ..
33 $ cd ..
26
34
27 narrow clone the inside file
35 narrow clone the inside file
28
36
29 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
37 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
30 requesting all changes
38 requesting all changes
31 adding changesets
39 adding changesets
32 adding manifests
40 adding manifests
33 adding file changes
41 adding file changes
34 added 2 changesets with 1 changes to 1 files
42 added 2 changesets with 1 changes to 1 files
35 new changesets *:* (glob)
43 new changesets *:* (glob)
36 updating to branch default
44 updating to branch default
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ cd narrow
46 $ cd narrow
39 $ hg tracked
47 $ hg tracked
40 I path:inside
48 I path:inside
41 $ ls
49 $ ls
42 inside
50 inside
43 $ cat inside/f
51 $ cat inside/f
44 inside
52 inside
45 $ cd ..
53 $ cd ..
46
54
47 add more upstream files which we will include in a wider narrow spec
55 add more upstream files which we will include in a wider narrow spec
48
56
49 $ cd master
57 $ cd master
50
58
51 $ mkdir wider
59 $ mkdir wider
52 $ echo 'wider' > wider/f
60 $ echo 'wider' > wider/f
53 $ hg add wider/f
61 $ hg add wider/f
54 $ echo 'widest v2' > widest/f
62 $ echo 'widest v2' > widest/f
55 $ hg commit -m 'add wider, update widest'
63 $ hg commit -m 'add wider, update widest'
56
64
57 $ echo 'widest v3' > widest/f
65 $ echo 'widest v3' > widest/f
58 $ hg commit -m 'update widest v3'
66 $ hg commit -m 'update widest v3'
59
67
60 $ echo 'inside v2' > inside/f
68 $ echo 'inside v2' > inside/f
61 $ hg commit -m 'update inside'
69 $ hg commit -m 'update inside'
62
70
63 $ mkdir outside2
71 $ mkdir outside2
64 $ echo 'outside2' > outside2/f
72 $ echo 'outside2' > outside2/f
65 $ hg add outside2/f
73 $ hg add outside2/f
66 $ hg commit -m 'add outside2'
74 $ hg commit -m 'add outside2'
67
75
68 $ echo 'widest v4' > widest/f
76 $ echo 'widest v4' > widest/f
69 $ hg commit -m 'update widest v4'
77 $ hg commit -m 'update widest v4'
70
78
71 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
79 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
72 *: update widest v4 (glob)
80 *: update widest v4 (glob)
73 *: add outside2 (glob)
81 *: add outside2 (glob)
74 *: update inside (glob)
82 *: update inside (glob)
75 *: update widest v3 (glob)
83 *: update widest v3 (glob)
76 *: add wider, update widest (glob)
84 *: add wider, update widest (glob)
77 *: add outside (glob)
85 *: add outside (glob)
78 *: add widest (glob)
86 *: add widest (glob)
79 *: add inside (glob)
87 *: add inside (glob)
80
88
81 $ cd ..
89 $ cd ..
82
90
83 Widen the narrow spec to see the wider file. This should not get the newly
91 Widen the narrow spec to see the wider file. This should not get the newly
84 added upstream revisions.
92 added upstream revisions.
85
93
86 $ cd narrow
94 $ cd narrow
87 $ hg tracked --addinclude wider/f
95 $ hg tracked --addinclude wider/f
88 comparing with ssh://user@dummy/master
96 comparing with ssh://user@dummy/master
89 searching for changes
97 searching for changes
90 no changes found
98 no changes found
91 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
99 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
92 adding changesets
100 adding changesets
93 adding manifests
101 adding manifests
94 adding file changes
102 adding file changes
95 added 2 changesets with 1 changes to 1 files
103 added 2 changesets with 1 changes to 1 files
96 new changesets *:* (glob)
104 new changesets *:* (glob)
97 $ hg tracked
105 $ hg tracked
98 I path:inside
106 I path:inside
99 I path:wider/f
107 I path:wider/f
100
108
101 Pull down the newly added upstream revision.
109 Pull down the newly added upstream revision.
102
110
103 $ hg pull
111 $ hg pull
104 pulling from ssh://user@dummy/master
112 pulling from ssh://user@dummy/master
105 searching for changes
113 searching for changes
106 adding changesets
114 adding changesets
107 adding manifests
115 adding manifests
108 adding file changes
116 adding file changes
109 added 4 changesets with 2 changes to 2 files
117 added 4 changesets with 2 changes to 2 files
110 new changesets *:* (glob)
118 new changesets *:* (glob)
111 (run 'hg update' to get a working copy)
119 (run 'hg update' to get a working copy)
112 $ hg update -r 'desc("add wider")'
120 $ hg update -r 'desc("add wider")'
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 $ cat wider/f
122 $ cat wider/f
115 wider
123 wider
116
124
117 $ hg update -r 'desc("update inside")'
125 $ hg update -r 'desc("update inside")'
118 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
119 $ cat wider/f
127 $ cat wider/f
120 wider
128 wider
121 $ cat inside/f
129 $ cat inside/f
122 inside v2
130 inside v2
123
131
124 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
132 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
125 ...*: update widest v4 (glob)
133 ...*: update widest v4 (glob)
126 *: update inside (glob)
134 *: update inside (glob)
127 ...*: update widest v3 (glob)
135 ...*: update widest v3 (glob)
128 *: add wider, update widest (glob)
136 *: add wider, update widest (glob)
129 ...*: add outside (glob)
137 ...*: add outside (glob)
130 *: add inside (glob)
138 *: add inside (glob)
131
139
132 Check that widening with a newline fails
140 Check that widening with a newline fails
133
141
134 $ hg tracked --addinclude 'widest
142 $ hg tracked --addinclude 'widest
135 > '
143 > '
136 abort: newlines are not allowed in narrowspec paths
144 abort: newlines are not allowed in narrowspec paths
137 [255]
145 [255]
138
146
139 widen the narrow spec to include the widest file
147 widen the narrow spec to include the widest file
140
148
141 $ hg tracked --addinclude widest
149 $ hg tracked --addinclude widest
142 comparing with ssh://user@dummy/master
150 comparing with ssh://user@dummy/master
143 searching for changes
151 searching for changes
144 no changes found
152 no changes found
145 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
153 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
146 adding changesets
154 adding changesets
147 adding manifests
155 adding manifests
148 adding file changes
156 adding file changes
149 added 8 changesets with 7 changes to 3 files
157 added 8 changesets with 7 changes to 3 files
150 new changesets *:* (glob)
158 new changesets *:* (glob)
151 $ hg tracked
159 $ hg tracked
152 I path:inside
160 I path:inside
153 I path:wider/f
161 I path:wider/f
154 I path:widest
162 I path:widest
155 $ hg update 'desc("add widest")'
163 $ hg update 'desc("add widest")'
156 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
164 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
157 $ cat widest/f
165 $ cat widest/f
158 widest
166 widest
159 $ hg update 'desc("add wider, update widest")'
167 $ hg update 'desc("add wider, update widest")'
160 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 $ cat wider/f
169 $ cat wider/f
162 wider
170 wider
163 $ cat widest/f
171 $ cat widest/f
164 widest v2
172 widest v2
165 $ hg update 'desc("update widest v3")'
173 $ hg update 'desc("update widest v3")'
166 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
167 $ cat widest/f
175 $ cat widest/f
168 widest v3
176 widest v3
169 $ hg update 'desc("update widest v4")'
177 $ hg update 'desc("update widest v4")'
170 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
178 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
171 $ cat widest/f
179 $ cat widest/f
172 widest v4
180 widest v4
173
181
174 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
182 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
175 *: update widest v4 (glob)
183 *: update widest v4 (glob)
176 ...*: add outside2 (glob)
184 ...*: add outside2 (glob)
177 *: update inside (glob)
185 *: update inside (glob)
178 *: update widest v3 (glob)
186 *: update widest v3 (glob)
179 *: add wider, update widest (glob)
187 *: add wider, update widest (glob)
180 ...*: add outside (glob)
188 ...*: add outside (glob)
181 *: add widest (glob)
189 *: add widest (glob)
182 *: add inside (glob)
190 *: add inside (glob)
183
191
184 separate suite of tests: files from 0-10 modified in changes 0-10. This allows
192 separate suite of tests: files from 0-10 modified in changes 0-10. This allows
185 more obvious precise tests tickling particular corner cases.
193 more obvious precise tests tickling particular corner cases.
186
194
187 $ cd ..
195 $ cd ..
188 $ hg init upstream
196 $ hg init upstream
189 $ cd upstream
197 $ cd upstream
190 $ cat >> .hg/hgrc <<EOF
198 $ cat >> .hg/hgrc <<EOF
191 > [narrow]
199 > [narrow]
192 > serveellipses=True
200 > serveellipses=True
193 > EOF
201 > EOF
194 $ for x in `$TESTDIR/seq.py 0 10`
202 $ for x in `$TESTDIR/seq.py 0 10`
195 > do
203 > do
196 > mkdir d$x
204 > mkdir d$x
197 > echo $x > d$x/f
205 > echo $x > d$x/f
198 > hg add d$x/f
206 > hg add d$x/f
199 > hg commit -m "add d$x/f"
207 > hg commit -m "add d$x/f"
200 > done
208 > done
201 $ hg log -T "{node|short}: {desc}\n"
209 $ hg log -T "{node|short}: {desc}\n"
202 *: add d10/f (glob)
210 *: add d10/f (glob)
203 *: add d9/f (glob)
211 *: add d9/f (glob)
204 *: add d8/f (glob)
212 *: add d8/f (glob)
205 *: add d7/f (glob)
213 *: add d7/f (glob)
206 *: add d6/f (glob)
214 *: add d6/f (glob)
207 *: add d5/f (glob)
215 *: add d5/f (glob)
208 *: add d4/f (glob)
216 *: add d4/f (glob)
209 *: add d3/f (glob)
217 *: add d3/f (glob)
210 *: add d2/f (glob)
218 *: add d2/f (glob)
211 *: add d1/f (glob)
219 *: add d1/f (glob)
212 *: add d0/f (glob)
220 *: add d0/f (glob)
213
221
214 make narrow clone with every third node.
222 make narrow clone with every third node.
215
223
216 $ cd ..
224 $ cd ..
217 $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9
225 $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9
218 requesting all changes
226 requesting all changes
219 adding changesets
227 adding changesets
220 adding manifests
228 adding manifests
221 adding file changes
229 adding file changes
222 added 8 changesets with 4 changes to 4 files
230 added 8 changesets with 4 changes to 4 files
223 new changesets *:* (glob)
231 new changesets *:* (glob)
224 updating to branch default
232 updating to branch default
225 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
233 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
226 $ cd narrow2
234 $ cd narrow2
227 $ hg tracked
235 $ hg tracked
228 I path:d0
236 I path:d0
229 I path:d3
237 I path:d3
230 I path:d6
238 I path:d6
231 I path:d9
239 I path:d9
232 $ hg verify
240 $ hg verify
233 checking changesets
241 checking changesets
234 checking manifests
242 checking manifests
243 checking directory manifests (tree !)
235 crosschecking files in changesets and manifests
244 crosschecking files in changesets and manifests
236 checking files
245 checking files
237 4 files, 8 changesets, 4 total revisions
246 4 files, 8 changesets, 4 total revisions
238 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
247 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
239 ...*: add d10/f (glob)
248 ...*: add d10/f (glob)
240 *: add d9/f (glob)
249 *: add d9/f (glob)
241 ...*: add d8/f (glob)
250 ...*: add d8/f (glob)
242 *: add d6/f (glob)
251 *: add d6/f (glob)
243 ...*: add d5/f (glob)
252 ...*: add d5/f (glob)
244 *: add d3/f (glob)
253 *: add d3/f (glob)
245 ...*: add d2/f (glob)
254 ...*: add d2/f (glob)
246 *: add d0/f (glob)
255 *: add d0/f (glob)
247 $ hg tracked --addinclude d1
256 $ hg tracked --addinclude d1
248 comparing with ssh://user@dummy/upstream
257 comparing with ssh://user@dummy/upstream
249 searching for changes
258 searching for changes
250 no changes found
259 no changes found
251 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob)
260 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob)
252 adding changesets
261 adding changesets
253 adding manifests
262 adding manifests
254 adding file changes
263 adding file changes
255 added 9 changesets with 5 changes to 5 files
264 added 9 changesets with 5 changes to 5 files
256 new changesets *:* (glob)
265 new changesets *:* (glob)
257 $ hg tracked
266 $ hg tracked
258 I path:d0
267 I path:d0
259 I path:d1
268 I path:d1
260 I path:d3
269 I path:d3
261 I path:d6
270 I path:d6
262 I path:d9
271 I path:d9
263 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
272 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
264 ...*: add d10/f (glob)
273 ...*: add d10/f (glob)
265 *: add d9/f (glob)
274 *: add d9/f (glob)
266 ...*: add d8/f (glob)
275 ...*: add d8/f (glob)
267 *: add d6/f (glob)
276 *: add d6/f (glob)
268 ...*: add d5/f (glob)
277 ...*: add d5/f (glob)
269 *: add d3/f (glob)
278 *: add d3/f (glob)
270 ...*: add d2/f (glob)
279 ...*: add d2/f (glob)
271 *: add d1/f (glob)
280 *: add d1/f (glob)
272 *: add d0/f (glob)
281 *: add d0/f (glob)
273
282
274 Verify shouldn't claim the repo is corrupt after a widen.
283 Verify shouldn't claim the repo is corrupt after a widen.
275
284
276 $ hg verify
285 $ hg verify
277 checking changesets
286 checking changesets
278 checking manifests
287 checking manifests
288 checking directory manifests (tree !)
279 crosschecking files in changesets and manifests
289 crosschecking files in changesets and manifests
280 checking files
290 checking files
281 5 files, 9 changesets, 5 total revisions
291 5 files, 9 changesets, 5 total revisions
282
292
283 Widening preserves parent of local commit
293 Widening preserves parent of local commit
284
294
285 $ cd ..
295 $ cd ..
286 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2
296 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2
287 $ cd narrow3
297 $ cd narrow3
288 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
298 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n"
289 *: add d2/f (glob)
299 *: add d2/f (glob)
290 ...*: add d1/f (glob)
300 ...*: add d1/f (glob)
291 $ hg pull -q -r 3
301 $ hg pull -q -r 3
292 $ hg co -q tip
302 $ hg co -q tip
293 $ hg pull -q -r 4
303 $ hg pull -q -r 4
294 $ echo local > d2/f
304 $ echo local > d2/f
295 $ hg ci -m local
305 $ hg ci -m local
296 created new head
306 created new head
297 $ hg tracked -q --addinclude d0 --addinclude d9
307 $ hg tracked -q --addinclude d0 --addinclude d9
298
308
299 Widening preserves bookmarks
309 Widening preserves bookmarks
300
310
301 $ cd ..
311 $ cd ..
302 $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4
312 $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4
303 $ cd narrow-bookmarks
313 $ cd narrow-bookmarks
304 $ echo local > d4/f
314 $ echo local > d4/f
305 $ hg ci -m local
315 $ hg ci -m local
306 $ hg bookmarks bookmark
316 $ hg bookmarks bookmark
307 $ hg bookmarks
317 $ hg bookmarks
308 * bookmark 3:* (glob)
318 * bookmark 3:* (glob)
309 $ hg -q tracked --addinclude d2
319 $ hg -q tracked --addinclude d2
310 $ hg bookmarks
320 $ hg bookmarks
311 * bookmark 5:* (glob)
321 * bookmark 5:* (glob)
312 $ hg log -r bookmark -T '{desc}\n'
322 $ hg log -r bookmark -T '{desc}\n'
313 local
323 local
314
324
315 Widening that fails can be recovered from
325 Widening that fails can be recovered from
316
326
317 $ cd ..
327 $ cd ..
318 $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0
328 $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0
319 $ cd interrupted
329 $ cd interrupted
320 $ echo local > d0/f
330 $ echo local > d0/f
321 $ hg ci -m local
331 $ hg ci -m local
322 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
332 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
323 2: local
333 2: local
324 ...1: add d10/f
334 ...1: add d10/f
325 0: add d0/f
335 0: add d0/f
326 $ hg bookmarks bookmark
336 $ hg bookmarks bookmark
327 $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1
337 $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1
328 comparing with ssh://user@dummy/upstream
338 comparing with ssh://user@dummy/upstream
329 searching for changes
339 searching for changes
330 no changes found
340 no changes found
331 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob)
341 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob)
332 adding changesets
342 adding changesets
333 adding manifests
343 adding manifests
334 adding file changes
344 adding file changes
335 added 3 changesets with 2 changes to 2 files
345 added 3 changesets with 2 changes to 2 files
336 transaction abort!
346 transaction abort!
337 rollback completed
347 rollback completed
338 abort: pretxnchangegroup.bad hook exited with status 1
348 abort: pretxnchangegroup.bad hook exited with status 1
339 [255]
349 [255]
340 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
350 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
341 $ hg bookmarks
351 $ hg bookmarks
342 no bookmarks set
352 no bookmarks set
343 $ hg unbundle .hg/strip-backup/*-widen.hg
353 $ hg unbundle .hg/strip-backup/*-widen.hg
344 adding changesets
354 adding changesets
345 adding manifests
355 adding manifests
346 adding file changes
356 adding file changes
347 added 3 changesets with 2 changes to 1 files
357 added 3 changesets with 2 changes to 1 files
348 new changesets *:* (glob)
358 new changesets *:* (glob)
349 (run 'hg update' to get a working copy)
359 (run 'hg update' to get a working copy)
350 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
360 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
351 2: local
361 2: local
352 ...1: add d10/f
362 ...1: add d10/f
353 0: add d0/f
363 0: add d0/f
354 $ hg bookmarks
364 $ hg bookmarks
355 * bookmark 2:* (glob)
365 * bookmark 2:* (glob)
@@ -1,358 +1,374 b''
1 #testcases flat tree
2
1 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
2
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
3 $ hg init master
12 $ hg init master
4 $ cd master
13 $ cd master
5 $ cat >> .hg/hgrc <<EOF
14 $ cat >> .hg/hgrc <<EOF
6 > [narrow]
15 > [narrow]
7 > serveellipses=True
16 > serveellipses=True
8 > EOF
17 > EOF
9 $ for x in `$TESTDIR/seq.py 0 10`
18 $ for x in `$TESTDIR/seq.py 0 10`
10 > do
19 > do
11 > mkdir d$x
20 > mkdir d$x
12 > echo $x > d$x/f
21 > echo $x > d$x/f
13 > hg add d$x/f
22 > hg add d$x/f
14 > hg commit -m "add d$x/f"
23 > hg commit -m "add d$x/f"
15 > done
24 > done
16 $ hg log -T "{node|short}: {desc}\n"
25 $ hg log -T "{node|short}: {desc}\n"
17 *: add d10/f (glob)
26 *: add d10/f (glob)
18 *: add d9/f (glob)
27 *: add d9/f (glob)
19 *: add d8/f (glob)
28 *: add d8/f (glob)
20 *: add d7/f (glob)
29 *: add d7/f (glob)
21 *: add d6/f (glob)
30 *: add d6/f (glob)
22 *: add d5/f (glob)
31 *: add d5/f (glob)
23 *: add d4/f (glob)
32 *: add d4/f (glob)
24 *: add d3/f (glob)
33 *: add d3/f (glob)
25 *: add d2/f (glob)
34 *: add d2/f (glob)
26 *: add d1/f (glob)
35 *: add d1/f (glob)
27 *: add d0/f (glob)
36 *: add d0/f (glob)
28 $ cd ..
37 $ cd ..
29
38
30 Error if '.' or '..' are in the directory to track.
39 Error if '.' or '..' are in the directory to track.
31 $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf
40 $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf
32 requesting all changes
41 requesting all changes
33 abort: "." and ".." are not allowed in narrowspec paths
42 abort: "." and ".." are not allowed in narrowspec paths
34 [255]
43 [255]
35 $ hg clone --narrow ssh://user@dummy/master foo --include asdf/..
44 $ hg clone --narrow ssh://user@dummy/master foo --include asdf/..
36 requesting all changes
45 requesting all changes
37 abort: "." and ".." are not allowed in narrowspec paths
46 abort: "." and ".." are not allowed in narrowspec paths
38 [255]
47 [255]
39 $ hg clone --narrow ssh://user@dummy/master foo --include a/./c
48 $ hg clone --narrow ssh://user@dummy/master foo --include a/./c
40 requesting all changes
49 requesting all changes
41 abort: "." and ".." are not allowed in narrowspec paths
50 abort: "." and ".." are not allowed in narrowspec paths
42 [255]
51 [255]
43
52
44 Names with '.' in them are OK.
53 Names with '.' in them are OK.
45 $ hg clone --narrow ssh://user@dummy/master $RANDOM --include a/.b/c
54 $ hg clone --narrow ssh://user@dummy/master $RANDOM --include a/.b/c
46 requesting all changes
55 requesting all changes
47 adding changesets
56 adding changesets
48 adding manifests
57 adding manifests
49 adding file changes
58 adding file changes
50 added 1 changesets with 0 changes to 0 files
59 added 1 changesets with 0 changes to 0 files
51 new changesets * (glob)
60 new changesets * (glob)
52 updating to branch default
61 updating to branch default
53 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
54
63
55 Test repo with local changes
64 Test repo with local changes
56 $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6
65 $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6
57 requesting all changes
66 requesting all changes
58 adding changesets
67 adding changesets
59 adding manifests
68 adding manifests
60 adding file changes
69 adding file changes
61 added 6 changesets with 3 changes to 3 files
70 added 6 changesets with 3 changes to 3 files
62 new changesets *:* (glob)
71 new changesets *:* (glob)
63 updating to branch default
72 updating to branch default
64 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 $ cd narrow-local-changes
74 $ cd narrow-local-changes
66 $ cat >> $HGRCPATH << EOF
75 $ cat >> $HGRCPATH << EOF
67 > [experimental]
76 > [experimental]
68 > evolution=createmarkers
77 > evolution=createmarkers
69 > EOF
78 > EOF
70 $ echo local change >> d0/f
79 $ echo local change >> d0/f
71 $ hg ci -m 'local change to d0'
80 $ hg ci -m 'local change to d0'
72 $ hg co '.^'
81 $ hg co '.^'
73 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 $ echo local change >> d3/f
83 $ echo local change >> d3/f
75 $ hg ci -m 'local hidden change to d3'
84 $ hg ci -m 'local hidden change to d3'
76 created new head
85 created new head
77 $ hg ci --amend -m 'local change to d3'
86 $ hg ci --amend -m 'local change to d3'
78 $ hg tracked --removeinclude d0
87 $ hg tracked --removeinclude d0
79 comparing with ssh://user@dummy/master
88 comparing with ssh://user@dummy/master
80 searching for changes
89 searching for changes
81 looking for local changes to affected paths
90 looking for local changes to affected paths
82 The following changeset(s) or their ancestors have local changes not on the remote:
91 The following changeset(s) or their ancestors have local changes not on the remote:
83 * (glob)
92 * (glob)
84 abort: local changes found
93 abort: local changes found
85 (use --force-delete-local-changes to ignore)
94 (use --force-delete-local-changes to ignore)
86 [255]
95 [255]
87 Check that nothing was removed by the failed attempts
96 Check that nothing was removed by the failed attempts
88 $ hg tracked
97 $ hg tracked
89 I path:d0
98 I path:d0
90 I path:d3
99 I path:d3
91 I path:d6
100 I path:d6
92 $ hg files
101 $ hg files
93 d0/f
102 d0/f
94 d3/f
103 d3/f
95 d6/f
104 d6/f
96 $ find *
105 $ find *
97 d0
106 d0
98 d0/f
107 d0/f
99 d3
108 d3
100 d3/f
109 d3/f
101 d6
110 d6
102 d6/f
111 d6/f
103 $ hg verify -q
112 $ hg verify -q
104 Force deletion of local changes
113 Force deletion of local changes
105 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
114 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
106 *: local change to d3 (glob)
115 *: local change to d3 (glob)
107 *: local change to d0 (glob)
116 *: local change to d0 (glob)
108 *: add d10/f outsidenarrow (glob)
117 *: add d10/f outsidenarrow (glob)
109 *: add d6/f (glob)
118 *: add d6/f (glob)
110 *: add d5/f outsidenarrow (glob)
119 *: add d5/f outsidenarrow (glob)
111 *: add d3/f (glob)
120 *: add d3/f (glob)
112 *: add d2/f outsidenarrow (glob)
121 *: add d2/f outsidenarrow (glob)
113 *: add d0/f (glob)
122 *: add d0/f (glob)
114 $ hg tracked --removeinclude d0 --force-delete-local-changes
123 $ hg tracked --removeinclude d0 --force-delete-local-changes
115 comparing with ssh://user@dummy/master
124 comparing with ssh://user@dummy/master
116 searching for changes
125 searching for changes
117 looking for local changes to affected paths
126 looking for local changes to affected paths
118 The following changeset(s) or their ancestors have local changes not on the remote:
127 The following changeset(s) or their ancestors have local changes not on the remote:
119 * (glob)
128 * (glob)
120 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
129 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
121 deleting data/d0/f.i
130 deleting data/d0/f.i
131 deleting meta/d0/00manifest.i (tree !)
122 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
132 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
123 *: local change to d3 (glob)
133 *: local change to d3 (glob)
124 *: add d10/f outsidenarrow (glob)
134 *: add d10/f outsidenarrow (glob)
125 *: add d6/f (glob)
135 *: add d6/f (glob)
126 *: add d5/f outsidenarrow (glob)
136 *: add d5/f outsidenarrow (glob)
127 *: add d3/f (glob)
137 *: add d3/f (glob)
128 *: add d2/f outsidenarrow (glob)
138 *: add d2/f outsidenarrow (glob)
129 *: add d0/f outsidenarrow (glob)
139 *: add d0/f outsidenarrow (glob)
130 Can restore stripped local changes after widening
140 Can restore stripped local changes after widening
131 $ hg tracked --addinclude d0 -q
141 $ hg tracked --addinclude d0 -q
132 $ hg unbundle .hg/strip-backup/*-narrow.hg -q
142 $ hg unbundle .hg/strip-backup/*-narrow.hg -q
133 $ hg --hidden co -r 'desc("local change to d0")' -q
143 $ hg --hidden co -r 'desc("local change to d0")' -q
134 $ cat d0/f
144 $ cat d0/f
135 0
145 0
136 local change
146 local change
137 Pruned commits affecting removed paths should not prevent narrowing
147 Pruned commits affecting removed paths should not prevent narrowing
138 $ hg co '.^'
148 $ hg co '.^'
139 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'`
150 $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'`
141 obsoleted 1 changesets
151 obsoleted 1 changesets
142 $ hg tracked --removeinclude d0
152 $ hg tracked --removeinclude d0
143 comparing with ssh://user@dummy/master
153 comparing with ssh://user@dummy/master
144 searching for changes
154 searching for changes
145 looking for local changes to affected paths
155 looking for local changes to affected paths
146 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
156 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
147 deleting data/d0/f.i
157 deleting data/d0/f.i
158 deleting meta/d0/00manifest.i (tree !)
148 Updates off of stripped commit if necessary
159 Updates off of stripped commit if necessary
149 $ hg co -r 'desc("local change to d3")' -q
160 $ hg co -r 'desc("local change to d3")' -q
150 $ echo local change >> d6/f
161 $ echo local change >> d6/f
151 $ hg ci -m 'local change to d6'
162 $ hg ci -m 'local change to d6'
152 $ hg tracked --removeinclude d3 --force-delete-local-changes
163 $ hg tracked --removeinclude d3 --force-delete-local-changes
153 comparing with ssh://user@dummy/master
164 comparing with ssh://user@dummy/master
154 searching for changes
165 searching for changes
155 looking for local changes to affected paths
166 looking for local changes to affected paths
156 The following changeset(s) or their ancestors have local changes not on the remote:
167 The following changeset(s) or their ancestors have local changes not on the remote:
157 * (glob)
168 * (glob)
158 * (glob)
169 * (glob)
159 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
171 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
161 deleting data/d3/f.i
172 deleting data/d3/f.i
173 deleting meta/d3/00manifest.i (tree !)
162 $ hg log -T '{desc}\n' -r .
174 $ hg log -T '{desc}\n' -r .
163 add d10/f
175 add d10/f
164 Updates to nullid if necessary
176 Updates to nullid if necessary
165 $ hg tracked --addinclude d3 -q
177 $ hg tracked --addinclude d3 -q
166 $ hg co null -q
178 $ hg co null -q
167 $ mkdir d3
179 $ mkdir d3
168 $ echo local change > d3/f
180 $ echo local change > d3/f
169 $ hg add d3/f
181 $ hg add d3/f
170 $ hg ci -m 'local change to d3'
182 $ hg ci -m 'local change to d3'
171 created new head
183 created new head
172 $ hg tracked --removeinclude d3 --force-delete-local-changes
184 $ hg tracked --removeinclude d3 --force-delete-local-changes
173 comparing with ssh://user@dummy/master
185 comparing with ssh://user@dummy/master
174 searching for changes
186 searching for changes
175 looking for local changes to affected paths
187 looking for local changes to affected paths
176 The following changeset(s) or their ancestors have local changes not on the remote:
188 The following changeset(s) or their ancestors have local changes not on the remote:
177 * (glob)
189 * (glob)
178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
190 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
179 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
191 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
180 deleting data/d3/f.i
192 deleting data/d3/f.i
193 deleting meta/d3/00manifest.i (tree !)
181 $ hg id
194 $ hg id
182 000000000000
195 000000000000
183 $ cd ..
196 $ cd ..
184
197
185 Can remove last include, making repo empty
198 Can remove last include, making repo empty
186 $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5
199 $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5
187 adding changesets
200 adding changesets
188 adding manifests
201 adding manifests
189 adding file changes
202 adding file changes
190 added 2 changesets with 1 changes to 1 files
203 added 2 changesets with 1 changes to 1 files
191 new changesets *:* (glob)
204 new changesets *:* (glob)
192 updating to branch default
205 updating to branch default
193 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
206 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 $ cd narrow-empty
207 $ cd narrow-empty
195 $ hg tracked --removeinclude d0
208 $ hg tracked --removeinclude d0
196 comparing with ssh://user@dummy/master
209 comparing with ssh://user@dummy/master
197 searching for changes
210 searching for changes
198 looking for local changes to affected paths
211 looking for local changes to affected paths
199 deleting data/d0/f.i
212 deleting data/d0/f.i
213 deleting meta/d0/00manifest.i (tree !)
200 $ hg tracked
214 $ hg tracked
201 $ hg files
215 $ hg files
202 [1]
216 [1]
203 $ test -d d0
217 $ test -d d0
204 [1]
218 [1]
205 Do some work in the empty clone
219 Do some work in the empty clone
206 $ hg diff --change .
220 $ hg diff --change .
207 $ hg branch foo
221 $ hg branch foo
208 marked working directory as branch foo
222 marked working directory as branch foo
209 (branches are permanent and global, did you want a bookmark?)
223 (branches are permanent and global, did you want a bookmark?)
210 $ hg ci -m empty
224 $ hg ci -m empty
211 $ hg pull -q
225 $ hg pull -q
212 Can widen the empty clone
226 Can widen the empty clone
213 $ hg tracked --addinclude d0
227 $ hg tracked --addinclude d0
214 comparing with ssh://user@dummy/master
228 comparing with ssh://user@dummy/master
215 searching for changes
229 searching for changes
216 no changes found
230 no changes found
217 saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob)
231 saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob)
218 adding changesets
232 adding changesets
219 adding manifests
233 adding manifests
220 adding file changes
234 adding file changes
221 added 3 changesets with 1 changes to 1 files
235 added 3 changesets with 1 changes to 1 files
222 new changesets *:* (glob)
236 new changesets *:* (glob)
223 $ hg tracked
237 $ hg tracked
224 I path:d0
238 I path:d0
225 $ hg files
239 $ hg files
226 d0/f
240 d0/f
227 $ find *
241 $ find *
228 d0
242 d0
229 d0/f
243 d0/f
230 $ cd ..
244 $ cd ..
231
245
232 TODO(martinvonz): test including e.g. d3/g and then removing it once
246 TODO(martinvonz): test including e.g. d3/g and then removing it once
233 https://bitbucket.org/Google/narrowhg/issues/6 is fixed
247 https://bitbucket.org/Google/narrowhg/issues/6 is fixed
234
248
235 $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9
249 $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9
236 requesting all changes
250 requesting all changes
237 adding changesets
251 adding changesets
238 adding manifests
252 adding manifests
239 adding file changes
253 adding file changes
240 added 8 changesets with 4 changes to 4 files
254 added 8 changesets with 4 changes to 4 files
241 new changesets *:* (glob)
255 new changesets *:* (glob)
242 updating to branch default
256 updating to branch default
243 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
257 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 $ cd narrow
258 $ cd narrow
245 $ hg tracked
259 $ hg tracked
246 I path:d0
260 I path:d0
247 I path:d3
261 I path:d3
248 I path:d6
262 I path:d6
249 I path:d9
263 I path:d9
250 $ hg tracked --removeinclude d6
264 $ hg tracked --removeinclude d6
251 comparing with ssh://user@dummy/master
265 comparing with ssh://user@dummy/master
252 searching for changes
266 searching for changes
253 looking for local changes to affected paths
267 looking for local changes to affected paths
254 deleting data/d6/f.i
268 deleting data/d6/f.i
269 deleting meta/d6/00manifest.i (tree !)
255 $ hg tracked
270 $ hg tracked
256 I path:d0
271 I path:d0
257 I path:d3
272 I path:d3
258 I path:d9
273 I path:d9
259 $ hg debugrebuildfncache
274 $ hg debugrebuildfncache
260 fncache already up to date
275 fncache already up to date
261 $ find *
276 $ find *
262 d0
277 d0
263 d0/f
278 d0/f
264 d3
279 d3
265 d3/f
280 d3/f
266 d9
281 d9
267 d9/f
282 d9/f
268 $ hg verify -q
283 $ hg verify -q
269 $ hg tracked --addexclude d3/f
284 $ hg tracked --addexclude d3/f
270 comparing with ssh://user@dummy/master
285 comparing with ssh://user@dummy/master
271 searching for changes
286 searching for changes
272 looking for local changes to affected paths
287 looking for local changes to affected paths
273 deleting data/d3/f.i
288 deleting data/d3/f.i
274 $ hg tracked
289 $ hg tracked
275 I path:d0
290 I path:d0
276 I path:d3
291 I path:d3
277 I path:d9
292 I path:d9
278 X path:d3/f
293 X path:d3/f
279 $ hg debugrebuildfncache
294 $ hg debugrebuildfncache
280 fncache already up to date
295 fncache already up to date
281 $ find *
296 $ find *
282 d0
297 d0
283 d0/f
298 d0/f
284 d9
299 d9
285 d9/f
300 d9/f
286 $ hg verify -q
301 $ hg verify -q
287 $ hg tracked --addexclude d0
302 $ hg tracked --addexclude d0
288 comparing with ssh://user@dummy/master
303 comparing with ssh://user@dummy/master
289 searching for changes
304 searching for changes
290 looking for local changes to affected paths
305 looking for local changes to affected paths
291 deleting data/d0/f.i
306 deleting data/d0/f.i
307 deleting meta/d0/00manifest.i (tree !)
292 $ hg tracked
308 $ hg tracked
293 I path:d3
309 I path:d3
294 I path:d9
310 I path:d9
295 X path:d0
311 X path:d0
296 X path:d3/f
312 X path:d3/f
297 $ hg debugrebuildfncache
313 $ hg debugrebuildfncache
298 fncache already up to date
314 fncache already up to date
299 $ find *
315 $ find *
300 d9
316 d9
301 d9/f
317 d9/f
302
318
303 Make a 15 of changes to d9 to test the path without --verbose
319 Make a 15 of changes to d9 to test the path without --verbose
304 (Note: using regexes instead of "* (glob)" because if the test fails, it
320 (Note: using regexes instead of "* (glob)" because if the test fails, it
305 produces more sensible diffs)
321 produces more sensible diffs)
306 $ hg tracked
322 $ hg tracked
307 I path:d3
323 I path:d3
308 I path:d9
324 I path:d9
309 X path:d0
325 X path:d0
310 X path:d3/f
326 X path:d3/f
311 $ for x in `$TESTDIR/seq.py 1 15`
327 $ for x in `$TESTDIR/seq.py 1 15`
312 > do
328 > do
313 > echo local change >> d9/f
329 > echo local change >> d9/f
314 > hg commit -m "change $x to d9/f"
330 > hg commit -m "change $x to d9/f"
315 > done
331 > done
316 $ hg tracked --removeinclude d9
332 $ hg tracked --removeinclude d9
317 comparing with ssh://user@dummy/master
333 comparing with ssh://user@dummy/master
318 searching for changes
334 searching for changes
319 looking for local changes to affected paths
335 looking for local changes to affected paths
320 The following changeset(s) or their ancestors have local changes not on the remote:
336 The following changeset(s) or their ancestors have local changes not on the remote:
321 ^[0-9a-f]{12}$ (re)
337 ^[0-9a-f]{12}$ (re)
322 ^[0-9a-f]{12}$ (re)
338 ^[0-9a-f]{12}$ (re)
323 ^[0-9a-f]{12}$ (re)
339 ^[0-9a-f]{12}$ (re)
324 ^[0-9a-f]{12}$ (re)
340 ^[0-9a-f]{12}$ (re)
325 ^[0-9a-f]{12}$ (re)
341 ^[0-9a-f]{12}$ (re)
326 ^[0-9a-f]{12}$ (re)
342 ^[0-9a-f]{12}$ (re)
327 ^[0-9a-f]{12}$ (re)
343 ^[0-9a-f]{12}$ (re)
328 ^[0-9a-f]{12}$ (re)
344 ^[0-9a-f]{12}$ (re)
329 ^[0-9a-f]{12}$ (re)
345 ^[0-9a-f]{12}$ (re)
330 ^[0-9a-f]{12}$ (re)
346 ^[0-9a-f]{12}$ (re)
331 ...and 5 more, use --verbose to list all
347 ...and 5 more, use --verbose to list all
332 abort: local changes found
348 abort: local changes found
333 (use --force-delete-local-changes to ignore)
349 (use --force-delete-local-changes to ignore)
334 [255]
350 [255]
335 Now test it *with* verbose.
351 Now test it *with* verbose.
336 $ hg tracked --removeinclude d9 --verbose
352 $ hg tracked --removeinclude d9 --verbose
337 comparing with ssh://user@dummy/master
353 comparing with ssh://user@dummy/master
338 searching for changes
354 searching for changes
339 looking for local changes to affected paths
355 looking for local changes to affected paths
340 The following changeset(s) or their ancestors have local changes not on the remote:
356 The following changeset(s) or their ancestors have local changes not on the remote:
341 ^[0-9a-f]{12}$ (re)
357 ^[0-9a-f]{12}$ (re)
342 ^[0-9a-f]{12}$ (re)
358 ^[0-9a-f]{12}$ (re)
343 ^[0-9a-f]{12}$ (re)
359 ^[0-9a-f]{12}$ (re)
344 ^[0-9a-f]{12}$ (re)
360 ^[0-9a-f]{12}$ (re)
345 ^[0-9a-f]{12}$ (re)
361 ^[0-9a-f]{12}$ (re)
346 ^[0-9a-f]{12}$ (re)
362 ^[0-9a-f]{12}$ (re)
347 ^[0-9a-f]{12}$ (re)
363 ^[0-9a-f]{12}$ (re)
348 ^[0-9a-f]{12}$ (re)
364 ^[0-9a-f]{12}$ (re)
349 ^[0-9a-f]{12}$ (re)
365 ^[0-9a-f]{12}$ (re)
350 ^[0-9a-f]{12}$ (re)
366 ^[0-9a-f]{12}$ (re)
351 ^[0-9a-f]{12}$ (re)
367 ^[0-9a-f]{12}$ (re)
352 ^[0-9a-f]{12}$ (re)
368 ^[0-9a-f]{12}$ (re)
353 ^[0-9a-f]{12}$ (re)
369 ^[0-9a-f]{12}$ (re)
354 ^[0-9a-f]{12}$ (re)
370 ^[0-9a-f]{12}$ (re)
355 ^[0-9a-f]{12}$ (re)
371 ^[0-9a-f]{12}$ (re)
356 abort: local changes found
372 abort: local changes found
357 (use --force-delete-local-changes to ignore)
373 (use --force-delete-local-changes to ignore)
358 [255]
374 [255]
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now