Show More
@@ -1,448 +1,449 | |||||
1 | #testcases flat tree |
|
1 | #testcases flat tree | |
2 | #testcases lfs-on lfs-off |
|
2 | #testcases lfs-on lfs-off | |
3 |
|
3 | |||
|
4 | $ cat >> $HGRCPATH << EOF | |||
|
5 | > [experimental] | |||
|
6 | > evolution=createmarkers | |||
|
7 | > EOF | |||
|
8 | ||||
4 | #if lfs-on |
|
9 | #if lfs-on | |
5 | $ cat >> $HGRCPATH <<EOF |
|
10 | $ cat >> $HGRCPATH <<EOF | |
6 | > [extensions] |
|
11 | > [extensions] | |
7 | > lfs = |
|
12 | > lfs = | |
8 | > EOF |
|
13 | > EOF | |
9 | #endif |
|
14 | #endif | |
10 |
|
15 | |||
11 | $ . "$TESTDIR/narrow-library.sh" |
|
16 | $ . "$TESTDIR/narrow-library.sh" | |
12 |
|
17 | |||
13 | #if tree |
|
18 | #if tree | |
14 | $ cat << EOF >> $HGRCPATH |
|
19 | $ cat << EOF >> $HGRCPATH | |
15 | > [experimental] |
|
20 | > [experimental] | |
16 | > treemanifest = 1 |
|
21 | > treemanifest = 1 | |
17 | > EOF |
|
22 | > EOF | |
18 | #endif |
|
23 | #endif | |
19 |
|
24 | |||
20 | $ hg init master |
|
25 | $ hg init master | |
21 | $ cd master |
|
26 | $ cd master | |
22 | $ cat >> .hg/hgrc <<EOF |
|
27 | $ cat >> .hg/hgrc <<EOF | |
23 | > [narrow] |
|
28 | > [narrow] | |
24 | > serveellipses=True |
|
29 | > serveellipses=True | |
25 | > EOF |
|
30 | > EOF | |
26 | $ for x in `$TESTDIR/seq.py 0 10` |
|
31 | $ for x in `$TESTDIR/seq.py 0 10` | |
27 | > do |
|
32 | > do | |
28 | > mkdir d$x |
|
33 | > mkdir d$x | |
29 | > echo $x > d$x/f |
|
34 | > echo $x > d$x/f | |
30 | > hg add d$x/f |
|
35 | > hg add d$x/f | |
31 | > hg commit -m "add d$x/f" |
|
36 | > hg commit -m "add d$x/f" | |
32 | > done |
|
37 | > done | |
33 | $ hg log -T "{rev}: {desc}\n" |
|
38 | $ hg log -T "{rev}: {desc}\n" | |
34 | 10: add d10/f |
|
39 | 10: add d10/f | |
35 | 9: add d9/f |
|
40 | 9: add d9/f | |
36 | 8: add d8/f |
|
41 | 8: add d8/f | |
37 | 7: add d7/f |
|
42 | 7: add d7/f | |
38 | 6: add d6/f |
|
43 | 6: add d6/f | |
39 | 5: add d5/f |
|
44 | 5: add d5/f | |
40 | 4: add d4/f |
|
45 | 4: add d4/f | |
41 | 3: add d3/f |
|
46 | 3: add d3/f | |
42 | 2: add d2/f |
|
47 | 2: add d2/f | |
43 | 1: add d1/f |
|
48 | 1: add d1/f | |
44 | 0: add d0/f |
|
49 | 0: add d0/f | |
45 | $ cd .. |
|
50 | $ cd .. | |
46 |
|
51 | |||
47 | Error if '.' or '..' are in the directory to track. |
|
52 | Error if '.' or '..' are in the directory to track. | |
48 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf |
|
53 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf | |
49 | abort: "." and ".." are not allowed in narrowspec paths |
|
54 | abort: "." and ".." are not allowed in narrowspec paths | |
50 | [255] |
|
55 | [255] | |
51 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. |
|
56 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. | |
52 | abort: "." and ".." are not allowed in narrowspec paths |
|
57 | abort: "." and ".." are not allowed in narrowspec paths | |
53 | [255] |
|
58 | [255] | |
54 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c |
|
59 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c | |
55 | abort: "." and ".." are not allowed in narrowspec paths |
|
60 | abort: "." and ".." are not allowed in narrowspec paths | |
56 | [255] |
|
61 | [255] | |
57 |
|
62 | |||
58 | Names with '.' in them are OK. |
|
63 | Names with '.' in them are OK. | |
59 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c |
|
64 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c | |
60 | requesting all changes |
|
65 | requesting all changes | |
61 | adding changesets |
|
66 | adding changesets | |
62 | adding manifests |
|
67 | adding manifests | |
63 | adding file changes |
|
68 | adding file changes | |
64 | added 1 changesets with 0 changes to 0 files |
|
69 | added 1 changesets with 0 changes to 0 files | |
65 | new changesets * (glob) |
|
70 | new changesets * (glob) | |
66 | updating to branch default |
|
71 | updating to branch default | |
67 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
68 |
|
73 | |||
69 | Test repo with local changes |
|
74 | Test repo with local changes | |
70 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 |
|
75 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 | |
71 | requesting all changes |
|
76 | requesting all changes | |
72 | adding changesets |
|
77 | adding changesets | |
73 | adding manifests |
|
78 | adding manifests | |
74 | adding file changes |
|
79 | adding file changes | |
75 | added 6 changesets with 3 changes to 3 files |
|
80 | added 6 changesets with 3 changes to 3 files | |
76 | new changesets *:* (glob) |
|
81 | new changesets *:* (glob) | |
77 | updating to branch default |
|
82 | updating to branch default | |
78 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | $ cd narrow-local-changes |
|
84 | $ cd narrow-local-changes | |
80 | $ cat >> $HGRCPATH << EOF |
|
|||
81 | > [experimental] |
|
|||
82 | > evolution=createmarkers |
|
|||
83 | > EOF |
|
|||
84 | $ echo local change >> d0/f |
|
85 | $ echo local change >> d0/f | |
85 | $ hg ci -m 'local change to d0' |
|
86 | $ hg ci -m 'local change to d0' | |
86 | $ hg co '.^' |
|
87 | $ hg co '.^' | |
87 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 | $ echo local change >> d3/f |
|
89 | $ echo local change >> d3/f | |
89 | $ hg ci -m 'local hidden change to d3' |
|
90 | $ hg ci -m 'local hidden change to d3' | |
90 | created new head |
|
91 | created new head | |
91 | $ hg ci --amend -m 'local change to d3' |
|
92 | $ hg ci --amend -m 'local change to d3' | |
92 | $ hg tracked --removeinclude d0 |
|
93 | $ hg tracked --removeinclude d0 | |
93 | comparing with ssh://user@dummy/master |
|
94 | comparing with ssh://user@dummy/master | |
94 | searching for changes |
|
95 | searching for changes | |
95 | looking for local changes to affected paths |
|
96 | looking for local changes to affected paths | |
96 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
97 | The following changeset(s) or their ancestors have local changes not on the remote: | |
97 | * (glob) |
|
98 | * (glob) | |
98 | abort: local changes found |
|
99 | abort: local changes found | |
99 | (use --force-delete-local-changes to ignore) |
|
100 | (use --force-delete-local-changes to ignore) | |
100 | [255] |
|
101 | [255] | |
101 | Check that nothing was removed by the failed attempts |
|
102 | Check that nothing was removed by the failed attempts | |
102 | $ hg tracked |
|
103 | $ hg tracked | |
103 | I path:d0 |
|
104 | I path:d0 | |
104 | I path:d3 |
|
105 | I path:d3 | |
105 | I path:d6 |
|
106 | I path:d6 | |
106 | $ hg files |
|
107 | $ hg files | |
107 | d0/f |
|
108 | d0/f | |
108 | d3/f |
|
109 | d3/f | |
109 | d6/f |
|
110 | d6/f | |
110 | $ find * |
|
111 | $ find * | |
111 | d0 |
|
112 | d0 | |
112 | d0/f |
|
113 | d0/f | |
113 | d3 |
|
114 | d3 | |
114 | d3/f |
|
115 | d3/f | |
115 | d6 |
|
116 | d6 | |
116 | d6/f |
|
117 | d6/f | |
117 | $ hg verify -q |
|
118 | $ hg verify -q | |
118 | Force deletion of local changes |
|
119 | Force deletion of local changes | |
119 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
120 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
120 | 8: local change to d3 |
|
121 | 8: local change to d3 | |
121 | 6: local change to d0 |
|
122 | 6: local change to d0 | |
122 | 5: add d10/f outsidenarrow |
|
123 | 5: add d10/f outsidenarrow | |
123 | 4: add d6/f |
|
124 | 4: add d6/f | |
124 | 3: add d5/f outsidenarrow |
|
125 | 3: add d5/f outsidenarrow | |
125 | 2: add d3/f |
|
126 | 2: add d3/f | |
126 | 1: add d2/f outsidenarrow |
|
127 | 1: add d2/f outsidenarrow | |
127 | 0: add d0/f |
|
128 | 0: add d0/f | |
128 | $ hg tracked --removeinclude d0 --force-delete-local-changes |
|
129 | $ hg tracked --removeinclude d0 --force-delete-local-changes | |
129 | comparing with ssh://user@dummy/master |
|
130 | comparing with ssh://user@dummy/master | |
130 | searching for changes |
|
131 | searching for changes | |
131 | looking for local changes to affected paths |
|
132 | looking for local changes to affected paths | |
132 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
133 | The following changeset(s) or their ancestors have local changes not on the remote: | |
133 | * (glob) |
|
134 | * (glob) | |
134 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
135 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
135 | deleting data/d0/f.i (reporevlogstore !) |
|
136 | deleting data/d0/f.i (reporevlogstore !) | |
136 | deleting meta/d0/00manifest.i (tree !) |
|
137 | deleting meta/d0/00manifest.i (tree !) | |
137 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
138 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
138 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
139 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
139 | deleting data/d0/f/index (reposimplestore !) |
|
140 | deleting data/d0/f/index (reposimplestore !) | |
140 |
|
141 | |||
141 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
142 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
142 | 7: local change to d3 |
|
143 | 7: local change to d3 | |
143 | 5: add d10/f outsidenarrow |
|
144 | 5: add d10/f outsidenarrow | |
144 | 4: add d6/f |
|
145 | 4: add d6/f | |
145 | 3: add d5/f outsidenarrow |
|
146 | 3: add d5/f outsidenarrow | |
146 | 2: add d3/f |
|
147 | 2: add d3/f | |
147 | 1: add d2/f outsidenarrow |
|
148 | 1: add d2/f outsidenarrow | |
148 | 0: add d0/f outsidenarrow |
|
149 | 0: add d0/f outsidenarrow | |
149 | Can restore stripped local changes after widening |
|
150 | Can restore stripped local changes after widening | |
150 | $ hg tracked --addinclude d0 -q |
|
151 | $ hg tracked --addinclude d0 -q | |
151 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q |
|
152 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q | |
152 | $ hg --hidden co -r 'desc("local change to d0")' -q |
|
153 | $ hg --hidden co -r 'desc("local change to d0")' -q | |
153 | $ cat d0/f |
|
154 | $ cat d0/f | |
154 | 0 |
|
155 | 0 | |
155 | local change |
|
156 | local change | |
156 | Pruned commits affecting removed paths should not prevent narrowing |
|
157 | Pruned commits affecting removed paths should not prevent narrowing | |
157 | $ hg co '.^' |
|
158 | $ hg co '.^' | |
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
159 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` |
|
160 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` | |
160 | 1 new obsolescence markers |
|
161 | 1 new obsolescence markers | |
161 | obsoleted 1 changesets |
|
162 | obsoleted 1 changesets | |
162 | $ hg tracked --removeinclude d0 |
|
163 | $ hg tracked --removeinclude d0 | |
163 | comparing with ssh://user@dummy/master |
|
164 | comparing with ssh://user@dummy/master | |
164 | searching for changes |
|
165 | searching for changes | |
165 | looking for local changes to affected paths |
|
166 | looking for local changes to affected paths | |
166 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
167 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
167 | deleting data/d0/f.i (reporevlogstore !) |
|
168 | deleting data/d0/f.i (reporevlogstore !) | |
168 | deleting meta/d0/00manifest.i (tree !) |
|
169 | deleting meta/d0/00manifest.i (tree !) | |
169 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
170 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
170 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
171 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
171 | deleting data/d0/f/index (reposimplestore !) |
|
172 | deleting data/d0/f/index (reposimplestore !) | |
172 |
|
173 | |||
173 | Updates off of stripped commit if necessary |
|
174 | Updates off of stripped commit if necessary | |
174 | $ hg co -r 'desc("local change to d3")' -q |
|
175 | $ hg co -r 'desc("local change to d3")' -q | |
175 | $ echo local change >> d6/f |
|
176 | $ echo local change >> d6/f | |
176 | $ hg ci -m 'local change to d6' |
|
177 | $ hg ci -m 'local change to d6' | |
177 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
178 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
178 | comparing with ssh://user@dummy/master |
|
179 | comparing with ssh://user@dummy/master | |
179 | searching for changes |
|
180 | searching for changes | |
180 | looking for local changes to affected paths |
|
181 | looking for local changes to affected paths | |
181 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
182 | The following changeset(s) or their ancestors have local changes not on the remote: | |
182 | * (glob) |
|
183 | * (glob) | |
183 | * (glob) |
|
184 | * (glob) | |
184 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
185 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
185 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
186 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
186 | deleting data/d3/f.i (reporevlogstore !) |
|
187 | deleting data/d3/f.i (reporevlogstore !) | |
187 | deleting meta/d3/00manifest.i (tree !) |
|
188 | deleting meta/d3/00manifest.i (tree !) | |
188 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
189 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
189 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) |
|
190 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) | |
190 | deleting data/d3/f/index (reposimplestore !) |
|
191 | deleting data/d3/f/index (reposimplestore !) | |
191 | $ hg log -T '{desc}\n' -r . |
|
192 | $ hg log -T '{desc}\n' -r . | |
192 | add d10/f |
|
193 | add d10/f | |
193 | Updates to nullid if necessary |
|
194 | Updates to nullid if necessary | |
194 | $ hg tracked --addinclude d3 -q |
|
195 | $ hg tracked --addinclude d3 -q | |
195 | $ hg co null -q |
|
196 | $ hg co null -q | |
196 | $ mkdir d3 |
|
197 | $ mkdir d3 | |
197 | $ echo local change > d3/f |
|
198 | $ echo local change > d3/f | |
198 | $ hg add d3/f |
|
199 | $ hg add d3/f | |
199 | $ hg ci -m 'local change to d3' |
|
200 | $ hg ci -m 'local change to d3' | |
200 | created new head |
|
201 | created new head | |
201 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
202 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
202 | comparing with ssh://user@dummy/master |
|
203 | comparing with ssh://user@dummy/master | |
203 | searching for changes |
|
204 | searching for changes | |
204 | looking for local changes to affected paths |
|
205 | looking for local changes to affected paths | |
205 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
206 | The following changeset(s) or their ancestors have local changes not on the remote: | |
206 | * (glob) |
|
207 | * (glob) | |
207 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
208 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
208 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
209 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
209 | deleting data/d3/f.i (reporevlogstore !) |
|
210 | deleting data/d3/f.i (reporevlogstore !) | |
210 | deleting meta/d3/00manifest.i (tree !) |
|
211 | deleting meta/d3/00manifest.i (tree !) | |
211 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
212 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
212 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) |
|
213 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) | |
213 | deleting data/d3/f/index (reposimplestore !) |
|
214 | deleting data/d3/f/index (reposimplestore !) | |
214 | $ hg id |
|
215 | $ hg id | |
215 | 000000000000 |
|
216 | 000000000000 | |
216 | $ cd .. |
|
217 | $ cd .. | |
217 |
|
218 | |||
218 | Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does) |
|
219 | Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does) | |
219 | $ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q |
|
220 | $ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q | |
220 | $ cd narrow-obsmarkers |
|
221 | $ cd narrow-obsmarkers | |
221 | $ echo a >> d0/f2 |
|
222 | $ echo a >> d0/f2 | |
222 | $ hg add d0/f2 |
|
223 | $ hg add d0/f2 | |
223 | $ hg ci -m 'modify d0/' |
|
224 | $ hg ci -m 'modify d0/' | |
224 | $ echo a >> d3/f2 |
|
225 | $ echo a >> d3/f2 | |
225 | $ hg add d3/f2 |
|
226 | $ hg add d3/f2 | |
226 | $ hg commit --amend -m 'modify d0/ and d3/' |
|
227 | $ hg commit --amend -m 'modify d0/ and d3/' | |
227 | $ hg log -T "{rev}: {desc}\n" |
|
228 | $ hg log -T "{rev}: {desc}\n" | |
228 | 5: modify d0/ and d3/ |
|
229 | 5: modify d0/ and d3/ | |
229 | 3: add d10/f |
|
230 | 3: add d10/f | |
230 | 2: add d3/f |
|
231 | 2: add d3/f | |
231 | 1: add d2/f |
|
232 | 1: add d2/f | |
232 | 0: add d0/f |
|
233 | 0: add d0/f | |
233 | $ hg tracked --removeinclude d3 --force-delete-local-changes -q |
|
234 | $ hg tracked --removeinclude d3 --force-delete-local-changes -q | |
234 | $ hg log -T "{rev}: {desc}\n" |
|
235 | $ hg log -T "{rev}: {desc}\n" | |
235 | 3: add d10/f |
|
236 | 3: add d10/f | |
236 | 2: add d3/f |
|
237 | 2: add d3/f | |
237 | 1: add d2/f |
|
238 | 1: add d2/f | |
238 | 0: add d0/f |
|
239 | 0: add d0/f | |
239 | $ cd .. |
|
240 | $ cd .. | |
240 |
|
241 | |||
241 | Widening doesn't lose bookmarks |
|
242 | Widening doesn't lose bookmarks | |
242 | $ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q |
|
243 | $ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q | |
243 | $ cd widen-bookmarks |
|
244 | $ cd widen-bookmarks | |
244 | $ hg bookmark my-bookmark |
|
245 | $ hg bookmark my-bookmark | |
245 | $ hg log -T "{rev}: {desc} {bookmarks}\n" |
|
246 | $ hg log -T "{rev}: {desc} {bookmarks}\n" | |
246 | 1: add d10/f my-bookmark |
|
247 | 1: add d10/f my-bookmark | |
247 | 0: add d0/f |
|
248 | 0: add d0/f | |
248 | $ hg tracked --addinclude d3 -q |
|
249 | $ hg tracked --addinclude d3 -q | |
249 | $ hg log -T "{rev}: {desc} {bookmarks}\n" |
|
250 | $ hg log -T "{rev}: {desc} {bookmarks}\n" | |
250 | 3: add d10/f my-bookmark |
|
251 | 3: add d10/f my-bookmark | |
251 | 2: add d3/f |
|
252 | 2: add d3/f | |
252 | 1: add d2/f |
|
253 | 1: add d2/f | |
253 | 0: add d0/f |
|
254 | 0: add d0/f | |
254 | $ cd .. |
|
255 | $ cd .. | |
255 |
|
256 | |||
256 | Can remove last include, making repo empty |
|
257 | Can remove last include, making repo empty | |
257 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 |
|
258 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 | |
258 | adding changesets |
|
259 | adding changesets | |
259 | adding manifests |
|
260 | adding manifests | |
260 | adding file changes |
|
261 | adding file changes | |
261 | added 2 changesets with 1 changes to 1 files |
|
262 | added 2 changesets with 1 changes to 1 files | |
262 | new changesets *:* (glob) |
|
263 | new changesets *:* (glob) | |
263 | updating to branch default |
|
264 | updating to branch default | |
264 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
265 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
265 | $ cd narrow-empty |
|
266 | $ cd narrow-empty | |
266 | $ hg tracked --removeinclude d0 |
|
267 | $ hg tracked --removeinclude d0 | |
267 | comparing with ssh://user@dummy/master |
|
268 | comparing with ssh://user@dummy/master | |
268 | searching for changes |
|
269 | searching for changes | |
269 | looking for local changes to affected paths |
|
270 | looking for local changes to affected paths | |
270 | deleting data/d0/f.i (reporevlogstore !) |
|
271 | deleting data/d0/f.i (reporevlogstore !) | |
271 | deleting meta/d0/00manifest.i (tree !) |
|
272 | deleting meta/d0/00manifest.i (tree !) | |
272 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
273 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
273 | deleting data/d0/f/index (reposimplestore !) |
|
274 | deleting data/d0/f/index (reposimplestore !) | |
274 | $ hg tracked |
|
275 | $ hg tracked | |
275 | $ hg files |
|
276 | $ hg files | |
276 | [1] |
|
277 | [1] | |
277 | $ test -d d0 |
|
278 | $ test -d d0 | |
278 | [1] |
|
279 | [1] | |
279 | Do some work in the empty clone |
|
280 | Do some work in the empty clone | |
280 | $ hg diff --change . |
|
281 | $ hg diff --change . | |
281 | $ hg branch foo |
|
282 | $ hg branch foo | |
282 | marked working directory as branch foo |
|
283 | marked working directory as branch foo | |
283 | (branches are permanent and global, did you want a bookmark?) |
|
284 | (branches are permanent and global, did you want a bookmark?) | |
284 | $ hg ci -m empty |
|
285 | $ hg ci -m empty | |
285 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
286 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
286 | 2: empty |
|
287 | 2: empty | |
287 | 1: add d5/f outsidenarrow |
|
288 | 1: add d5/f outsidenarrow | |
288 | 0: add d0/f outsidenarrow |
|
289 | 0: add d0/f outsidenarrow | |
289 | $ hg pull -q |
|
290 | $ hg pull -q | |
290 | Can widen the empty clone |
|
291 | Can widen the empty clone | |
291 | $ hg tracked --addinclude d0 |
|
292 | $ hg tracked --addinclude d0 | |
292 | comparing with ssh://user@dummy/master |
|
293 | comparing with ssh://user@dummy/master | |
293 | searching for changes |
|
294 | searching for changes | |
294 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) |
|
295 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) | |
295 | adding changesets |
|
296 | adding changesets | |
296 | adding manifests |
|
297 | adding manifests | |
297 | adding file changes |
|
298 | adding file changes | |
298 | added 3 changesets with 1 changes to 1 files |
|
299 | added 3 changesets with 1 changes to 1 files | |
299 | $ hg tracked |
|
300 | $ hg tracked | |
300 | I path:d0 |
|
301 | I path:d0 | |
301 | $ hg files |
|
302 | $ hg files | |
302 | d0/f |
|
303 | d0/f | |
303 | $ find * |
|
304 | $ find * | |
304 | d0 |
|
305 | d0 | |
305 | d0/f |
|
306 | d0/f | |
306 | $ cd .. |
|
307 | $ cd .. | |
307 |
|
308 | |||
308 | TODO(martinvonz): test including e.g. d3/g and then removing it once |
|
309 | TODO(martinvonz): test including e.g. d3/g and then removing it once | |
309 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed |
|
310 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed | |
310 |
|
311 | |||
311 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 |
|
312 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 | |
312 | requesting all changes |
|
313 | requesting all changes | |
313 | adding changesets |
|
314 | adding changesets | |
314 | adding manifests |
|
315 | adding manifests | |
315 | adding file changes |
|
316 | adding file changes | |
316 | added 8 changesets with 4 changes to 4 files |
|
317 | added 8 changesets with 4 changes to 4 files | |
317 | new changesets *:* (glob) |
|
318 | new changesets *:* (glob) | |
318 | updating to branch default |
|
319 | updating to branch default | |
319 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
320 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
320 | $ cd narrow |
|
321 | $ cd narrow | |
321 | $ hg tracked |
|
322 | $ hg tracked | |
322 | I path:d0 |
|
323 | I path:d0 | |
323 | I path:d3 |
|
324 | I path:d3 | |
324 | I path:d6 |
|
325 | I path:d6 | |
325 | I path:d9 |
|
326 | I path:d9 | |
326 | $ hg tracked --removeinclude d6 |
|
327 | $ hg tracked --removeinclude d6 | |
327 | comparing with ssh://user@dummy/master |
|
328 | comparing with ssh://user@dummy/master | |
328 | searching for changes |
|
329 | searching for changes | |
329 | looking for local changes to affected paths |
|
330 | looking for local changes to affected paths | |
330 | deleting data/d6/f.i (reporevlogstore !) |
|
331 | deleting data/d6/f.i (reporevlogstore !) | |
331 | deleting meta/d6/00manifest.i (tree !) |
|
332 | deleting meta/d6/00manifest.i (tree !) | |
332 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) |
|
333 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) | |
333 | deleting data/d6/f/index (reposimplestore !) |
|
334 | deleting data/d6/f/index (reposimplestore !) | |
334 | $ hg tracked |
|
335 | $ hg tracked | |
335 | I path:d0 |
|
336 | I path:d0 | |
336 | I path:d3 |
|
337 | I path:d3 | |
337 | I path:d9 |
|
338 | I path:d9 | |
338 | #if repofncache |
|
339 | #if repofncache | |
339 | $ hg debugrebuildfncache |
|
340 | $ hg debugrebuildfncache | |
340 | fncache already up to date |
|
341 | fncache already up to date | |
341 | #endif |
|
342 | #endif | |
342 | $ find * |
|
343 | $ find * | |
343 | d0 |
|
344 | d0 | |
344 | d0/f |
|
345 | d0/f | |
345 | d3 |
|
346 | d3 | |
346 | d3/f |
|
347 | d3/f | |
347 | d9 |
|
348 | d9 | |
348 | d9/f |
|
349 | d9/f | |
349 | $ hg verify -q |
|
350 | $ hg verify -q | |
350 | $ hg tracked --addexclude d3/f |
|
351 | $ hg tracked --addexclude d3/f | |
351 | comparing with ssh://user@dummy/master |
|
352 | comparing with ssh://user@dummy/master | |
352 | searching for changes |
|
353 | searching for changes | |
353 | looking for local changes to affected paths |
|
354 | looking for local changes to affected paths | |
354 | deleting data/d3/f.i (reporevlogstore !) |
|
355 | deleting data/d3/f.i (reporevlogstore !) | |
355 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
356 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
356 | deleting data/d3/f/index (reposimplestore !) |
|
357 | deleting data/d3/f/index (reposimplestore !) | |
357 | $ hg tracked |
|
358 | $ hg tracked | |
358 | I path:d0 |
|
359 | I path:d0 | |
359 | I path:d3 |
|
360 | I path:d3 | |
360 | I path:d9 |
|
361 | I path:d9 | |
361 | X path:d3/f |
|
362 | X path:d3/f | |
362 | #if repofncache |
|
363 | #if repofncache | |
363 | $ hg debugrebuildfncache |
|
364 | $ hg debugrebuildfncache | |
364 | fncache already up to date |
|
365 | fncache already up to date | |
365 | #endif |
|
366 | #endif | |
366 | $ find * |
|
367 | $ find * | |
367 | d0 |
|
368 | d0 | |
368 | d0/f |
|
369 | d0/f | |
369 | d9 |
|
370 | d9 | |
370 | d9/f |
|
371 | d9/f | |
371 | $ hg verify -q |
|
372 | $ hg verify -q | |
372 | $ hg tracked --addexclude d0 |
|
373 | $ hg tracked --addexclude d0 | |
373 | comparing with ssh://user@dummy/master |
|
374 | comparing with ssh://user@dummy/master | |
374 | searching for changes |
|
375 | searching for changes | |
375 | looking for local changes to affected paths |
|
376 | looking for local changes to affected paths | |
376 | deleting data/d0/f.i (reporevlogstore !) |
|
377 | deleting data/d0/f.i (reporevlogstore !) | |
377 | deleting meta/d0/00manifest.i (tree !) |
|
378 | deleting meta/d0/00manifest.i (tree !) | |
378 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
379 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
379 | deleting data/d0/f/index (reposimplestore !) |
|
380 | deleting data/d0/f/index (reposimplestore !) | |
380 | $ hg tracked |
|
381 | $ hg tracked | |
381 | I path:d3 |
|
382 | I path:d3 | |
382 | I path:d9 |
|
383 | I path:d9 | |
383 | X path:d0 |
|
384 | X path:d0 | |
384 | X path:d3/f |
|
385 | X path:d3/f | |
385 | #if repofncache |
|
386 | #if repofncache | |
386 | $ hg debugrebuildfncache |
|
387 | $ hg debugrebuildfncache | |
387 | fncache already up to date |
|
388 | fncache already up to date | |
388 | #endif |
|
389 | #endif | |
389 | $ find * |
|
390 | $ find * | |
390 | d9 |
|
391 | d9 | |
391 | d9/f |
|
392 | d9/f | |
392 |
|
393 | |||
393 | Make a 15 of changes to d9 to test the path without --verbose |
|
394 | Make a 15 of changes to d9 to test the path without --verbose | |
394 | (Note: using regexes instead of "* (glob)" because if the test fails, it |
|
395 | (Note: using regexes instead of "* (glob)" because if the test fails, it | |
395 | produces more sensible diffs) |
|
396 | produces more sensible diffs) | |
396 | $ hg tracked |
|
397 | $ hg tracked | |
397 | I path:d3 |
|
398 | I path:d3 | |
398 | I path:d9 |
|
399 | I path:d9 | |
399 | X path:d0 |
|
400 | X path:d0 | |
400 | X path:d3/f |
|
401 | X path:d3/f | |
401 | $ for x in `$TESTDIR/seq.py 1 15` |
|
402 | $ for x in `$TESTDIR/seq.py 1 15` | |
402 | > do |
|
403 | > do | |
403 | > echo local change >> d9/f |
|
404 | > echo local change >> d9/f | |
404 | > hg commit -m "change $x to d9/f" |
|
405 | > hg commit -m "change $x to d9/f" | |
405 | > done |
|
406 | > done | |
406 | $ hg tracked --removeinclude d9 |
|
407 | $ hg tracked --removeinclude d9 | |
407 | comparing with ssh://user@dummy/master |
|
408 | comparing with ssh://user@dummy/master | |
408 | searching for changes |
|
409 | searching for changes | |
409 | looking for local changes to affected paths |
|
410 | looking for local changes to affected paths | |
410 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
411 | The following changeset(s) or their ancestors have local changes not on the remote: | |
411 | ^[0-9a-f]{12}$ (re) |
|
412 | ^[0-9a-f]{12}$ (re) | |
412 | ^[0-9a-f]{12}$ (re) |
|
413 | ^[0-9a-f]{12}$ (re) | |
413 | ^[0-9a-f]{12}$ (re) |
|
414 | ^[0-9a-f]{12}$ (re) | |
414 | ^[0-9a-f]{12}$ (re) |
|
415 | ^[0-9a-f]{12}$ (re) | |
415 | ^[0-9a-f]{12}$ (re) |
|
416 | ^[0-9a-f]{12}$ (re) | |
416 | ^[0-9a-f]{12}$ (re) |
|
417 | ^[0-9a-f]{12}$ (re) | |
417 | ^[0-9a-f]{12}$ (re) |
|
418 | ^[0-9a-f]{12}$ (re) | |
418 | ^[0-9a-f]{12}$ (re) |
|
419 | ^[0-9a-f]{12}$ (re) | |
419 | ^[0-9a-f]{12}$ (re) |
|
420 | ^[0-9a-f]{12}$ (re) | |
420 | ^[0-9a-f]{12}$ (re) |
|
421 | ^[0-9a-f]{12}$ (re) | |
421 | ...and 5 more, use --verbose to list all |
|
422 | ...and 5 more, use --verbose to list all | |
422 | abort: local changes found |
|
423 | abort: local changes found | |
423 | (use --force-delete-local-changes to ignore) |
|
424 | (use --force-delete-local-changes to ignore) | |
424 | [255] |
|
425 | [255] | |
425 | Now test it *with* verbose. |
|
426 | Now test it *with* verbose. | |
426 | $ hg tracked --removeinclude d9 --verbose |
|
427 | $ hg tracked --removeinclude d9 --verbose | |
427 | comparing with ssh://user@dummy/master |
|
428 | comparing with ssh://user@dummy/master | |
428 | searching for changes |
|
429 | searching for changes | |
429 | looking for local changes to affected paths |
|
430 | looking for local changes to affected paths | |
430 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
431 | The following changeset(s) or their ancestors have local changes not on the remote: | |
431 | ^[0-9a-f]{12}$ (re) |
|
432 | ^[0-9a-f]{12}$ (re) | |
432 | ^[0-9a-f]{12}$ (re) |
|
433 | ^[0-9a-f]{12}$ (re) | |
433 | ^[0-9a-f]{12}$ (re) |
|
434 | ^[0-9a-f]{12}$ (re) | |
434 | ^[0-9a-f]{12}$ (re) |
|
435 | ^[0-9a-f]{12}$ (re) | |
435 | ^[0-9a-f]{12}$ (re) |
|
436 | ^[0-9a-f]{12}$ (re) | |
436 | ^[0-9a-f]{12}$ (re) |
|
437 | ^[0-9a-f]{12}$ (re) | |
437 | ^[0-9a-f]{12}$ (re) |
|
438 | ^[0-9a-f]{12}$ (re) | |
438 | ^[0-9a-f]{12}$ (re) |
|
439 | ^[0-9a-f]{12}$ (re) | |
439 | ^[0-9a-f]{12}$ (re) |
|
440 | ^[0-9a-f]{12}$ (re) | |
440 | ^[0-9a-f]{12}$ (re) |
|
441 | ^[0-9a-f]{12}$ (re) | |
441 | ^[0-9a-f]{12}$ (re) |
|
442 | ^[0-9a-f]{12}$ (re) | |
442 | ^[0-9a-f]{12}$ (re) |
|
443 | ^[0-9a-f]{12}$ (re) | |
443 | ^[0-9a-f]{12}$ (re) |
|
444 | ^[0-9a-f]{12}$ (re) | |
444 | ^[0-9a-f]{12}$ (re) |
|
445 | ^[0-9a-f]{12}$ (re) | |
445 | ^[0-9a-f]{12}$ (re) |
|
446 | ^[0-9a-f]{12}$ (re) | |
446 | abort: local changes found |
|
447 | abort: local changes found | |
447 | (use --force-delete-local-changes to ignore) |
|
448 | (use --force-delete-local-changes to ignore) | |
448 | [255] |
|
449 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now