Show More
@@ -1,54 +1,86 b'' | |||||
1 | # generate proper file state to test working copy behavior |
|
1 | # Helper script used for generating history and working copy files and content. | |
|
2 | # The file's name corresponds to its history. The number of changesets can | |||
|
3 | # be specified on the command line. With 2 changesets, files with names like | |||
|
4 | # content1_content2_content1-untracked are generated. The first two filename | |||
|
5 | # segments describe the contents in the two changesets. The third segment | |||
|
6 | # ("content1-untracked") describes the state in the working copy, i.e. | |||
|
7 | # the file has content "content1" and is untracked (since it was previously | |||
|
8 | # tracked, it has been forgotten). | |||
|
9 | # | |||
|
10 | # This script generates the filenames and their content, but it's up to the | |||
|
11 | # caller to tell hg about the state. | |||
|
12 | # | |||
|
13 | # There are two subcommands: | |||
|
14 | # filelist <numchangesets> | |||
|
15 | # state <numchangesets> (<changeset>|wc) | |||
|
16 | # | |||
|
17 | # Typical usage: | |||
|
18 | # | |||
|
19 | # $ python $TESTDIR/generate-working-copy-states.py state 2 1 | |||
|
20 | # $ hg addremove --similarity 0 | |||
|
21 | # $ hg commit -m 'first' | |||
|
22 | # | |||
|
23 | # $ python $TESTDIR/generate-working-copy-states.py state 2 1 | |||
|
24 | # $ hg addremove --similarity 0 | |||
|
25 | # $ hg commit -m 'second' | |||
|
26 | # | |||
|
27 | # $ python $TESTDIR/generate-working-copy-states.py state 2 wc | |||
|
28 | # $ hg addremove --similarity 0 | |||
|
29 | # $ hg forget *_*_*-untracked | |||
|
30 | # $ rm *_*_missing-* | |||
|
31 | ||||
2 | import sys |
|
32 | import sys | |
3 | import os |
|
33 | import os | |
4 |
|
34 | |||
5 | # Generates pairs of (filename, contents), where 'contents' is a list |
|
35 | # Generates pairs of (filename, contents), where 'contents' is a list | |
6 | # describing the file's content at each revision (or in the working copy). |
|
36 | # describing the file's content at each revision (or in the working copy). | |
7 | # At each revision, it is either None or the file's actual content. When not |
|
37 | # At each revision, it is either None or the file's actual content. When not | |
8 | # None, it may be either new content or the same content as an earlier |
|
38 | # None, it may be either new content or the same content as an earlier | |
9 | # revisions, so all of (modified,clean,added,removed) can be tested. |
|
39 | # revisions, so all of (modified,clean,added,removed) can be tested. | |
10 | def generatestates(maxchangesets, parentcontents): |
|
40 | def generatestates(maxchangesets, parentcontents): | |
11 | depth = len(parentcontents) |
|
41 | depth = len(parentcontents) | |
12 | if depth == maxchangesets + 1: |
|
42 | if depth == maxchangesets + 1: | |
13 | for tracked in ('untracked', 'tracked'): |
|
43 | for tracked in ('untracked', 'tracked'): | |
14 | filename = "_".join([(content is None and 'missing' or content) for |
|
44 | filename = "_".join([(content is None and 'missing' or content) for | |
15 | content in parentcontents]) + "-" + tracked |
|
45 | content in parentcontents]) + "-" + tracked | |
16 | yield (filename, parentcontents) |
|
46 | yield (filename, parentcontents) | |
17 | else: |
|
47 | else: | |
18 | for content in (set([None, 'content' + str(depth + 1)]) | |
|
48 | for content in (set([None, 'content' + str(depth + 1)]) | | |
19 | set(parentcontents)): |
|
49 | set(parentcontents)): | |
20 | for combination in generatestates(maxchangesets, |
|
50 | for combination in generatestates(maxchangesets, | |
21 | parentcontents + [content]): |
|
51 | parentcontents + [content]): | |
22 | yield combination |
|
52 | yield combination | |
23 |
|
53 | |||
24 | # sort to make sure we have stable output |
|
54 | # retrieve the command line arguments | |
25 | combinations = sorted(generatestates(2, [])) |
|
55 | target = sys.argv[1] | |
|
56 | maxchangesets = int(sys.argv[2]) | |||
|
57 | if target == 'state': | |||
|
58 | depth = sys.argv[3] | |||
26 |
|
59 | |||
27 | # retrieve the state we must generate |
|
60 | # sort to make sure we have stable output | |
28 | target = sys.argv[1] |
|
61 | combinations = sorted(generatestates(maxchangesets, [])) | |
29 |
|
62 | |||
30 | # compute file content |
|
63 | # compute file content | |
31 | content = [] |
|
64 | content = [] | |
32 |
for filename, |
|
65 | for filename, states in combinations: | |
33 | if target == 'filelist': |
|
66 | if target == 'filelist': | |
34 | print filename |
|
67 | print filename | |
35 |
elif target == ' |
|
68 | elif target == 'state': | |
36 | content.append((filename, base)) |
|
69 | if depth == 'wc': | |
37 | elif target == 'parent': |
|
70 | # Make sure there is content so the file gets written and can be | |
38 | content.append((filename, parent)) |
|
71 | # tracked. It will be deleted outside of this script. | |
39 | elif target == 'wc': |
|
72 | content.append((filename, states[maxchangesets] or 'TOBEDELETED')) | |
40 | # Make sure there is content so the file gets written and can be |
|
73 | else: | |
41 | # tracked. It will be deleted outside of this script. |
|
74 | content.append((filename, states[int(depth) - 1])) | |
42 | content.append((filename, wcc or 'TOBEDELETED')) |
|
|||
43 | else: |
|
75 | else: | |
44 | print >> sys.stderr, "unknown target:", target |
|
76 | print >> sys.stderr, "unknown target:", target | |
45 | sys.exit(1) |
|
77 | sys.exit(1) | |
46 |
|
78 | |||
47 | # write actual content |
|
79 | # write actual content | |
48 | for filename, data in content: |
|
80 | for filename, data in content: | |
49 | if data is not None: |
|
81 | if data is not None: | |
50 | f = open(filename, 'w') |
|
82 | f = open(filename, 'w') | |
51 | f.write(data + '\n') |
|
83 | f.write(data + '\n') | |
52 | f.close() |
|
84 | f.close() | |
53 | elif os.path.exists(filename): |
|
85 | elif os.path.exists(filename): | |
54 | os.remove(filename) |
|
86 | os.remove(filename) |
@@ -1,1014 +1,1014 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 | $ echo 123 > a |
|
3 | $ echo 123 > a | |
4 | $ echo 123 > c |
|
4 | $ echo 123 > c | |
5 | $ echo 123 > e |
|
5 | $ echo 123 > e | |
6 | $ hg add a c e |
|
6 | $ hg add a c e | |
7 | $ hg commit -m "first" a c e |
|
7 | $ hg commit -m "first" a c e | |
8 |
|
8 | |||
9 | nothing changed |
|
9 | nothing changed | |
10 |
|
10 | |||
11 | $ hg revert |
|
11 | $ hg revert | |
12 | abort: no files or directories specified |
|
12 | abort: no files or directories specified | |
13 | (use --all to revert all files) |
|
13 | (use --all to revert all files) | |
14 | [255] |
|
14 | [255] | |
15 | $ hg revert --all |
|
15 | $ hg revert --all | |
16 |
|
16 | |||
17 | Introduce some changes and revert them |
|
17 | Introduce some changes and revert them | |
18 | -------------------------------------- |
|
18 | -------------------------------------- | |
19 |
|
19 | |||
20 | $ echo 123 > b |
|
20 | $ echo 123 > b | |
21 |
|
21 | |||
22 | $ hg status |
|
22 | $ hg status | |
23 | ? b |
|
23 | ? b | |
24 | $ echo 12 > c |
|
24 | $ echo 12 > c | |
25 |
|
25 | |||
26 | $ hg status |
|
26 | $ hg status | |
27 | M c |
|
27 | M c | |
28 | ? b |
|
28 | ? b | |
29 | $ hg add b |
|
29 | $ hg add b | |
30 |
|
30 | |||
31 | $ hg status |
|
31 | $ hg status | |
32 | M c |
|
32 | M c | |
33 | A b |
|
33 | A b | |
34 | $ hg rm a |
|
34 | $ hg rm a | |
35 |
|
35 | |||
36 | $ hg status |
|
36 | $ hg status | |
37 | M c |
|
37 | M c | |
38 | A b |
|
38 | A b | |
39 | R a |
|
39 | R a | |
40 |
|
40 | |||
41 | revert removal of a file |
|
41 | revert removal of a file | |
42 |
|
42 | |||
43 | $ hg revert a |
|
43 | $ hg revert a | |
44 | $ hg status |
|
44 | $ hg status | |
45 | M c |
|
45 | M c | |
46 | A b |
|
46 | A b | |
47 |
|
47 | |||
48 | revert addition of a file |
|
48 | revert addition of a file | |
49 |
|
49 | |||
50 | $ hg revert b |
|
50 | $ hg revert b | |
51 | $ hg status |
|
51 | $ hg status | |
52 | M c |
|
52 | M c | |
53 | ? b |
|
53 | ? b | |
54 |
|
54 | |||
55 | revert modification of a file (--no-backup) |
|
55 | revert modification of a file (--no-backup) | |
56 |
|
56 | |||
57 | $ hg revert --no-backup c |
|
57 | $ hg revert --no-backup c | |
58 | $ hg status |
|
58 | $ hg status | |
59 | ? b |
|
59 | ? b | |
60 |
|
60 | |||
61 | revert deletion (! status) of a added file |
|
61 | revert deletion (! status) of a added file | |
62 | ------------------------------------------ |
|
62 | ------------------------------------------ | |
63 |
|
63 | |||
64 | $ hg add b |
|
64 | $ hg add b | |
65 |
|
65 | |||
66 | $ hg status b |
|
66 | $ hg status b | |
67 | A b |
|
67 | A b | |
68 | $ rm b |
|
68 | $ rm b | |
69 | $ hg status b |
|
69 | $ hg status b | |
70 | ! b |
|
70 | ! b | |
71 | $ hg revert -v b |
|
71 | $ hg revert -v b | |
72 | forgetting b |
|
72 | forgetting b | |
73 | $ hg status b |
|
73 | $ hg status b | |
74 | b: * (glob) |
|
74 | b: * (glob) | |
75 |
|
75 | |||
76 | $ ls |
|
76 | $ ls | |
77 | a |
|
77 | a | |
78 | c |
|
78 | c | |
79 | e |
|
79 | e | |
80 |
|
80 | |||
81 | Test creation of backup (.orig) files |
|
81 | Test creation of backup (.orig) files | |
82 | ------------------------------------- |
|
82 | ------------------------------------- | |
83 |
|
83 | |||
84 | $ echo z > e |
|
84 | $ echo z > e | |
85 | $ hg revert --all -v |
|
85 | $ hg revert --all -v | |
86 | saving current version of e as e.orig |
|
86 | saving current version of e as e.orig | |
87 | reverting e |
|
87 | reverting e | |
88 |
|
88 | |||
89 | revert on clean file (no change) |
|
89 | revert on clean file (no change) | |
90 | -------------------------------- |
|
90 | -------------------------------- | |
91 |
|
91 | |||
92 | $ hg revert a |
|
92 | $ hg revert a | |
93 | no changes needed to a |
|
93 | no changes needed to a | |
94 |
|
94 | |||
95 | revert on an untracked file |
|
95 | revert on an untracked file | |
96 | --------------------------- |
|
96 | --------------------------- | |
97 |
|
97 | |||
98 | $ echo q > q |
|
98 | $ echo q > q | |
99 | $ hg revert q |
|
99 | $ hg revert q | |
100 | file not managed: q |
|
100 | file not managed: q | |
101 | $ rm q |
|
101 | $ rm q | |
102 |
|
102 | |||
103 | revert on file that does not exists |
|
103 | revert on file that does not exists | |
104 | ----------------------------------- |
|
104 | ----------------------------------- | |
105 |
|
105 | |||
106 | $ hg revert notfound |
|
106 | $ hg revert notfound | |
107 | notfound: no such file in rev 334a9e57682c |
|
107 | notfound: no such file in rev 334a9e57682c | |
108 | $ touch d |
|
108 | $ touch d | |
109 | $ hg add d |
|
109 | $ hg add d | |
110 | $ hg rm a |
|
110 | $ hg rm a | |
111 | $ hg commit -m "second" |
|
111 | $ hg commit -m "second" | |
112 | $ echo z > z |
|
112 | $ echo z > z | |
113 | $ hg add z |
|
113 | $ hg add z | |
114 | $ hg st |
|
114 | $ hg st | |
115 | A z |
|
115 | A z | |
116 | ? e.orig |
|
116 | ? e.orig | |
117 |
|
117 | |||
118 | revert to another revision (--rev) |
|
118 | revert to another revision (--rev) | |
119 | ---------------------------------- |
|
119 | ---------------------------------- | |
120 |
|
120 | |||
121 | $ hg revert --all -r0 |
|
121 | $ hg revert --all -r0 | |
122 | adding a |
|
122 | adding a | |
123 | removing d |
|
123 | removing d | |
124 | forgetting z |
|
124 | forgetting z | |
125 |
|
125 | |||
126 | revert explicitly to parent (--rev) |
|
126 | revert explicitly to parent (--rev) | |
127 | ----------------------------------- |
|
127 | ----------------------------------- | |
128 |
|
128 | |||
129 | $ hg revert --all -rtip |
|
129 | $ hg revert --all -rtip | |
130 | forgetting a |
|
130 | forgetting a | |
131 | undeleting d |
|
131 | undeleting d | |
132 | $ rm a *.orig |
|
132 | $ rm a *.orig | |
133 |
|
133 | |||
134 | revert to another revision (--rev) and exact match |
|
134 | revert to another revision (--rev) and exact match | |
135 | -------------------------------------------------- |
|
135 | -------------------------------------------------- | |
136 |
|
136 | |||
137 | exact match are more silent |
|
137 | exact match are more silent | |
138 |
|
138 | |||
139 | $ hg revert -r0 a |
|
139 | $ hg revert -r0 a | |
140 | $ hg st a |
|
140 | $ hg st a | |
141 | A a |
|
141 | A a | |
142 | $ hg rm d |
|
142 | $ hg rm d | |
143 | $ hg st d |
|
143 | $ hg st d | |
144 | R d |
|
144 | R d | |
145 |
|
145 | |||
146 | should keep d removed |
|
146 | should keep d removed | |
147 |
|
147 | |||
148 | $ hg revert -r0 d |
|
148 | $ hg revert -r0 d | |
149 | no changes needed to d |
|
149 | no changes needed to d | |
150 | $ hg st d |
|
150 | $ hg st d | |
151 | R d |
|
151 | R d | |
152 |
|
152 | |||
153 | $ hg update -C |
|
153 | $ hg update -C | |
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 |
|
155 | |||
156 | revert of exec bit |
|
156 | revert of exec bit | |
157 | ------------------ |
|
157 | ------------------ | |
158 |
|
158 | |||
159 | #if execbit |
|
159 | #if execbit | |
160 | $ chmod +x c |
|
160 | $ chmod +x c | |
161 | $ hg revert --all |
|
161 | $ hg revert --all | |
162 | reverting c |
|
162 | reverting c | |
163 |
|
163 | |||
164 | $ test -x c || echo non-executable |
|
164 | $ test -x c || echo non-executable | |
165 | non-executable |
|
165 | non-executable | |
166 |
|
166 | |||
167 | $ chmod +x c |
|
167 | $ chmod +x c | |
168 | $ hg commit -m exe |
|
168 | $ hg commit -m exe | |
169 |
|
169 | |||
170 | $ chmod -x c |
|
170 | $ chmod -x c | |
171 | $ hg revert --all |
|
171 | $ hg revert --all | |
172 | reverting c |
|
172 | reverting c | |
173 |
|
173 | |||
174 | $ test -x c && echo executable |
|
174 | $ test -x c && echo executable | |
175 | executable |
|
175 | executable | |
176 | #endif |
|
176 | #endif | |
177 |
|
177 | |||
178 | $ cd .. |
|
178 | $ cd .. | |
179 |
|
179 | |||
180 |
|
180 | |||
181 | Issue241: update and revert produces inconsistent repositories |
|
181 | Issue241: update and revert produces inconsistent repositories | |
182 | -------------------------------------------------------------- |
|
182 | -------------------------------------------------------------- | |
183 |
|
183 | |||
184 | $ hg init a |
|
184 | $ hg init a | |
185 | $ cd a |
|
185 | $ cd a | |
186 | $ echo a >> a |
|
186 | $ echo a >> a | |
187 | $ hg commit -A -d '1 0' -m a |
|
187 | $ hg commit -A -d '1 0' -m a | |
188 | adding a |
|
188 | adding a | |
189 | $ echo a >> a |
|
189 | $ echo a >> a | |
190 | $ hg commit -d '2 0' -m a |
|
190 | $ hg commit -d '2 0' -m a | |
191 | $ hg update 0 |
|
191 | $ hg update 0 | |
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
193 | $ mkdir b |
|
193 | $ mkdir b | |
194 | $ echo b > b/b |
|
194 | $ echo b > b/b | |
195 |
|
195 | |||
196 | call `hg revert` with no file specified |
|
196 | call `hg revert` with no file specified | |
197 | --------------------------------------- |
|
197 | --------------------------------------- | |
198 |
|
198 | |||
199 | $ hg revert -rtip |
|
199 | $ hg revert -rtip | |
200 | abort: no files or directories specified |
|
200 | abort: no files or directories specified | |
201 | (use --all to revert all files, or 'hg update 1' to update) |
|
201 | (use --all to revert all files, or 'hg update 1' to update) | |
202 | [255] |
|
202 | [255] | |
203 |
|
203 | |||
204 | call `hg revert` with --all |
|
204 | call `hg revert` with --all | |
205 | --------------------------- |
|
205 | --------------------------- | |
206 |
|
206 | |||
207 | $ hg revert --all -rtip |
|
207 | $ hg revert --all -rtip | |
208 | reverting a |
|
208 | reverting a | |
209 |
|
209 | |||
210 |
|
210 | |||
211 | Issue332: confusing message when reverting directory |
|
211 | Issue332: confusing message when reverting directory | |
212 | ---------------------------------------------------- |
|
212 | ---------------------------------------------------- | |
213 |
|
213 | |||
214 | $ hg ci -A -m b |
|
214 | $ hg ci -A -m b | |
215 | adding b/b |
|
215 | adding b/b | |
216 | created new head |
|
216 | created new head | |
217 | $ echo foobar > b/b |
|
217 | $ echo foobar > b/b | |
218 | $ mkdir newdir |
|
218 | $ mkdir newdir | |
219 | $ echo foo > newdir/newfile |
|
219 | $ echo foo > newdir/newfile | |
220 | $ hg add newdir/newfile |
|
220 | $ hg add newdir/newfile | |
221 | $ hg revert b newdir |
|
221 | $ hg revert b newdir | |
222 | reverting b/b (glob) |
|
222 | reverting b/b (glob) | |
223 | forgetting newdir/newfile (glob) |
|
223 | forgetting newdir/newfile (glob) | |
224 | $ echo foobar > b/b |
|
224 | $ echo foobar > b/b | |
225 | $ hg revert . |
|
225 | $ hg revert . | |
226 | reverting b/b (glob) |
|
226 | reverting b/b (glob) | |
227 |
|
227 | |||
228 |
|
228 | |||
229 | reverting a rename target should revert the source |
|
229 | reverting a rename target should revert the source | |
230 | -------------------------------------------------- |
|
230 | -------------------------------------------------- | |
231 |
|
231 | |||
232 | $ hg mv a newa |
|
232 | $ hg mv a newa | |
233 | $ hg revert newa |
|
233 | $ hg revert newa | |
234 | $ hg st a newa |
|
234 | $ hg st a newa | |
235 | ? newa |
|
235 | ? newa | |
236 |
|
236 | |||
237 | Also true for move overwriting an existing file |
|
237 | Also true for move overwriting an existing file | |
238 |
|
238 | |||
239 | $ hg mv --force a b/b |
|
239 | $ hg mv --force a b/b | |
240 | $ hg revert b/b |
|
240 | $ hg revert b/b | |
241 | $ hg status a b/b |
|
241 | $ hg status a b/b | |
242 |
|
242 | |||
243 | $ cd .. |
|
243 | $ cd .. | |
244 |
|
244 | |||
245 | $ hg init ignored |
|
245 | $ hg init ignored | |
246 | $ cd ignored |
|
246 | $ cd ignored | |
247 | $ echo '^ignored$' > .hgignore |
|
247 | $ echo '^ignored$' > .hgignore | |
248 | $ echo '^ignoreddir$' >> .hgignore |
|
248 | $ echo '^ignoreddir$' >> .hgignore | |
249 | $ echo '^removed$' >> .hgignore |
|
249 | $ echo '^removed$' >> .hgignore | |
250 |
|
250 | |||
251 | $ mkdir ignoreddir |
|
251 | $ mkdir ignoreddir | |
252 | $ touch ignoreddir/file |
|
252 | $ touch ignoreddir/file | |
253 | $ touch ignoreddir/removed |
|
253 | $ touch ignoreddir/removed | |
254 | $ touch ignored |
|
254 | $ touch ignored | |
255 | $ touch removed |
|
255 | $ touch removed | |
256 |
|
256 | |||
257 | 4 ignored files (we will add/commit everything) |
|
257 | 4 ignored files (we will add/commit everything) | |
258 |
|
258 | |||
259 | $ hg st -A -X .hgignore |
|
259 | $ hg st -A -X .hgignore | |
260 | I ignored |
|
260 | I ignored | |
261 | I ignoreddir/file |
|
261 | I ignoreddir/file | |
262 | I ignoreddir/removed |
|
262 | I ignoreddir/removed | |
263 | I removed |
|
263 | I removed | |
264 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
|
264 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed | |
265 |
|
265 | |||
266 | $ echo >> ignored |
|
266 | $ echo >> ignored | |
267 | $ echo >> ignoreddir/file |
|
267 | $ echo >> ignoreddir/file | |
268 | $ hg rm removed ignoreddir/removed |
|
268 | $ hg rm removed ignoreddir/removed | |
269 |
|
269 | |||
270 | should revert ignored* and undelete *removed |
|
270 | should revert ignored* and undelete *removed | |
271 | -------------------------------------------- |
|
271 | -------------------------------------------- | |
272 |
|
272 | |||
273 | $ hg revert -a --no-backup |
|
273 | $ hg revert -a --no-backup | |
274 | reverting ignored |
|
274 | reverting ignored | |
275 | reverting ignoreddir/file (glob) |
|
275 | reverting ignoreddir/file (glob) | |
276 | undeleting ignoreddir/removed (glob) |
|
276 | undeleting ignoreddir/removed (glob) | |
277 | undeleting removed |
|
277 | undeleting removed | |
278 | $ hg st -mardi |
|
278 | $ hg st -mardi | |
279 |
|
279 | |||
280 | $ hg up -qC |
|
280 | $ hg up -qC | |
281 | $ echo >> ignored |
|
281 | $ echo >> ignored | |
282 | $ hg rm removed |
|
282 | $ hg rm removed | |
283 |
|
283 | |||
284 | should silently revert the named files |
|
284 | should silently revert the named files | |
285 | -------------------------------------- |
|
285 | -------------------------------------- | |
286 |
|
286 | |||
287 | $ hg revert --no-backup ignored removed |
|
287 | $ hg revert --no-backup ignored removed | |
288 | $ hg st -mardi |
|
288 | $ hg st -mardi | |
289 |
|
289 | |||
290 | Reverting copy (issue3920) |
|
290 | Reverting copy (issue3920) | |
291 | -------------------------- |
|
291 | -------------------------- | |
292 |
|
292 | |||
293 | someone set up us the copies |
|
293 | someone set up us the copies | |
294 |
|
294 | |||
295 | $ rm .hgignore |
|
295 | $ rm .hgignore | |
296 | $ hg update -C |
|
296 | $ hg update -C | |
297 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
297 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
298 | $ hg mv ignored allyour |
|
298 | $ hg mv ignored allyour | |
299 | $ hg copy removed base |
|
299 | $ hg copy removed base | |
300 | $ hg commit -m rename |
|
300 | $ hg commit -m rename | |
301 |
|
301 | |||
302 | copies and renames, you have no chance to survive make your time (issue3920) |
|
302 | copies and renames, you have no chance to survive make your time (issue3920) | |
303 |
|
303 | |||
304 | $ hg update '.^' |
|
304 | $ hg update '.^' | |
305 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
305 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
306 | $ hg revert -rtip -a |
|
306 | $ hg revert -rtip -a | |
307 | adding allyour |
|
307 | adding allyour | |
308 | adding base |
|
308 | adding base | |
309 | removing ignored |
|
309 | removing ignored | |
310 | $ hg status -C |
|
310 | $ hg status -C | |
311 | A allyour |
|
311 | A allyour | |
312 | ignored |
|
312 | ignored | |
313 | A base |
|
313 | A base | |
314 | removed |
|
314 | removed | |
315 | R ignored |
|
315 | R ignored | |
316 |
|
316 | |||
317 | Test revert of a file added by one side of the merge |
|
317 | Test revert of a file added by one side of the merge | |
318 | ==================================================== |
|
318 | ==================================================== | |
319 |
|
319 | |||
320 | remove any pending change |
|
320 | remove any pending change | |
321 |
|
321 | |||
322 | $ hg revert --all |
|
322 | $ hg revert --all | |
323 | forgetting allyour |
|
323 | forgetting allyour | |
324 | forgetting base |
|
324 | forgetting base | |
325 | undeleting ignored |
|
325 | undeleting ignored | |
326 | $ hg purge --all --config extensions.purge= |
|
326 | $ hg purge --all --config extensions.purge= | |
327 |
|
327 | |||
328 | Adds a new commit |
|
328 | Adds a new commit | |
329 |
|
329 | |||
330 | $ echo foo > newadd |
|
330 | $ echo foo > newadd | |
331 | $ hg add newadd |
|
331 | $ hg add newadd | |
332 | $ hg commit -m 'other adds' |
|
332 | $ hg commit -m 'other adds' | |
333 | created new head |
|
333 | created new head | |
334 |
|
334 | |||
335 |
|
335 | |||
336 | merge it with the other head |
|
336 | merge it with the other head | |
337 |
|
337 | |||
338 | $ hg merge # merge 1 into 2 |
|
338 | $ hg merge # merge 1 into 2 | |
339 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
339 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
340 | (branch merge, don't forget to commit) |
|
340 | (branch merge, don't forget to commit) | |
341 | $ hg summary |
|
341 | $ hg summary | |
342 | parent: 2:b8ec310b2d4e tip |
|
342 | parent: 2:b8ec310b2d4e tip | |
343 | other adds |
|
343 | other adds | |
344 | parent: 1:f6180deb8fbe |
|
344 | parent: 1:f6180deb8fbe | |
345 | rename |
|
345 | rename | |
346 | branch: default |
|
346 | branch: default | |
347 | commit: 2 modified, 1 removed (merge) |
|
347 | commit: 2 modified, 1 removed (merge) | |
348 | update: (current) |
|
348 | update: (current) | |
349 |
|
349 | |||
350 | clarifies who added what |
|
350 | clarifies who added what | |
351 |
|
351 | |||
352 | $ hg status |
|
352 | $ hg status | |
353 | M allyour |
|
353 | M allyour | |
354 | M base |
|
354 | M base | |
355 | R ignored |
|
355 | R ignored | |
356 | $ hg status --change 'p1()' |
|
356 | $ hg status --change 'p1()' | |
357 | A newadd |
|
357 | A newadd | |
358 | $ hg status --change 'p2()' |
|
358 | $ hg status --change 'p2()' | |
359 | A allyour |
|
359 | A allyour | |
360 | A base |
|
360 | A base | |
361 | R ignored |
|
361 | R ignored | |
362 |
|
362 | |||
363 | revert file added by p1() to p1() state |
|
363 | revert file added by p1() to p1() state | |
364 | ----------------------------------------- |
|
364 | ----------------------------------------- | |
365 |
|
365 | |||
366 | $ hg revert -r 'p1()' 'glob:newad?' |
|
366 | $ hg revert -r 'p1()' 'glob:newad?' | |
367 | $ hg status |
|
367 | $ hg status | |
368 | M allyour |
|
368 | M allyour | |
369 | M base |
|
369 | M base | |
370 | R ignored |
|
370 | R ignored | |
371 |
|
371 | |||
372 | revert file added by p1() to p2() state |
|
372 | revert file added by p1() to p2() state | |
373 | ------------------------------------------ |
|
373 | ------------------------------------------ | |
374 |
|
374 | |||
375 | $ hg revert -r 'p2()' 'glob:newad?' |
|
375 | $ hg revert -r 'p2()' 'glob:newad?' | |
376 | removing newadd |
|
376 | removing newadd | |
377 | $ hg status |
|
377 | $ hg status | |
378 | M allyour |
|
378 | M allyour | |
379 | M base |
|
379 | M base | |
380 | R ignored |
|
380 | R ignored | |
381 | R newadd |
|
381 | R newadd | |
382 |
|
382 | |||
383 | revert file added by p2() to p2() state |
|
383 | revert file added by p2() to p2() state | |
384 | ------------------------------------------ |
|
384 | ------------------------------------------ | |
385 |
|
385 | |||
386 | $ hg revert -r 'p2()' 'glob:allyou?' |
|
386 | $ hg revert -r 'p2()' 'glob:allyou?' | |
387 | $ hg status |
|
387 | $ hg status | |
388 | M allyour |
|
388 | M allyour | |
389 | M base |
|
389 | M base | |
390 | R ignored |
|
390 | R ignored | |
391 | R newadd |
|
391 | R newadd | |
392 |
|
392 | |||
393 | revert file added by p2() to p1() state |
|
393 | revert file added by p2() to p1() state | |
394 | ------------------------------------------ |
|
394 | ------------------------------------------ | |
395 |
|
395 | |||
396 | $ hg revert -r 'p1()' 'glob:allyou?' |
|
396 | $ hg revert -r 'p1()' 'glob:allyou?' | |
397 | removing allyour |
|
397 | removing allyour | |
398 | $ hg status |
|
398 | $ hg status | |
399 | M base |
|
399 | M base | |
400 | R allyour |
|
400 | R allyour | |
401 | R ignored |
|
401 | R ignored | |
402 | R newadd |
|
402 | R newadd | |
403 |
|
403 | |||
404 | Systematic behavior validation of most possible cases |
|
404 | Systematic behavior validation of most possible cases | |
405 | ===================================================== |
|
405 | ===================================================== | |
406 |
|
406 | |||
407 | This section tests most of the possible combinations of revision states and |
|
407 | This section tests most of the possible combinations of revision states and | |
408 | working directory states. The number of possible cases is significant but they |
|
408 | working directory states. The number of possible cases is significant but they | |
409 | but they all have a slightly different handling. So this section commits to |
|
409 | but they all have a slightly different handling. So this section commits to | |
410 | and testing all of them to allow safe refactoring of the revert code. |
|
410 | and testing all of them to allow safe refactoring of the revert code. | |
411 |
|
411 | |||
412 | A python script is used to generate a file history for each combination of |
|
412 | A python script is used to generate a file history for each combination of | |
413 | states, on one side the content (or lack thereof) in two revisions, and |
|
413 | states, on one side the content (or lack thereof) in two revisions, and | |
414 | on the other side, the content and "tracked-ness" of the working directory. The |
|
414 | on the other side, the content and "tracked-ness" of the working directory. The | |
415 | three states generated are: |
|
415 | three states generated are: | |
416 |
|
416 | |||
417 | - a "base" revision |
|
417 | - a "base" revision | |
418 | - a "parent" revision |
|
418 | - a "parent" revision | |
419 | - the working directory (based on "parent") |
|
419 | - the working directory (based on "parent") | |
420 |
|
420 | |||
421 | The files generated have names of the form: |
|
421 | The files generated have names of the form: | |
422 |
|
422 | |||
423 | <rev1-content>_<rev2-content>_<working-copy-content>-<tracked-ness> |
|
423 | <rev1-content>_<rev2-content>_<working-copy-content>-<tracked-ness> | |
424 |
|
424 | |||
425 | All known states are not tested yet. See inline documentation for details. |
|
425 | All known states are not tested yet. See inline documentation for details. | |
426 | Special cases from merge and rename are not tested by this section. |
|
426 | Special cases from merge and rename are not tested by this section. | |
427 |
|
427 | |||
428 | Write the python script to disk |
|
428 | Write the python script to disk | |
429 | ------------------------------- |
|
429 | ------------------------------- | |
430 |
|
430 | |||
431 | check list of planned files |
|
431 | check list of planned files | |
432 |
|
432 | |||
433 | $ python $TESTDIR/generate-working-copy-states.py filelist |
|
433 | $ python $TESTDIR/generate-working-copy-states.py filelist 2 | |
434 | content1_content1_content1-tracked |
|
434 | content1_content1_content1-tracked | |
435 | content1_content1_content1-untracked |
|
435 | content1_content1_content1-untracked | |
436 | content1_content1_content3-tracked |
|
436 | content1_content1_content3-tracked | |
437 | content1_content1_content3-untracked |
|
437 | content1_content1_content3-untracked | |
438 | content1_content1_missing-tracked |
|
438 | content1_content1_missing-tracked | |
439 | content1_content1_missing-untracked |
|
439 | content1_content1_missing-untracked | |
440 | content1_content2_content1-tracked |
|
440 | content1_content2_content1-tracked | |
441 | content1_content2_content1-untracked |
|
441 | content1_content2_content1-untracked | |
442 | content1_content2_content2-tracked |
|
442 | content1_content2_content2-tracked | |
443 | content1_content2_content2-untracked |
|
443 | content1_content2_content2-untracked | |
444 | content1_content2_content3-tracked |
|
444 | content1_content2_content3-tracked | |
445 | content1_content2_content3-untracked |
|
445 | content1_content2_content3-untracked | |
446 | content1_content2_missing-tracked |
|
446 | content1_content2_missing-tracked | |
447 | content1_content2_missing-untracked |
|
447 | content1_content2_missing-untracked | |
448 | content1_missing_content1-tracked |
|
448 | content1_missing_content1-tracked | |
449 | content1_missing_content1-untracked |
|
449 | content1_missing_content1-untracked | |
450 | content1_missing_content3-tracked |
|
450 | content1_missing_content3-tracked | |
451 | content1_missing_content3-untracked |
|
451 | content1_missing_content3-untracked | |
452 | content1_missing_missing-tracked |
|
452 | content1_missing_missing-tracked | |
453 | content1_missing_missing-untracked |
|
453 | content1_missing_missing-untracked | |
454 | missing_content2_content2-tracked |
|
454 | missing_content2_content2-tracked | |
455 | missing_content2_content2-untracked |
|
455 | missing_content2_content2-untracked | |
456 | missing_content2_content3-tracked |
|
456 | missing_content2_content3-tracked | |
457 | missing_content2_content3-untracked |
|
457 | missing_content2_content3-untracked | |
458 | missing_content2_missing-tracked |
|
458 | missing_content2_missing-tracked | |
459 | missing_content2_missing-untracked |
|
459 | missing_content2_missing-untracked | |
460 | missing_missing_content3-tracked |
|
460 | missing_missing_content3-tracked | |
461 | missing_missing_content3-untracked |
|
461 | missing_missing_content3-untracked | |
462 | missing_missing_missing-tracked |
|
462 | missing_missing_missing-tracked | |
463 | missing_missing_missing-untracked |
|
463 | missing_missing_missing-untracked | |
464 |
|
464 | |||
465 | Script to make a simple text version of the content |
|
465 | Script to make a simple text version of the content | |
466 | --------------------------------------------------- |
|
466 | --------------------------------------------------- | |
467 |
|
467 | |||
468 | $ cat << EOF >> dircontent.py |
|
468 | $ cat << EOF >> dircontent.py | |
469 | > # generate a simple text view of the directory for easy comparison |
|
469 | > # generate a simple text view of the directory for easy comparison | |
470 | > import os |
|
470 | > import os | |
471 | > files = os.listdir('.') |
|
471 | > files = os.listdir('.') | |
472 | > files.sort() |
|
472 | > files.sort() | |
473 | > for filename in files: |
|
473 | > for filename in files: | |
474 | > if os.path.isdir(filename): |
|
474 | > if os.path.isdir(filename): | |
475 | > continue |
|
475 | > continue | |
476 | > content = open(filename).read() |
|
476 | > content = open(filename).read() | |
477 | > print '%-6s %s' % (content.strip(), filename) |
|
477 | > print '%-6s %s' % (content.strip(), filename) | |
478 | > EOF |
|
478 | > EOF | |
479 |
|
479 | |||
480 | Generate appropriate repo state |
|
480 | Generate appropriate repo state | |
481 | ------------------------------- |
|
481 | ------------------------------- | |
482 |
|
482 | |||
483 | $ hg init revert-ref |
|
483 | $ hg init revert-ref | |
484 | $ cd revert-ref |
|
484 | $ cd revert-ref | |
485 |
|
485 | |||
486 | Generate base changeset |
|
486 | Generate base changeset | |
487 |
|
487 | |||
488 |
$ python $TESTDIR/generate-working-copy-states.py |
|
488 | $ python $TESTDIR/generate-working-copy-states.py state 2 1 | |
489 | $ hg addremove --similarity 0 |
|
489 | $ hg addremove --similarity 0 | |
490 | adding content1_content1_content1-tracked |
|
490 | adding content1_content1_content1-tracked | |
491 | adding content1_content1_content1-untracked |
|
491 | adding content1_content1_content1-untracked | |
492 | adding content1_content1_content3-tracked |
|
492 | adding content1_content1_content3-tracked | |
493 | adding content1_content1_content3-untracked |
|
493 | adding content1_content1_content3-untracked | |
494 | adding content1_content1_missing-tracked |
|
494 | adding content1_content1_missing-tracked | |
495 | adding content1_content1_missing-untracked |
|
495 | adding content1_content1_missing-untracked | |
496 | adding content1_content2_content1-tracked |
|
496 | adding content1_content2_content1-tracked | |
497 | adding content1_content2_content1-untracked |
|
497 | adding content1_content2_content1-untracked | |
498 | adding content1_content2_content2-tracked |
|
498 | adding content1_content2_content2-tracked | |
499 | adding content1_content2_content2-untracked |
|
499 | adding content1_content2_content2-untracked | |
500 | adding content1_content2_content3-tracked |
|
500 | adding content1_content2_content3-tracked | |
501 | adding content1_content2_content3-untracked |
|
501 | adding content1_content2_content3-untracked | |
502 | adding content1_content2_missing-tracked |
|
502 | adding content1_content2_missing-tracked | |
503 | adding content1_content2_missing-untracked |
|
503 | adding content1_content2_missing-untracked | |
504 | adding content1_missing_content1-tracked |
|
504 | adding content1_missing_content1-tracked | |
505 | adding content1_missing_content1-untracked |
|
505 | adding content1_missing_content1-untracked | |
506 | adding content1_missing_content3-tracked |
|
506 | adding content1_missing_content3-tracked | |
507 | adding content1_missing_content3-untracked |
|
507 | adding content1_missing_content3-untracked | |
508 | adding content1_missing_missing-tracked |
|
508 | adding content1_missing_missing-tracked | |
509 | adding content1_missing_missing-untracked |
|
509 | adding content1_missing_missing-untracked | |
510 | $ hg status |
|
510 | $ hg status | |
511 | A content1_content1_content1-tracked |
|
511 | A content1_content1_content1-tracked | |
512 | A content1_content1_content1-untracked |
|
512 | A content1_content1_content1-untracked | |
513 | A content1_content1_content3-tracked |
|
513 | A content1_content1_content3-tracked | |
514 | A content1_content1_content3-untracked |
|
514 | A content1_content1_content3-untracked | |
515 | A content1_content1_missing-tracked |
|
515 | A content1_content1_missing-tracked | |
516 | A content1_content1_missing-untracked |
|
516 | A content1_content1_missing-untracked | |
517 | A content1_content2_content1-tracked |
|
517 | A content1_content2_content1-tracked | |
518 | A content1_content2_content1-untracked |
|
518 | A content1_content2_content1-untracked | |
519 | A content1_content2_content2-tracked |
|
519 | A content1_content2_content2-tracked | |
520 | A content1_content2_content2-untracked |
|
520 | A content1_content2_content2-untracked | |
521 | A content1_content2_content3-tracked |
|
521 | A content1_content2_content3-tracked | |
522 | A content1_content2_content3-untracked |
|
522 | A content1_content2_content3-untracked | |
523 | A content1_content2_missing-tracked |
|
523 | A content1_content2_missing-tracked | |
524 | A content1_content2_missing-untracked |
|
524 | A content1_content2_missing-untracked | |
525 | A content1_missing_content1-tracked |
|
525 | A content1_missing_content1-tracked | |
526 | A content1_missing_content1-untracked |
|
526 | A content1_missing_content1-untracked | |
527 | A content1_missing_content3-tracked |
|
527 | A content1_missing_content3-tracked | |
528 | A content1_missing_content3-untracked |
|
528 | A content1_missing_content3-untracked | |
529 | A content1_missing_missing-tracked |
|
529 | A content1_missing_missing-tracked | |
530 | A content1_missing_missing-untracked |
|
530 | A content1_missing_missing-untracked | |
531 | $ hg commit -m 'base' |
|
531 | $ hg commit -m 'base' | |
532 |
|
532 | |||
533 | (create a simple text version of the content) |
|
533 | (create a simple text version of the content) | |
534 |
|
534 | |||
535 | $ python ../dircontent.py > ../content-base.txt |
|
535 | $ python ../dircontent.py > ../content-base.txt | |
536 | $ cat ../content-base.txt |
|
536 | $ cat ../content-base.txt | |
537 | content1 content1_content1_content1-tracked |
|
537 | content1 content1_content1_content1-tracked | |
538 | content1 content1_content1_content1-untracked |
|
538 | content1 content1_content1_content1-untracked | |
539 | content1 content1_content1_content3-tracked |
|
539 | content1 content1_content1_content3-tracked | |
540 | content1 content1_content1_content3-untracked |
|
540 | content1 content1_content1_content3-untracked | |
541 | content1 content1_content1_missing-tracked |
|
541 | content1 content1_content1_missing-tracked | |
542 | content1 content1_content1_missing-untracked |
|
542 | content1 content1_content1_missing-untracked | |
543 | content1 content1_content2_content1-tracked |
|
543 | content1 content1_content2_content1-tracked | |
544 | content1 content1_content2_content1-untracked |
|
544 | content1 content1_content2_content1-untracked | |
545 | content1 content1_content2_content2-tracked |
|
545 | content1 content1_content2_content2-tracked | |
546 | content1 content1_content2_content2-untracked |
|
546 | content1 content1_content2_content2-untracked | |
547 | content1 content1_content2_content3-tracked |
|
547 | content1 content1_content2_content3-tracked | |
548 | content1 content1_content2_content3-untracked |
|
548 | content1 content1_content2_content3-untracked | |
549 | content1 content1_content2_missing-tracked |
|
549 | content1 content1_content2_missing-tracked | |
550 | content1 content1_content2_missing-untracked |
|
550 | content1 content1_content2_missing-untracked | |
551 | content1 content1_missing_content1-tracked |
|
551 | content1 content1_missing_content1-tracked | |
552 | content1 content1_missing_content1-untracked |
|
552 | content1 content1_missing_content1-untracked | |
553 | content1 content1_missing_content3-tracked |
|
553 | content1 content1_missing_content3-tracked | |
554 | content1 content1_missing_content3-untracked |
|
554 | content1 content1_missing_content3-untracked | |
555 | content1 content1_missing_missing-tracked |
|
555 | content1 content1_missing_missing-tracked | |
556 | content1 content1_missing_missing-untracked |
|
556 | content1 content1_missing_missing-untracked | |
557 |
|
557 | |||
558 | Create parent changeset |
|
558 | Create parent changeset | |
559 |
|
559 | |||
560 |
$ python $TESTDIR/generate-working-copy-states.py |
|
560 | $ python $TESTDIR/generate-working-copy-states.py state 2 2 | |
561 | $ hg addremove --similarity 0 |
|
561 | $ hg addremove --similarity 0 | |
562 | removing content1_missing_content1-tracked |
|
562 | removing content1_missing_content1-tracked | |
563 | removing content1_missing_content1-untracked |
|
563 | removing content1_missing_content1-untracked | |
564 | removing content1_missing_content3-tracked |
|
564 | removing content1_missing_content3-tracked | |
565 | removing content1_missing_content3-untracked |
|
565 | removing content1_missing_content3-untracked | |
566 | removing content1_missing_missing-tracked |
|
566 | removing content1_missing_missing-tracked | |
567 | removing content1_missing_missing-untracked |
|
567 | removing content1_missing_missing-untracked | |
568 | adding missing_content2_content2-tracked |
|
568 | adding missing_content2_content2-tracked | |
569 | adding missing_content2_content2-untracked |
|
569 | adding missing_content2_content2-untracked | |
570 | adding missing_content2_content3-tracked |
|
570 | adding missing_content2_content3-tracked | |
571 | adding missing_content2_content3-untracked |
|
571 | adding missing_content2_content3-untracked | |
572 | adding missing_content2_missing-tracked |
|
572 | adding missing_content2_missing-tracked | |
573 | adding missing_content2_missing-untracked |
|
573 | adding missing_content2_missing-untracked | |
574 | $ hg status |
|
574 | $ hg status | |
575 | M content1_content2_content1-tracked |
|
575 | M content1_content2_content1-tracked | |
576 | M content1_content2_content1-untracked |
|
576 | M content1_content2_content1-untracked | |
577 | M content1_content2_content2-tracked |
|
577 | M content1_content2_content2-tracked | |
578 | M content1_content2_content2-untracked |
|
578 | M content1_content2_content2-untracked | |
579 | M content1_content2_content3-tracked |
|
579 | M content1_content2_content3-tracked | |
580 | M content1_content2_content3-untracked |
|
580 | M content1_content2_content3-untracked | |
581 | M content1_content2_missing-tracked |
|
581 | M content1_content2_missing-tracked | |
582 | M content1_content2_missing-untracked |
|
582 | M content1_content2_missing-untracked | |
583 | A missing_content2_content2-tracked |
|
583 | A missing_content2_content2-tracked | |
584 | A missing_content2_content2-untracked |
|
584 | A missing_content2_content2-untracked | |
585 | A missing_content2_content3-tracked |
|
585 | A missing_content2_content3-tracked | |
586 | A missing_content2_content3-untracked |
|
586 | A missing_content2_content3-untracked | |
587 | A missing_content2_missing-tracked |
|
587 | A missing_content2_missing-tracked | |
588 | A missing_content2_missing-untracked |
|
588 | A missing_content2_missing-untracked | |
589 | R content1_missing_content1-tracked |
|
589 | R content1_missing_content1-tracked | |
590 | R content1_missing_content1-untracked |
|
590 | R content1_missing_content1-untracked | |
591 | R content1_missing_content3-tracked |
|
591 | R content1_missing_content3-tracked | |
592 | R content1_missing_content3-untracked |
|
592 | R content1_missing_content3-untracked | |
593 | R content1_missing_missing-tracked |
|
593 | R content1_missing_missing-tracked | |
594 | R content1_missing_missing-untracked |
|
594 | R content1_missing_missing-untracked | |
595 | $ hg commit -m 'parent' |
|
595 | $ hg commit -m 'parent' | |
596 |
|
596 | |||
597 | (create a simple text version of the content) |
|
597 | (create a simple text version of the content) | |
598 |
|
598 | |||
599 | $ python ../dircontent.py > ../content-parent.txt |
|
599 | $ python ../dircontent.py > ../content-parent.txt | |
600 | $ cat ../content-parent.txt |
|
600 | $ cat ../content-parent.txt | |
601 | content1 content1_content1_content1-tracked |
|
601 | content1 content1_content1_content1-tracked | |
602 | content1 content1_content1_content1-untracked |
|
602 | content1 content1_content1_content1-untracked | |
603 | content1 content1_content1_content3-tracked |
|
603 | content1 content1_content1_content3-tracked | |
604 | content1 content1_content1_content3-untracked |
|
604 | content1 content1_content1_content3-untracked | |
605 | content1 content1_content1_missing-tracked |
|
605 | content1 content1_content1_missing-tracked | |
606 | content1 content1_content1_missing-untracked |
|
606 | content1 content1_content1_missing-untracked | |
607 | content2 content1_content2_content1-tracked |
|
607 | content2 content1_content2_content1-tracked | |
608 | content2 content1_content2_content1-untracked |
|
608 | content2 content1_content2_content1-untracked | |
609 | content2 content1_content2_content2-tracked |
|
609 | content2 content1_content2_content2-tracked | |
610 | content2 content1_content2_content2-untracked |
|
610 | content2 content1_content2_content2-untracked | |
611 | content2 content1_content2_content3-tracked |
|
611 | content2 content1_content2_content3-tracked | |
612 | content2 content1_content2_content3-untracked |
|
612 | content2 content1_content2_content3-untracked | |
613 | content2 content1_content2_missing-tracked |
|
613 | content2 content1_content2_missing-tracked | |
614 | content2 content1_content2_missing-untracked |
|
614 | content2 content1_content2_missing-untracked | |
615 | content2 missing_content2_content2-tracked |
|
615 | content2 missing_content2_content2-tracked | |
616 | content2 missing_content2_content2-untracked |
|
616 | content2 missing_content2_content2-untracked | |
617 | content2 missing_content2_content3-tracked |
|
617 | content2 missing_content2_content3-tracked | |
618 | content2 missing_content2_content3-untracked |
|
618 | content2 missing_content2_content3-untracked | |
619 | content2 missing_content2_missing-tracked |
|
619 | content2 missing_content2_missing-tracked | |
620 | content2 missing_content2_missing-untracked |
|
620 | content2 missing_content2_missing-untracked | |
621 |
|
621 | |||
622 | Setup working directory |
|
622 | Setup working directory | |
623 |
|
623 | |||
624 | $ python $TESTDIR/generate-working-copy-states.py wc |
|
624 | $ python $TESTDIR/generate-working-copy-states.py state 2 wc | |
625 | $ hg addremove --similarity 0 |
|
625 | $ hg addremove --similarity 0 | |
626 | adding content1_missing_content1-tracked |
|
626 | adding content1_missing_content1-tracked | |
627 | adding content1_missing_content1-untracked |
|
627 | adding content1_missing_content1-untracked | |
628 | adding content1_missing_content3-tracked |
|
628 | adding content1_missing_content3-tracked | |
629 | adding content1_missing_content3-untracked |
|
629 | adding content1_missing_content3-untracked | |
630 | adding content1_missing_missing-tracked |
|
630 | adding content1_missing_missing-tracked | |
631 | adding content1_missing_missing-untracked |
|
631 | adding content1_missing_missing-untracked | |
632 | adding missing_missing_content3-tracked |
|
632 | adding missing_missing_content3-tracked | |
633 | adding missing_missing_content3-untracked |
|
633 | adding missing_missing_content3-untracked | |
634 | adding missing_missing_missing-tracked |
|
634 | adding missing_missing_missing-tracked | |
635 | adding missing_missing_missing-untracked |
|
635 | adding missing_missing_missing-untracked | |
636 | $ hg forget *_*_*-untracked |
|
636 | $ hg forget *_*_*-untracked | |
637 | $ rm *_*_missing-* |
|
637 | $ rm *_*_missing-* | |
638 | $ hg status |
|
638 | $ hg status | |
639 | M content1_content1_content3-tracked |
|
639 | M content1_content1_content3-tracked | |
640 | M content1_content2_content1-tracked |
|
640 | M content1_content2_content1-tracked | |
641 | M content1_content2_content3-tracked |
|
641 | M content1_content2_content3-tracked | |
642 | M missing_content2_content3-tracked |
|
642 | M missing_content2_content3-tracked | |
643 | A content1_missing_content1-tracked |
|
643 | A content1_missing_content1-tracked | |
644 | A content1_missing_content3-tracked |
|
644 | A content1_missing_content3-tracked | |
645 | A missing_missing_content3-tracked |
|
645 | A missing_missing_content3-tracked | |
646 | R content1_content1_content1-untracked |
|
646 | R content1_content1_content1-untracked | |
647 | R content1_content1_content3-untracked |
|
647 | R content1_content1_content3-untracked | |
648 | R content1_content1_missing-untracked |
|
648 | R content1_content1_missing-untracked | |
649 | R content1_content2_content1-untracked |
|
649 | R content1_content2_content1-untracked | |
650 | R content1_content2_content2-untracked |
|
650 | R content1_content2_content2-untracked | |
651 | R content1_content2_content3-untracked |
|
651 | R content1_content2_content3-untracked | |
652 | R content1_content2_missing-untracked |
|
652 | R content1_content2_missing-untracked | |
653 | R missing_content2_content2-untracked |
|
653 | R missing_content2_content2-untracked | |
654 | R missing_content2_content3-untracked |
|
654 | R missing_content2_content3-untracked | |
655 | R missing_content2_missing-untracked |
|
655 | R missing_content2_missing-untracked | |
656 | ! content1_content1_missing-tracked |
|
656 | ! content1_content1_missing-tracked | |
657 | ! content1_content2_missing-tracked |
|
657 | ! content1_content2_missing-tracked | |
658 | ! content1_missing_missing-tracked |
|
658 | ! content1_missing_missing-tracked | |
659 | ! missing_content2_missing-tracked |
|
659 | ! missing_content2_missing-tracked | |
660 | ! missing_missing_missing-tracked |
|
660 | ! missing_missing_missing-tracked | |
661 | ? content1_missing_content1-untracked |
|
661 | ? content1_missing_content1-untracked | |
662 | ? content1_missing_content3-untracked |
|
662 | ? content1_missing_content3-untracked | |
663 | ? missing_missing_content3-untracked |
|
663 | ? missing_missing_content3-untracked | |
664 |
|
664 | |||
665 | $ hg status --rev 'desc("base")' |
|
665 | $ hg status --rev 'desc("base")' | |
666 | M content1_content1_content3-tracked |
|
666 | M content1_content1_content3-tracked | |
667 | M content1_content2_content2-tracked |
|
667 | M content1_content2_content2-tracked | |
668 | M content1_content2_content3-tracked |
|
668 | M content1_content2_content3-tracked | |
669 | M content1_missing_content3-tracked |
|
669 | M content1_missing_content3-tracked | |
670 | A missing_content2_content2-tracked |
|
670 | A missing_content2_content2-tracked | |
671 | A missing_content2_content3-tracked |
|
671 | A missing_content2_content3-tracked | |
672 | A missing_missing_content3-tracked |
|
672 | A missing_missing_content3-tracked | |
673 | R content1_content1_content1-untracked |
|
673 | R content1_content1_content1-untracked | |
674 | R content1_content1_content3-untracked |
|
674 | R content1_content1_content3-untracked | |
675 | R content1_content1_missing-untracked |
|
675 | R content1_content1_missing-untracked | |
676 | R content1_content2_content1-untracked |
|
676 | R content1_content2_content1-untracked | |
677 | R content1_content2_content2-untracked |
|
677 | R content1_content2_content2-untracked | |
678 | R content1_content2_content3-untracked |
|
678 | R content1_content2_content3-untracked | |
679 | R content1_content2_missing-untracked |
|
679 | R content1_content2_missing-untracked | |
680 | R content1_missing_content1-untracked |
|
680 | R content1_missing_content1-untracked | |
681 | R content1_missing_content3-untracked |
|
681 | R content1_missing_content3-untracked | |
682 | R content1_missing_missing-tracked |
|
682 | R content1_missing_missing-tracked | |
683 | R content1_missing_missing-untracked |
|
683 | R content1_missing_missing-untracked | |
684 | ! content1_content1_missing-tracked |
|
684 | ! content1_content1_missing-tracked | |
685 | ! content1_content2_missing-tracked |
|
685 | ! content1_content2_missing-tracked | |
686 | ! content1_missing_missing-tracked |
|
686 | ! content1_missing_missing-tracked | |
687 | ! missing_content2_missing-tracked |
|
687 | ! missing_content2_missing-tracked | |
688 | ! missing_missing_missing-tracked |
|
688 | ! missing_missing_missing-tracked | |
689 | ? missing_missing_content3-untracked |
|
689 | ? missing_missing_content3-untracked | |
690 |
|
690 | |||
691 | (create a simple text version of the content) |
|
691 | (create a simple text version of the content) | |
692 |
|
692 | |||
693 | $ python ../dircontent.py > ../content-wc.txt |
|
693 | $ python ../dircontent.py > ../content-wc.txt | |
694 | $ cat ../content-wc.txt |
|
694 | $ cat ../content-wc.txt | |
695 | content1 content1_content1_content1-tracked |
|
695 | content1 content1_content1_content1-tracked | |
696 | content1 content1_content1_content1-untracked |
|
696 | content1 content1_content1_content1-untracked | |
697 | content3 content1_content1_content3-tracked |
|
697 | content3 content1_content1_content3-tracked | |
698 | content3 content1_content1_content3-untracked |
|
698 | content3 content1_content1_content3-untracked | |
699 | content1 content1_content2_content1-tracked |
|
699 | content1 content1_content2_content1-tracked | |
700 | content1 content1_content2_content1-untracked |
|
700 | content1 content1_content2_content1-untracked | |
701 | content2 content1_content2_content2-tracked |
|
701 | content2 content1_content2_content2-tracked | |
702 | content2 content1_content2_content2-untracked |
|
702 | content2 content1_content2_content2-untracked | |
703 | content3 content1_content2_content3-tracked |
|
703 | content3 content1_content2_content3-tracked | |
704 | content3 content1_content2_content3-untracked |
|
704 | content3 content1_content2_content3-untracked | |
705 | content1 content1_missing_content1-tracked |
|
705 | content1 content1_missing_content1-tracked | |
706 | content1 content1_missing_content1-untracked |
|
706 | content1 content1_missing_content1-untracked | |
707 | content3 content1_missing_content3-tracked |
|
707 | content3 content1_missing_content3-tracked | |
708 | content3 content1_missing_content3-untracked |
|
708 | content3 content1_missing_content3-untracked | |
709 | content2 missing_content2_content2-tracked |
|
709 | content2 missing_content2_content2-tracked | |
710 | content2 missing_content2_content2-untracked |
|
710 | content2 missing_content2_content2-untracked | |
711 | content3 missing_content2_content3-tracked |
|
711 | content3 missing_content2_content3-tracked | |
712 | content3 missing_content2_content3-untracked |
|
712 | content3 missing_content2_content3-untracked | |
713 | content3 missing_missing_content3-tracked |
|
713 | content3 missing_missing_content3-tracked | |
714 | content3 missing_missing_content3-untracked |
|
714 | content3 missing_missing_content3-untracked | |
715 |
|
715 | |||
716 | $ cd .. |
|
716 | $ cd .. | |
717 |
|
717 | |||
718 | Test revert --all to parent content |
|
718 | Test revert --all to parent content | |
719 | ----------------------------------- |
|
719 | ----------------------------------- | |
720 |
|
720 | |||
721 | (setup from reference repo) |
|
721 | (setup from reference repo) | |
722 |
|
722 | |||
723 | $ cp -r revert-ref revert-parent-all |
|
723 | $ cp -r revert-ref revert-parent-all | |
724 | $ cd revert-parent-all |
|
724 | $ cd revert-parent-all | |
725 |
|
725 | |||
726 | check revert output |
|
726 | check revert output | |
727 |
|
727 | |||
728 | $ hg revert --all |
|
728 | $ hg revert --all | |
729 | undeleting content1_content1_content1-untracked |
|
729 | undeleting content1_content1_content1-untracked | |
730 | reverting content1_content1_content3-tracked |
|
730 | reverting content1_content1_content3-tracked | |
731 | undeleting content1_content1_content3-untracked |
|
731 | undeleting content1_content1_content3-untracked | |
732 | reverting content1_content1_missing-tracked |
|
732 | reverting content1_content1_missing-tracked | |
733 | undeleting content1_content1_missing-untracked |
|
733 | undeleting content1_content1_missing-untracked | |
734 | reverting content1_content2_content1-tracked |
|
734 | reverting content1_content2_content1-tracked | |
735 | undeleting content1_content2_content1-untracked |
|
735 | undeleting content1_content2_content1-untracked | |
736 | undeleting content1_content2_content2-untracked |
|
736 | undeleting content1_content2_content2-untracked | |
737 | reverting content1_content2_content3-tracked |
|
737 | reverting content1_content2_content3-tracked | |
738 | undeleting content1_content2_content3-untracked |
|
738 | undeleting content1_content2_content3-untracked | |
739 | reverting content1_content2_missing-tracked |
|
739 | reverting content1_content2_missing-tracked | |
740 | undeleting content1_content2_missing-untracked |
|
740 | undeleting content1_content2_missing-untracked | |
741 | forgetting content1_missing_content1-tracked |
|
741 | forgetting content1_missing_content1-tracked | |
742 | forgetting content1_missing_content3-tracked |
|
742 | forgetting content1_missing_content3-tracked | |
743 | forgetting content1_missing_missing-tracked |
|
743 | forgetting content1_missing_missing-tracked | |
744 | undeleting missing_content2_content2-untracked |
|
744 | undeleting missing_content2_content2-untracked | |
745 | reverting missing_content2_content3-tracked |
|
745 | reverting missing_content2_content3-tracked | |
746 | undeleting missing_content2_content3-untracked |
|
746 | undeleting missing_content2_content3-untracked | |
747 | reverting missing_content2_missing-tracked |
|
747 | reverting missing_content2_missing-tracked | |
748 | undeleting missing_content2_missing-untracked |
|
748 | undeleting missing_content2_missing-untracked | |
749 | forgetting missing_missing_content3-tracked |
|
749 | forgetting missing_missing_content3-tracked | |
750 | forgetting missing_missing_missing-tracked |
|
750 | forgetting missing_missing_missing-tracked | |
751 |
|
751 | |||
752 | Compare resulting directory with revert target. |
|
752 | Compare resulting directory with revert target. | |
753 |
|
753 | |||
754 | The diff is filtered to include change only. The only difference should be |
|
754 | The diff is filtered to include change only. The only difference should be | |
755 | additional `.orig` backup file when applicable. |
|
755 | additional `.orig` backup file when applicable. | |
756 |
|
756 | |||
757 | $ python ../dircontent.py > ../content-parent-all.txt |
|
757 | $ python ../dircontent.py > ../content-parent-all.txt | |
758 | $ cd .. |
|
758 | $ cd .. | |
759 | $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _ |
|
759 | $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _ | |
760 | +content3 content1_content1_content3-tracked.orig |
|
760 | +content3 content1_content1_content3-tracked.orig | |
761 | +content3 content1_content1_content3-untracked.orig |
|
761 | +content3 content1_content1_content3-untracked.orig | |
762 | +content1 content1_content2_content1-tracked.orig |
|
762 | +content1 content1_content2_content1-tracked.orig | |
763 | +content1 content1_content2_content1-untracked.orig |
|
763 | +content1 content1_content2_content1-untracked.orig | |
764 | +content3 content1_content2_content3-tracked.orig |
|
764 | +content3 content1_content2_content3-tracked.orig | |
765 | +content3 content1_content2_content3-untracked.orig |
|
765 | +content3 content1_content2_content3-untracked.orig | |
766 | +content1 content1_missing_content1-tracked |
|
766 | +content1 content1_missing_content1-tracked | |
767 | +content1 content1_missing_content1-untracked |
|
767 | +content1 content1_missing_content1-untracked | |
768 | +content3 content1_missing_content3-tracked |
|
768 | +content3 content1_missing_content3-tracked | |
769 | +content3 content1_missing_content3-untracked |
|
769 | +content3 content1_missing_content3-untracked | |
770 | +content3 missing_content2_content3-tracked.orig |
|
770 | +content3 missing_content2_content3-tracked.orig | |
771 | +content3 missing_content2_content3-untracked.orig |
|
771 | +content3 missing_content2_content3-untracked.orig | |
772 | +content3 missing_missing_content3-tracked |
|
772 | +content3 missing_missing_content3-tracked | |
773 | +content3 missing_missing_content3-untracked |
|
773 | +content3 missing_missing_content3-untracked | |
774 |
|
774 | |||
775 | Test revert --all to "base" content |
|
775 | Test revert --all to "base" content | |
776 | ----------------------------------- |
|
776 | ----------------------------------- | |
777 |
|
777 | |||
778 | (setup from reference repo) |
|
778 | (setup from reference repo) | |
779 |
|
779 | |||
780 | $ cp -r revert-ref revert-base-all |
|
780 | $ cp -r revert-ref revert-base-all | |
781 | $ cd revert-base-all |
|
781 | $ cd revert-base-all | |
782 |
|
782 | |||
783 | check revert output |
|
783 | check revert output | |
784 |
|
784 | |||
785 | $ hg revert --all --rev 'desc(base)' |
|
785 | $ hg revert --all --rev 'desc(base)' | |
786 | undeleting content1_content1_content1-untracked |
|
786 | undeleting content1_content1_content1-untracked | |
787 | reverting content1_content1_content3-tracked |
|
787 | reverting content1_content1_content3-tracked | |
788 | undeleting content1_content1_content3-untracked |
|
788 | undeleting content1_content1_content3-untracked | |
789 | reverting content1_content1_missing-tracked |
|
789 | reverting content1_content1_missing-tracked | |
790 | undeleting content1_content1_missing-untracked |
|
790 | undeleting content1_content1_missing-untracked | |
791 | undeleting content1_content2_content1-untracked |
|
791 | undeleting content1_content2_content1-untracked | |
792 | reverting content1_content2_content2-tracked |
|
792 | reverting content1_content2_content2-tracked | |
793 | undeleting content1_content2_content2-untracked |
|
793 | undeleting content1_content2_content2-untracked | |
794 | reverting content1_content2_content3-tracked |
|
794 | reverting content1_content2_content3-tracked | |
795 | undeleting content1_content2_content3-untracked |
|
795 | undeleting content1_content2_content3-untracked | |
796 | reverting content1_content2_missing-tracked |
|
796 | reverting content1_content2_missing-tracked | |
797 | undeleting content1_content2_missing-untracked |
|
797 | undeleting content1_content2_missing-untracked | |
798 | adding content1_missing_content1-untracked |
|
798 | adding content1_missing_content1-untracked | |
799 | reverting content1_missing_content3-tracked |
|
799 | reverting content1_missing_content3-tracked | |
800 | adding content1_missing_content3-untracked |
|
800 | adding content1_missing_content3-untracked | |
801 | reverting content1_missing_missing-tracked |
|
801 | reverting content1_missing_missing-tracked | |
802 | adding content1_missing_missing-untracked |
|
802 | adding content1_missing_missing-untracked | |
803 | removing missing_content2_content2-tracked |
|
803 | removing missing_content2_content2-tracked | |
804 | removing missing_content2_content3-tracked |
|
804 | removing missing_content2_content3-tracked | |
805 | removing missing_content2_missing-tracked |
|
805 | removing missing_content2_missing-tracked | |
806 | forgetting missing_missing_content3-tracked |
|
806 | forgetting missing_missing_content3-tracked | |
807 | forgetting missing_missing_missing-tracked |
|
807 | forgetting missing_missing_missing-tracked | |
808 |
|
808 | |||
809 | Compare resulting directory with revert target. |
|
809 | Compare resulting directory with revert target. | |
810 |
|
810 | |||
811 | The diff is filtered to include change only. The only difference should be |
|
811 | The diff is filtered to include change only. The only difference should be | |
812 | additional `.orig` backup file when applicable. |
|
812 | additional `.orig` backup file when applicable. | |
813 |
|
813 | |||
814 | $ python ../dircontent.py > ../content-base-all.txt |
|
814 | $ python ../dircontent.py > ../content-base-all.txt | |
815 | $ cd .. |
|
815 | $ cd .. | |
816 | $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ |
|
816 | $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ | |
817 | +content3 content1_content1_content3-tracked.orig |
|
817 | +content3 content1_content1_content3-tracked.orig | |
818 | +content3 content1_content1_content3-untracked.orig |
|
818 | +content3 content1_content1_content3-untracked.orig | |
819 | +content2 content1_content2_content2-untracked.orig |
|
819 | +content2 content1_content2_content2-untracked.orig | |
820 | +content3 content1_content2_content3-tracked.orig |
|
820 | +content3 content1_content2_content3-tracked.orig | |
821 | +content3 content1_content2_content3-untracked.orig |
|
821 | +content3 content1_content2_content3-untracked.orig | |
822 | +content3 content1_missing_content3-tracked.orig |
|
822 | +content3 content1_missing_content3-tracked.orig | |
823 | +content3 content1_missing_content3-untracked.orig |
|
823 | +content3 content1_missing_content3-untracked.orig | |
824 | +content2 missing_content2_content2-untracked |
|
824 | +content2 missing_content2_content2-untracked | |
825 | +content3 missing_content2_content3-tracked.orig |
|
825 | +content3 missing_content2_content3-tracked.orig | |
826 | +content3 missing_content2_content3-untracked |
|
826 | +content3 missing_content2_content3-untracked | |
827 | +content3 missing_missing_content3-tracked |
|
827 | +content3 missing_missing_content3-tracked | |
828 | +content3 missing_missing_content3-untracked |
|
828 | +content3 missing_missing_content3-untracked | |
829 |
|
829 | |||
830 | Test revert to parent content with explicit file name |
|
830 | Test revert to parent content with explicit file name | |
831 | ----------------------------------------------------- |
|
831 | ----------------------------------------------------- | |
832 |
|
832 | |||
833 | (setup from reference repo) |
|
833 | (setup from reference repo) | |
834 |
|
834 | |||
835 | $ cp -r revert-ref revert-parent-explicit |
|
835 | $ cp -r revert-ref revert-parent-explicit | |
836 | $ cd revert-parent-explicit |
|
836 | $ cd revert-parent-explicit | |
837 |
|
837 | |||
838 | revert all files individually and check the output |
|
838 | revert all files individually and check the output | |
839 | (output is expected to be different than in the --all case) |
|
839 | (output is expected to be different than in the --all case) | |
840 |
|
840 | |||
841 | $ for file in `python $TESTDIR/generate-working-copy-states.py filelist`; do |
|
841 | $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do | |
842 | > echo '### revert for:' $file; |
|
842 | > echo '### revert for:' $file; | |
843 | > hg revert $file; |
|
843 | > hg revert $file; | |
844 | > echo |
|
844 | > echo | |
845 | > done |
|
845 | > done | |
846 | ### revert for: content1_content1_content1-tracked |
|
846 | ### revert for: content1_content1_content1-tracked | |
847 | no changes needed to content1_content1_content1-tracked |
|
847 | no changes needed to content1_content1_content1-tracked | |
848 |
|
848 | |||
849 | ### revert for: content1_content1_content1-untracked |
|
849 | ### revert for: content1_content1_content1-untracked | |
850 |
|
850 | |||
851 | ### revert for: content1_content1_content3-tracked |
|
851 | ### revert for: content1_content1_content3-tracked | |
852 |
|
852 | |||
853 | ### revert for: content1_content1_content3-untracked |
|
853 | ### revert for: content1_content1_content3-untracked | |
854 |
|
854 | |||
855 | ### revert for: content1_content1_missing-tracked |
|
855 | ### revert for: content1_content1_missing-tracked | |
856 |
|
856 | |||
857 | ### revert for: content1_content1_missing-untracked |
|
857 | ### revert for: content1_content1_missing-untracked | |
858 |
|
858 | |||
859 | ### revert for: content1_content2_content1-tracked |
|
859 | ### revert for: content1_content2_content1-tracked | |
860 |
|
860 | |||
861 | ### revert for: content1_content2_content1-untracked |
|
861 | ### revert for: content1_content2_content1-untracked | |
862 |
|
862 | |||
863 | ### revert for: content1_content2_content2-tracked |
|
863 | ### revert for: content1_content2_content2-tracked | |
864 | no changes needed to content1_content2_content2-tracked |
|
864 | no changes needed to content1_content2_content2-tracked | |
865 |
|
865 | |||
866 | ### revert for: content1_content2_content2-untracked |
|
866 | ### revert for: content1_content2_content2-untracked | |
867 |
|
867 | |||
868 | ### revert for: content1_content2_content3-tracked |
|
868 | ### revert for: content1_content2_content3-tracked | |
869 |
|
869 | |||
870 | ### revert for: content1_content2_content3-untracked |
|
870 | ### revert for: content1_content2_content3-untracked | |
871 |
|
871 | |||
872 | ### revert for: content1_content2_missing-tracked |
|
872 | ### revert for: content1_content2_missing-tracked | |
873 |
|
873 | |||
874 | ### revert for: content1_content2_missing-untracked |
|
874 | ### revert for: content1_content2_missing-untracked | |
875 |
|
875 | |||
876 | ### revert for: content1_missing_content1-tracked |
|
876 | ### revert for: content1_missing_content1-tracked | |
877 |
|
877 | |||
878 | ### revert for: content1_missing_content1-untracked |
|
878 | ### revert for: content1_missing_content1-untracked | |
879 | file not managed: content1_missing_content1-untracked |
|
879 | file not managed: content1_missing_content1-untracked | |
880 |
|
880 | |||
881 | ### revert for: content1_missing_content3-tracked |
|
881 | ### revert for: content1_missing_content3-tracked | |
882 |
|
882 | |||
883 | ### revert for: content1_missing_content3-untracked |
|
883 | ### revert for: content1_missing_content3-untracked | |
884 | file not managed: content1_missing_content3-untracked |
|
884 | file not managed: content1_missing_content3-untracked | |
885 |
|
885 | |||
886 | ### revert for: content1_missing_missing-tracked |
|
886 | ### revert for: content1_missing_missing-tracked | |
887 |
|
887 | |||
888 | ### revert for: content1_missing_missing-untracked |
|
888 | ### revert for: content1_missing_missing-untracked | |
889 | content1_missing_missing-untracked: no such file in rev * (glob) |
|
889 | content1_missing_missing-untracked: no such file in rev * (glob) | |
890 |
|
890 | |||
891 | ### revert for: missing_content2_content2-tracked |
|
891 | ### revert for: missing_content2_content2-tracked | |
892 | no changes needed to missing_content2_content2-tracked |
|
892 | no changes needed to missing_content2_content2-tracked | |
893 |
|
893 | |||
894 | ### revert for: missing_content2_content2-untracked |
|
894 | ### revert for: missing_content2_content2-untracked | |
895 |
|
895 | |||
896 | ### revert for: missing_content2_content3-tracked |
|
896 | ### revert for: missing_content2_content3-tracked | |
897 |
|
897 | |||
898 | ### revert for: missing_content2_content3-untracked |
|
898 | ### revert for: missing_content2_content3-untracked | |
899 |
|
899 | |||
900 | ### revert for: missing_content2_missing-tracked |
|
900 | ### revert for: missing_content2_missing-tracked | |
901 |
|
901 | |||
902 | ### revert for: missing_content2_missing-untracked |
|
902 | ### revert for: missing_content2_missing-untracked | |
903 |
|
903 | |||
904 | ### revert for: missing_missing_content3-tracked |
|
904 | ### revert for: missing_missing_content3-tracked | |
905 |
|
905 | |||
906 | ### revert for: missing_missing_content3-untracked |
|
906 | ### revert for: missing_missing_content3-untracked | |
907 | file not managed: missing_missing_content3-untracked |
|
907 | file not managed: missing_missing_content3-untracked | |
908 |
|
908 | |||
909 | ### revert for: missing_missing_missing-tracked |
|
909 | ### revert for: missing_missing_missing-tracked | |
910 |
|
910 | |||
911 | ### revert for: missing_missing_missing-untracked |
|
911 | ### revert for: missing_missing_missing-untracked | |
912 | missing_missing_missing-untracked: no such file in rev * (glob) |
|
912 | missing_missing_missing-untracked: no such file in rev * (glob) | |
913 |
|
913 | |||
914 |
|
914 | |||
915 | check resulting directory against the --all run |
|
915 | check resulting directory against the --all run | |
916 | (There should be no difference) |
|
916 | (There should be no difference) | |
917 |
|
917 | |||
918 | $ python ../dircontent.py > ../content-parent-explicit.txt |
|
918 | $ python ../dircontent.py > ../content-parent-explicit.txt | |
919 | $ cd .. |
|
919 | $ cd .. | |
920 | $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ |
|
920 | $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ | |
921 | [1] |
|
921 | [1] | |
922 |
|
922 | |||
923 | Test revert to "base" content with explicit file name |
|
923 | Test revert to "base" content with explicit file name | |
924 | ----------------------------------------------------- |
|
924 | ----------------------------------------------------- | |
925 |
|
925 | |||
926 | (setup from reference repo) |
|
926 | (setup from reference repo) | |
927 |
|
927 | |||
928 | $ cp -r revert-ref revert-base-explicit |
|
928 | $ cp -r revert-ref revert-base-explicit | |
929 | $ cd revert-base-explicit |
|
929 | $ cd revert-base-explicit | |
930 |
|
930 | |||
931 | revert all files individually and check the output |
|
931 | revert all files individually and check the output | |
932 | (output is expected to be different than in the --all case) |
|
932 | (output is expected to be different than in the --all case) | |
933 |
|
933 | |||
934 | $ for file in `python $TESTDIR/generate-working-copy-states.py filelist`; do |
|
934 | $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do | |
935 | > echo '### revert for:' $file; |
|
935 | > echo '### revert for:' $file; | |
936 | > hg revert $file --rev 'desc(base)'; |
|
936 | > hg revert $file --rev 'desc(base)'; | |
937 | > echo |
|
937 | > echo | |
938 | > done |
|
938 | > done | |
939 | ### revert for: content1_content1_content1-tracked |
|
939 | ### revert for: content1_content1_content1-tracked | |
940 | no changes needed to content1_content1_content1-tracked |
|
940 | no changes needed to content1_content1_content1-tracked | |
941 |
|
941 | |||
942 | ### revert for: content1_content1_content1-untracked |
|
942 | ### revert for: content1_content1_content1-untracked | |
943 |
|
943 | |||
944 | ### revert for: content1_content1_content3-tracked |
|
944 | ### revert for: content1_content1_content3-tracked | |
945 |
|
945 | |||
946 | ### revert for: content1_content1_content3-untracked |
|
946 | ### revert for: content1_content1_content3-untracked | |
947 |
|
947 | |||
948 | ### revert for: content1_content1_missing-tracked |
|
948 | ### revert for: content1_content1_missing-tracked | |
949 |
|
949 | |||
950 | ### revert for: content1_content1_missing-untracked |
|
950 | ### revert for: content1_content1_missing-untracked | |
951 |
|
951 | |||
952 | ### revert for: content1_content2_content1-tracked |
|
952 | ### revert for: content1_content2_content1-tracked | |
953 | no changes needed to content1_content2_content1-tracked |
|
953 | no changes needed to content1_content2_content1-tracked | |
954 |
|
954 | |||
955 | ### revert for: content1_content2_content1-untracked |
|
955 | ### revert for: content1_content2_content1-untracked | |
956 |
|
956 | |||
957 | ### revert for: content1_content2_content2-tracked |
|
957 | ### revert for: content1_content2_content2-tracked | |
958 |
|
958 | |||
959 | ### revert for: content1_content2_content2-untracked |
|
959 | ### revert for: content1_content2_content2-untracked | |
960 |
|
960 | |||
961 | ### revert for: content1_content2_content3-tracked |
|
961 | ### revert for: content1_content2_content3-tracked | |
962 |
|
962 | |||
963 | ### revert for: content1_content2_content3-untracked |
|
963 | ### revert for: content1_content2_content3-untracked | |
964 |
|
964 | |||
965 | ### revert for: content1_content2_missing-tracked |
|
965 | ### revert for: content1_content2_missing-tracked | |
966 |
|
966 | |||
967 | ### revert for: content1_content2_missing-untracked |
|
967 | ### revert for: content1_content2_missing-untracked | |
968 |
|
968 | |||
969 | ### revert for: content1_missing_content1-tracked |
|
969 | ### revert for: content1_missing_content1-tracked | |
970 | no changes needed to content1_missing_content1-tracked |
|
970 | no changes needed to content1_missing_content1-tracked | |
971 |
|
971 | |||
972 | ### revert for: content1_missing_content1-untracked |
|
972 | ### revert for: content1_missing_content1-untracked | |
973 |
|
973 | |||
974 | ### revert for: content1_missing_content3-tracked |
|
974 | ### revert for: content1_missing_content3-tracked | |
975 |
|
975 | |||
976 | ### revert for: content1_missing_content3-untracked |
|
976 | ### revert for: content1_missing_content3-untracked | |
977 |
|
977 | |||
978 | ### revert for: content1_missing_missing-tracked |
|
978 | ### revert for: content1_missing_missing-tracked | |
979 |
|
979 | |||
980 | ### revert for: content1_missing_missing-untracked |
|
980 | ### revert for: content1_missing_missing-untracked | |
981 |
|
981 | |||
982 | ### revert for: missing_content2_content2-tracked |
|
982 | ### revert for: missing_content2_content2-tracked | |
983 |
|
983 | |||
984 | ### revert for: missing_content2_content2-untracked |
|
984 | ### revert for: missing_content2_content2-untracked | |
985 | no changes needed to missing_content2_content2-untracked |
|
985 | no changes needed to missing_content2_content2-untracked | |
986 |
|
986 | |||
987 | ### revert for: missing_content2_content3-tracked |
|
987 | ### revert for: missing_content2_content3-tracked | |
988 |
|
988 | |||
989 | ### revert for: missing_content2_content3-untracked |
|
989 | ### revert for: missing_content2_content3-untracked | |
990 | no changes needed to missing_content2_content3-untracked |
|
990 | no changes needed to missing_content2_content3-untracked | |
991 |
|
991 | |||
992 | ### revert for: missing_content2_missing-tracked |
|
992 | ### revert for: missing_content2_missing-tracked | |
993 |
|
993 | |||
994 | ### revert for: missing_content2_missing-untracked |
|
994 | ### revert for: missing_content2_missing-untracked | |
995 | no changes needed to missing_content2_missing-untracked |
|
995 | no changes needed to missing_content2_missing-untracked | |
996 |
|
996 | |||
997 | ### revert for: missing_missing_content3-tracked |
|
997 | ### revert for: missing_missing_content3-tracked | |
998 |
|
998 | |||
999 | ### revert for: missing_missing_content3-untracked |
|
999 | ### revert for: missing_missing_content3-untracked | |
1000 | file not managed: missing_missing_content3-untracked |
|
1000 | file not managed: missing_missing_content3-untracked | |
1001 |
|
1001 | |||
1002 | ### revert for: missing_missing_missing-tracked |
|
1002 | ### revert for: missing_missing_missing-tracked | |
1003 |
|
1003 | |||
1004 | ### revert for: missing_missing_missing-untracked |
|
1004 | ### revert for: missing_missing_missing-untracked | |
1005 | missing_missing_missing-untracked: no such file in rev * (glob) |
|
1005 | missing_missing_missing-untracked: no such file in rev * (glob) | |
1006 |
|
1006 | |||
1007 |
|
1007 | |||
1008 | check resulting directory against the --all run |
|
1008 | check resulting directory against the --all run | |
1009 | (There should be no difference) |
|
1009 | (There should be no difference) | |
1010 |
|
1010 | |||
1011 | $ python ../dircontent.py > ../content-base-explicit.txt |
|
1011 | $ python ../dircontent.py > ../content-base-explicit.txt | |
1012 | $ cd .. |
|
1012 | $ cd .. | |
1013 | $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _ |
|
1013 | $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _ | |
1014 | [1] |
|
1014 | [1] |
@@ -1,166 +1,166 b'' | |||||
1 | Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get |
|
1 | Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get | |
2 | combined correctly with the dirstate status. |
|
2 | combined correctly with the dirstate status. | |
3 |
|
3 | |||
4 | $ hg init |
|
4 | $ hg init | |
5 |
|
5 | |||
6 | First commit |
|
6 | First commit | |
7 |
|
7 | |||
8 |
$ python $TESTDIR/generate-working-copy-states.py |
|
8 | $ python $TESTDIR/generate-working-copy-states.py state 2 1 | |
9 | $ hg addremove --similarity 0 |
|
9 | $ hg addremove --similarity 0 | |
10 | adding content1_content1_content1-tracked |
|
10 | adding content1_content1_content1-tracked | |
11 | adding content1_content1_content1-untracked |
|
11 | adding content1_content1_content1-untracked | |
12 | adding content1_content1_content3-tracked |
|
12 | adding content1_content1_content3-tracked | |
13 | adding content1_content1_content3-untracked |
|
13 | adding content1_content1_content3-untracked | |
14 | adding content1_content1_missing-tracked |
|
14 | adding content1_content1_missing-tracked | |
15 | adding content1_content1_missing-untracked |
|
15 | adding content1_content1_missing-untracked | |
16 | adding content1_content2_content1-tracked |
|
16 | adding content1_content2_content1-tracked | |
17 | adding content1_content2_content1-untracked |
|
17 | adding content1_content2_content1-untracked | |
18 | adding content1_content2_content2-tracked |
|
18 | adding content1_content2_content2-tracked | |
19 | adding content1_content2_content2-untracked |
|
19 | adding content1_content2_content2-untracked | |
20 | adding content1_content2_content3-tracked |
|
20 | adding content1_content2_content3-tracked | |
21 | adding content1_content2_content3-untracked |
|
21 | adding content1_content2_content3-untracked | |
22 | adding content1_content2_missing-tracked |
|
22 | adding content1_content2_missing-tracked | |
23 | adding content1_content2_missing-untracked |
|
23 | adding content1_content2_missing-untracked | |
24 | adding content1_missing_content1-tracked |
|
24 | adding content1_missing_content1-tracked | |
25 | adding content1_missing_content1-untracked |
|
25 | adding content1_missing_content1-untracked | |
26 | adding content1_missing_content3-tracked |
|
26 | adding content1_missing_content3-tracked | |
27 | adding content1_missing_content3-untracked |
|
27 | adding content1_missing_content3-untracked | |
28 | adding content1_missing_missing-tracked |
|
28 | adding content1_missing_missing-tracked | |
29 | adding content1_missing_missing-untracked |
|
29 | adding content1_missing_missing-untracked | |
30 | $ hg commit -m first |
|
30 | $ hg commit -m first | |
31 |
|
31 | |||
32 | Second commit |
|
32 | Second commit | |
33 |
|
33 | |||
34 |
$ python $TESTDIR/generate-working-copy-states.py |
|
34 | $ python $TESTDIR/generate-working-copy-states.py state 2 2 | |
35 | $ hg addremove --similarity 0 |
|
35 | $ hg addremove --similarity 0 | |
36 | removing content1_missing_content1-tracked |
|
36 | removing content1_missing_content1-tracked | |
37 | removing content1_missing_content1-untracked |
|
37 | removing content1_missing_content1-untracked | |
38 | removing content1_missing_content3-tracked |
|
38 | removing content1_missing_content3-tracked | |
39 | removing content1_missing_content3-untracked |
|
39 | removing content1_missing_content3-untracked | |
40 | removing content1_missing_missing-tracked |
|
40 | removing content1_missing_missing-tracked | |
41 | removing content1_missing_missing-untracked |
|
41 | removing content1_missing_missing-untracked | |
42 | adding missing_content2_content2-tracked |
|
42 | adding missing_content2_content2-tracked | |
43 | adding missing_content2_content2-untracked |
|
43 | adding missing_content2_content2-untracked | |
44 | adding missing_content2_content3-tracked |
|
44 | adding missing_content2_content3-tracked | |
45 | adding missing_content2_content3-untracked |
|
45 | adding missing_content2_content3-untracked | |
46 | adding missing_content2_missing-tracked |
|
46 | adding missing_content2_missing-tracked | |
47 | adding missing_content2_missing-untracked |
|
47 | adding missing_content2_missing-untracked | |
48 | $ hg commit -m second |
|
48 | $ hg commit -m second | |
49 |
|
49 | |||
50 | Working copy |
|
50 | Working copy | |
51 |
|
51 | |||
52 | $ python $TESTDIR/generate-working-copy-states.py wc |
|
52 | $ python $TESTDIR/generate-working-copy-states.py state 2 wc | |
53 | $ hg addremove --similarity 0 |
|
53 | $ hg addremove --similarity 0 | |
54 | adding content1_missing_content1-tracked |
|
54 | adding content1_missing_content1-tracked | |
55 | adding content1_missing_content1-untracked |
|
55 | adding content1_missing_content1-untracked | |
56 | adding content1_missing_content3-tracked |
|
56 | adding content1_missing_content3-tracked | |
57 | adding content1_missing_content3-untracked |
|
57 | adding content1_missing_content3-untracked | |
58 | adding content1_missing_missing-tracked |
|
58 | adding content1_missing_missing-tracked | |
59 | adding content1_missing_missing-untracked |
|
59 | adding content1_missing_missing-untracked | |
60 | adding missing_missing_content3-tracked |
|
60 | adding missing_missing_content3-tracked | |
61 | adding missing_missing_content3-untracked |
|
61 | adding missing_missing_content3-untracked | |
62 | adding missing_missing_missing-tracked |
|
62 | adding missing_missing_missing-tracked | |
63 | adding missing_missing_missing-untracked |
|
63 | adding missing_missing_missing-untracked | |
64 | $ hg forget *_*_*-untracked |
|
64 | $ hg forget *_*_*-untracked | |
65 | $ rm *_*_missing-* |
|
65 | $ rm *_*_missing-* | |
66 |
|
66 | |||
67 | Status compared to parent of the working copy, i.e. the dirstate status |
|
67 | Status compared to parent of the working copy, i.e. the dirstate status | |
68 |
|
68 | |||
69 | $ hg status -A --rev 1 'glob:missing_content2_content3-tracked' |
|
69 | $ hg status -A --rev 1 'glob:missing_content2_content3-tracked' | |
70 | M missing_content2_content3-tracked |
|
70 | M missing_content2_content3-tracked | |
71 | $ hg status -A --rev 1 'glob:missing_content2_content2-tracked' |
|
71 | $ hg status -A --rev 1 'glob:missing_content2_content2-tracked' | |
72 | C missing_content2_content2-tracked |
|
72 | C missing_content2_content2-tracked | |
73 | $ hg status -A --rev 1 'glob:missing_missing_content3-tracked' |
|
73 | $ hg status -A --rev 1 'glob:missing_missing_content3-tracked' | |
74 | A missing_missing_content3-tracked |
|
74 | A missing_missing_content3-tracked | |
75 | $ hg status -A --rev 1 'glob:missing_missing_content3-untracked' |
|
75 | $ hg status -A --rev 1 'glob:missing_missing_content3-untracked' | |
76 | ? missing_missing_content3-untracked |
|
76 | ? missing_missing_content3-untracked | |
77 | $ hg status -A --rev 1 'glob:missing_content2_*-untracked' |
|
77 | $ hg status -A --rev 1 'glob:missing_content2_*-untracked' | |
78 | R missing_content2_content2-untracked |
|
78 | R missing_content2_content2-untracked | |
79 | R missing_content2_content3-untracked |
|
79 | R missing_content2_content3-untracked | |
80 | R missing_content2_missing-untracked |
|
80 | R missing_content2_missing-untracked | |
81 | $ hg status -A --rev 1 'glob:missing_*_missing-tracked' |
|
81 | $ hg status -A --rev 1 'glob:missing_*_missing-tracked' | |
82 | ! missing_content2_missing-tracked |
|
82 | ! missing_content2_missing-tracked | |
83 | ! missing_missing_missing-tracked |
|
83 | ! missing_missing_missing-tracked | |
84 | #if windows |
|
84 | #if windows | |
85 | $ hg status -A --rev 1 'glob:missing_missing_missing-untracked' |
|
85 | $ hg status -A --rev 1 'glob:missing_missing_missing-untracked' | |
86 | missing_missing_missing-untracked: The system cannot find the file specified |
|
86 | missing_missing_missing-untracked: The system cannot find the file specified | |
87 | #else |
|
87 | #else | |
88 | $ hg status -A --rev 1 'glob:missing_missing_missing-untracked' |
|
88 | $ hg status -A --rev 1 'glob:missing_missing_missing-untracked' | |
89 | missing_missing_missing-untracked: No such file or directory |
|
89 | missing_missing_missing-untracked: No such file or directory | |
90 | #endif |
|
90 | #endif | |
91 |
|
91 | |||
92 | Status between first and second commit. Should ignore dirstate status. |
|
92 | Status between first and second commit. Should ignore dirstate status. | |
93 |
|
93 | |||
94 | $ hg status -A --rev 0:1 'glob:content1_content2_*' |
|
94 | $ hg status -A --rev 0:1 'glob:content1_content2_*' | |
95 | M content1_content2_content1-tracked |
|
95 | M content1_content2_content1-tracked | |
96 | M content1_content2_content1-untracked |
|
96 | M content1_content2_content1-untracked | |
97 | M content1_content2_content2-tracked |
|
97 | M content1_content2_content2-tracked | |
98 | M content1_content2_content2-untracked |
|
98 | M content1_content2_content2-untracked | |
99 | M content1_content2_content3-tracked |
|
99 | M content1_content2_content3-tracked | |
100 | M content1_content2_content3-untracked |
|
100 | M content1_content2_content3-untracked | |
101 | M content1_content2_missing-tracked |
|
101 | M content1_content2_missing-tracked | |
102 | M content1_content2_missing-untracked |
|
102 | M content1_content2_missing-untracked | |
103 | $ hg status -A --rev 0:1 'glob:content1_content1_*' |
|
103 | $ hg status -A --rev 0:1 'glob:content1_content1_*' | |
104 | C content1_content1_content1-tracked |
|
104 | C content1_content1_content1-tracked | |
105 | C content1_content1_content1-untracked |
|
105 | C content1_content1_content1-untracked | |
106 | C content1_content1_content3-tracked |
|
106 | C content1_content1_content3-tracked | |
107 | C content1_content1_content3-untracked |
|
107 | C content1_content1_content3-untracked | |
108 | C content1_content1_missing-tracked |
|
108 | C content1_content1_missing-tracked | |
109 | C content1_content1_missing-untracked |
|
109 | C content1_content1_missing-untracked | |
110 | $ hg status -A --rev 0:1 'glob:missing_content2_*' |
|
110 | $ hg status -A --rev 0:1 'glob:missing_content2_*' | |
111 | A missing_content2_content2-tracked |
|
111 | A missing_content2_content2-tracked | |
112 | A missing_content2_content2-untracked |
|
112 | A missing_content2_content2-untracked | |
113 | A missing_content2_content3-tracked |
|
113 | A missing_content2_content3-tracked | |
114 | A missing_content2_content3-untracked |
|
114 | A missing_content2_content3-untracked | |
115 | A missing_content2_missing-tracked |
|
115 | A missing_content2_missing-tracked | |
116 | A missing_content2_missing-untracked |
|
116 | A missing_content2_missing-untracked | |
117 | $ hg status -A --rev 0:1 'glob:content1_missing_*' |
|
117 | $ hg status -A --rev 0:1 'glob:content1_missing_*' | |
118 | R content1_missing_content1-tracked |
|
118 | R content1_missing_content1-tracked | |
119 | R content1_missing_content1-untracked |
|
119 | R content1_missing_content1-untracked | |
120 | R content1_missing_content3-tracked |
|
120 | R content1_missing_content3-tracked | |
121 | R content1_missing_content3-untracked |
|
121 | R content1_missing_content3-untracked | |
122 | R content1_missing_missing-tracked |
|
122 | R content1_missing_missing-tracked | |
123 | R content1_missing_missing-untracked |
|
123 | R content1_missing_missing-untracked | |
124 | $ hg status -A --rev 0:1 'glob:missing_missing_*' |
|
124 | $ hg status -A --rev 0:1 'glob:missing_missing_*' | |
125 |
|
125 | |||
126 | Status compared to one revision back, checking that the dirstate status |
|
126 | Status compared to one revision back, checking that the dirstate status | |
127 | is correctly combined with the inter-revision status |
|
127 | is correctly combined with the inter-revision status | |
128 |
|
128 | |||
129 | $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked' |
|
129 | $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked' | |
130 | M content1_content1_content3-tracked |
|
130 | M content1_content1_content3-tracked | |
131 | M content1_content2_content2-tracked |
|
131 | M content1_content2_content2-tracked | |
132 | M content1_content2_content3-tracked |
|
132 | M content1_content2_content3-tracked | |
133 | M content1_missing_content3-tracked |
|
133 | M content1_missing_content3-tracked | |
134 | $ hg status -A --rev 0 'glob:content1_*_content1-tracked' |
|
134 | $ hg status -A --rev 0 'glob:content1_*_content1-tracked' | |
135 | C content1_content1_content1-tracked |
|
135 | C content1_content1_content1-tracked | |
136 | C content1_content2_content1-tracked |
|
136 | C content1_content2_content1-tracked | |
137 | C content1_missing_content1-tracked |
|
137 | C content1_missing_content1-tracked | |
138 | $ hg status -A --rev 0 'glob:missing_*_content?-tracked' |
|
138 | $ hg status -A --rev 0 'glob:missing_*_content?-tracked' | |
139 | A missing_content2_content2-tracked |
|
139 | A missing_content2_content2-tracked | |
140 | A missing_content2_content3-tracked |
|
140 | A missing_content2_content3-tracked | |
141 | A missing_missing_content3-tracked |
|
141 | A missing_missing_content3-tracked | |
142 | BROKEN: missing_content2_content[23]-untracked exist, so should be listed |
|
142 | BROKEN: missing_content2_content[23]-untracked exist, so should be listed | |
143 | $ hg status -A --rev 0 'glob:missing_*_content?-untracked' |
|
143 | $ hg status -A --rev 0 'glob:missing_*_content?-untracked' | |
144 | ? missing_missing_content3-untracked |
|
144 | ? missing_missing_content3-untracked | |
145 | $ hg status -A --rev 0 'glob:content1_*_*-untracked' |
|
145 | $ hg status -A --rev 0 'glob:content1_*_*-untracked' | |
146 | R content1_content1_content1-untracked |
|
146 | R content1_content1_content1-untracked | |
147 | R content1_content1_content3-untracked |
|
147 | R content1_content1_content3-untracked | |
148 | R content1_content1_missing-untracked |
|
148 | R content1_content1_missing-untracked | |
149 | R content1_content2_content1-untracked |
|
149 | R content1_content2_content1-untracked | |
150 | R content1_content2_content2-untracked |
|
150 | R content1_content2_content2-untracked | |
151 | R content1_content2_content3-untracked |
|
151 | R content1_content2_content3-untracked | |
152 | R content1_content2_missing-untracked |
|
152 | R content1_content2_missing-untracked | |
153 | R content1_missing_content1-untracked |
|
153 | R content1_missing_content1-untracked | |
154 | R content1_missing_content3-untracked |
|
154 | R content1_missing_content3-untracked | |
155 | R content1_missing_missing-untracked |
|
155 | R content1_missing_missing-untracked | |
156 | BROKEN: content1_*_missing-tracked appear twice; should just be '!' |
|
156 | BROKEN: content1_*_missing-tracked appear twice; should just be '!' | |
157 | $ hg status -A --rev 0 'glob:*_*_missing-tracked' |
|
157 | $ hg status -A --rev 0 'glob:*_*_missing-tracked' | |
158 | R content1_missing_missing-tracked |
|
158 | R content1_missing_missing-tracked | |
159 | ! content1_content1_missing-tracked |
|
159 | ! content1_content1_missing-tracked | |
160 | ! content1_content2_missing-tracked |
|
160 | ! content1_content2_missing-tracked | |
161 | ! content1_missing_missing-tracked |
|
161 | ! content1_missing_missing-tracked | |
162 | ! missing_content2_missing-tracked |
|
162 | ! missing_content2_missing-tracked | |
163 | ! missing_missing_missing-tracked |
|
163 | ! missing_missing_missing-tracked | |
164 | C content1_content1_missing-tracked |
|
164 | C content1_content1_missing-tracked | |
165 | C content1_content2_missing-tracked |
|
165 | C content1_content2_missing-tracked | |
166 | $ hg status -A --rev 0 'glob:missing_*_missing-untracked' |
|
166 | $ hg status -A --rev 0 'glob:missing_*_missing-untracked' |
General Comments 0
You need to be logged in to leave comments.
Login now