Show More
@@ -1,501 +1,503 b'' | |||||
1 | # merge.py - directory-level update/merge handling for Mercurial |
|
1 | # merge.py - directory-level update/merge handling for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2, incorporated herein by reference. |
|
6 | # GNU General Public License version 2, incorporated herein by reference. | |
7 |
|
7 | |||
8 | from node import nullid, nullrev, hex, bin |
|
8 | from node import nullid, nullrev, hex, bin | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 | import util, filemerge, copies |
|
10 | import util, filemerge, copies | |
11 | import errno, os, shutil |
|
11 | import errno, os, shutil | |
12 |
|
12 | |||
13 | class mergestate(object): |
|
13 | class mergestate(object): | |
14 | '''track 3-way merge state of individual files''' |
|
14 | '''track 3-way merge state of individual files''' | |
15 | def __init__(self, repo): |
|
15 | def __init__(self, repo): | |
16 | self._repo = repo |
|
16 | self._repo = repo | |
17 | self._read() |
|
17 | self._read() | |
18 | def reset(self, node=None): |
|
18 | def reset(self, node=None): | |
19 | self._state = {} |
|
19 | self._state = {} | |
20 | if node: |
|
20 | if node: | |
21 | self._local = node |
|
21 | self._local = node | |
22 | shutil.rmtree(self._repo.join("merge"), True) |
|
22 | shutil.rmtree(self._repo.join("merge"), True) | |
23 | def _read(self): |
|
23 | def _read(self): | |
24 | self._state = {} |
|
24 | self._state = {} | |
25 | try: |
|
25 | try: | |
26 | localnode = None |
|
26 | localnode = None | |
27 | f = self._repo.opener("merge/state") |
|
27 | f = self._repo.opener("merge/state") | |
28 | for i, l in enumerate(f): |
|
28 | for i, l in enumerate(f): | |
29 | if i == 0: |
|
29 | if i == 0: | |
30 | localnode = l[:-1] |
|
30 | localnode = l[:-1] | |
31 | else: |
|
31 | else: | |
32 | bits = l[:-1].split("\0") |
|
32 | bits = l[:-1].split("\0") | |
33 | self._state[bits[0]] = bits[1:] |
|
33 | self._state[bits[0]] = bits[1:] | |
34 | self._local = bin(localnode) |
|
34 | self._local = bin(localnode) | |
35 | except IOError, err: |
|
35 | except IOError, err: | |
36 | if err.errno != errno.ENOENT: |
|
36 | if err.errno != errno.ENOENT: | |
37 | raise |
|
37 | raise | |
38 | def _write(self): |
|
38 | def _write(self): | |
39 | f = self._repo.opener("merge/state", "w") |
|
39 | f = self._repo.opener("merge/state", "w") | |
40 | f.write(hex(self._local) + "\n") |
|
40 | f.write(hex(self._local) + "\n") | |
41 | for d, v in self._state.iteritems(): |
|
41 | for d, v in self._state.iteritems(): | |
42 | f.write("\0".join([d] + v) + "\n") |
|
42 | f.write("\0".join([d] + v) + "\n") | |
43 | def add(self, fcl, fco, fca, fd, flags): |
|
43 | def add(self, fcl, fco, fca, fd, flags): | |
44 | hash = util.sha1(fcl.path()).hexdigest() |
|
44 | hash = util.sha1(fcl.path()).hexdigest() | |
45 | self._repo.opener("merge/" + hash, "w").write(fcl.data()) |
|
45 | self._repo.opener("merge/" + hash, "w").write(fcl.data()) | |
46 | self._state[fd] = ['u', hash, fcl.path(), fca.path(), |
|
46 | self._state[fd] = ['u', hash, fcl.path(), fca.path(), | |
47 | hex(fca.filenode()), fco.path(), flags] |
|
47 | hex(fca.filenode()), fco.path(), flags] | |
48 | self._write() |
|
48 | self._write() | |
49 | def __contains__(self, dfile): |
|
49 | def __contains__(self, dfile): | |
50 | return dfile in self._state |
|
50 | return dfile in self._state | |
51 | def __getitem__(self, dfile): |
|
51 | def __getitem__(self, dfile): | |
52 | return self._state[dfile][0] |
|
52 | return self._state[dfile][0] | |
53 | def __iter__(self): |
|
53 | def __iter__(self): | |
54 | l = self._state.keys() |
|
54 | l = self._state.keys() | |
55 | l.sort() |
|
55 | l.sort() | |
56 | for f in l: |
|
56 | for f in l: | |
57 | yield f |
|
57 | yield f | |
58 | def mark(self, dfile, state): |
|
58 | def mark(self, dfile, state): | |
59 | self._state[dfile][0] = state |
|
59 | self._state[dfile][0] = state | |
60 | self._write() |
|
60 | self._write() | |
61 | def resolve(self, dfile, wctx, octx): |
|
61 | def resolve(self, dfile, wctx, octx): | |
62 | if self[dfile] == 'r': |
|
62 | if self[dfile] == 'r': | |
63 | return 0 |
|
63 | return 0 | |
64 | state, hash, lfile, afile, anode, ofile, flags = self._state[dfile] |
|
64 | state, hash, lfile, afile, anode, ofile, flags = self._state[dfile] | |
65 | f = self._repo.opener("merge/" + hash) |
|
65 | f = self._repo.opener("merge/" + hash) | |
66 | self._repo.wwrite(dfile, f.read(), flags) |
|
66 | self._repo.wwrite(dfile, f.read(), flags) | |
67 | fcd = wctx[dfile] |
|
67 | fcd = wctx[dfile] | |
68 | fco = octx[ofile] |
|
68 | fco = octx[ofile] | |
69 | fca = self._repo.filectx(afile, fileid=anode) |
|
69 | fca = self._repo.filectx(afile, fileid=anode) | |
70 | r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca) |
|
70 | r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca) | |
71 | if not r: |
|
71 | if not r: | |
72 | self.mark(dfile, 'r') |
|
72 | self.mark(dfile, 'r') | |
73 | return r |
|
73 | return r | |
74 |
|
74 | |||
75 | def _checkunknown(wctx, mctx): |
|
75 | def _checkunknown(wctx, mctx): | |
76 | "check for collisions between unknown files and files in mctx" |
|
76 | "check for collisions between unknown files and files in mctx" | |
77 | for f in wctx.unknown(): |
|
77 | for f in wctx.unknown(): | |
78 | if f in mctx and mctx[f].cmp(wctx[f].data()): |
|
78 | if f in mctx and mctx[f].cmp(wctx[f].data()): | |
79 | raise util.Abort(_("untracked file in working directory differs" |
|
79 | raise util.Abort(_("untracked file in working directory differs" | |
80 | " from file in requested revision: '%s'") % f) |
|
80 | " from file in requested revision: '%s'") % f) | |
81 |
|
81 | |||
82 | def _checkcollision(mctx): |
|
82 | def _checkcollision(mctx): | |
83 | "check for case folding collisions in the destination context" |
|
83 | "check for case folding collisions in the destination context" | |
84 | folded = {} |
|
84 | folded = {} | |
85 | for fn in mctx: |
|
85 | for fn in mctx: | |
86 | fold = fn.lower() |
|
86 | fold = fn.lower() | |
87 | if fold in folded: |
|
87 | if fold in folded: | |
88 | raise util.Abort(_("case-folding collision between %s and %s") |
|
88 | raise util.Abort(_("case-folding collision between %s and %s") | |
89 | % (fn, folded[fold])) |
|
89 | % (fn, folded[fold])) | |
90 | folded[fold] = fn |
|
90 | folded[fold] = fn | |
91 |
|
91 | |||
92 | def _forgetremoved(wctx, mctx, branchmerge): |
|
92 | def _forgetremoved(wctx, mctx, branchmerge): | |
93 | """ |
|
93 | """ | |
94 | Forget removed files |
|
94 | Forget removed files | |
95 |
|
95 | |||
96 | If we're jumping between revisions (as opposed to merging), and if |
|
96 | If we're jumping between revisions (as opposed to merging), and if | |
97 | neither the working directory nor the target rev has the file, |
|
97 | neither the working directory nor the target rev has the file, | |
98 | then we need to remove it from the dirstate, to prevent the |
|
98 | then we need to remove it from the dirstate, to prevent the | |
99 | dirstate from listing the file when it is no longer in the |
|
99 | dirstate from listing the file when it is no longer in the | |
100 | manifest. |
|
100 | manifest. | |
101 |
|
101 | |||
102 | If we're merging, and the other revision has removed a file |
|
102 | If we're merging, and the other revision has removed a file | |
103 | that is not present in the working directory, we need to mark it |
|
103 | that is not present in the working directory, we need to mark it | |
104 | as removed. |
|
104 | as removed. | |
105 | """ |
|
105 | """ | |
106 |
|
106 | |||
107 | action = [] |
|
107 | action = [] | |
108 | state = branchmerge and 'r' or 'f' |
|
108 | state = branchmerge and 'r' or 'f' | |
109 | for f in wctx.deleted(): |
|
109 | for f in wctx.deleted(): | |
110 | if f not in mctx: |
|
110 | if f not in mctx: | |
111 | action.append((f, state)) |
|
111 | action.append((f, state)) | |
112 |
|
112 | |||
113 | if not branchmerge: |
|
113 | if not branchmerge: | |
114 | for f in wctx.removed(): |
|
114 | for f in wctx.removed(): | |
115 | if f not in mctx: |
|
115 | if f not in mctx: | |
116 | action.append((f, "f")) |
|
116 | action.append((f, "f")) | |
117 |
|
117 | |||
118 | return action |
|
118 | return action | |
119 |
|
119 | |||
120 | def manifestmerge(repo, p1, p2, pa, overwrite, partial): |
|
120 | def manifestmerge(repo, p1, p2, pa, overwrite, partial): | |
121 | """ |
|
121 | """ | |
122 | Merge p1 and p2 with ancestor ma and generate merge action list |
|
122 | Merge p1 and p2 with ancestor ma and generate merge action list | |
123 |
|
123 | |||
124 | overwrite = whether we clobber working files |
|
124 | overwrite = whether we clobber working files | |
125 | partial = function to filter file lists |
|
125 | partial = function to filter file lists | |
126 | """ |
|
126 | """ | |
127 |
|
127 | |||
128 | repo.ui.note(_("resolving manifests\n")) |
|
128 | repo.ui.note(_("resolving manifests\n")) | |
129 | repo.ui.debug(_(" overwrite %s partial %s\n") % (overwrite, bool(partial))) |
|
129 | repo.ui.debug(_(" overwrite %s partial %s\n") % (overwrite, bool(partial))) | |
130 | repo.ui.debug(_(" ancestor %s local %s remote %s\n") % (pa, p1, p2)) |
|
130 | repo.ui.debug(_(" ancestor %s local %s remote %s\n") % (pa, p1, p2)) | |
131 |
|
131 | |||
132 | m1 = p1.manifest() |
|
132 | m1 = p1.manifest() | |
133 | m2 = p2.manifest() |
|
133 | m2 = p2.manifest() | |
134 | ma = pa.manifest() |
|
134 | ma = pa.manifest() | |
135 | backwards = (pa == p2) |
|
135 | backwards = (pa == p2) | |
136 | action = [] |
|
136 | action = [] | |
137 | copy, copied, diverge = {}, {}, {} |
|
137 | copy, copied, diverge = {}, {}, {} | |
138 |
|
138 | |||
139 | def fmerge(f, f2=None, fa=None): |
|
139 | def fmerge(f, f2=None, fa=None): | |
140 | """merge flags""" |
|
140 | """merge flags""" | |
141 | if not f2: |
|
141 | if not f2: | |
142 | f2 = f |
|
142 | f2 = f | |
143 | fa = f |
|
143 | fa = f | |
144 | a, m, n = ma.flags(fa), m1.flags(f), m2.flags(f2) |
|
144 | a, m, n = ma.flags(fa), m1.flags(f), m2.flags(f2) | |
145 | if m == n: # flags agree |
|
145 | if m == n: # flags agree | |
146 | return m # unchanged |
|
146 | return m # unchanged | |
147 | if m and n: # flags are set but don't agree |
|
147 | if m and n: # flags are set but don't agree | |
148 | if not a: # both differ from parent |
|
148 | if not a: # both differ from parent | |
149 | r = repo.ui.prompt( |
|
149 | r = repo.ui.prompt( | |
150 | _(" conflicting flags for %s\n" |
|
150 | _(" conflicting flags for %s\n" | |
151 | "(n)one, e(x)ec or sym(l)ink?") % f, |
|
151 | "(n)one, e(x)ec or sym(l)ink?") % f, | |
152 | (_("&None"), _("E&xec"), _("Sym&link")), _("n")) |
|
152 | (_("&None"), _("E&xec"), _("Sym&link")), _("n")) | |
153 | return r != _("n") and r or '' |
|
153 | return r != _("n") and r or '' | |
154 | if m == a: |
|
154 | if m == a: | |
155 | return n # changed from m to n |
|
155 | return n # changed from m to n | |
156 | return m # changed from n to m |
|
156 | return m # changed from n to m | |
157 | if m and m != a: # changed from a to m |
|
157 | if m and m != a: # changed from a to m | |
158 | return m |
|
158 | return m | |
159 | if n and n != a: # changed from a to n |
|
159 | if n and n != a: # changed from a to n | |
160 | return n |
|
160 | return n | |
161 | return '' # flag was cleared |
|
161 | return '' # flag was cleared | |
162 |
|
162 | |||
163 | def act(msg, m, f, *args): |
|
163 | def act(msg, m, f, *args): | |
164 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
|
164 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) | |
165 | action.append((f, m) + args) |
|
165 | action.append((f, m) + args) | |
166 |
|
166 | |||
167 | if pa and not (backwards or overwrite): |
|
167 | if pa and not (backwards or overwrite): | |
168 | if repo.ui.configbool("merge", "followcopies", True): |
|
168 | if repo.ui.configbool("merge", "followcopies", True): | |
169 | dirs = repo.ui.configbool("merge", "followdirs", True) |
|
169 | dirs = repo.ui.configbool("merge", "followdirs", True) | |
170 | copy, diverge = copies.copies(repo, p1, p2, pa, dirs) |
|
170 | copy, diverge = copies.copies(repo, p1, p2, pa, dirs) | |
171 | copied = set(copy.values()) |
|
171 | copied = set(copy.values()) | |
172 | for of, fl in diverge.iteritems(): |
|
172 | for of, fl in diverge.iteritems(): | |
173 | act("divergent renames", "dr", of, fl) |
|
173 | act("divergent renames", "dr", of, fl) | |
174 |
|
174 | |||
175 | # Compare manifests |
|
175 | # Compare manifests | |
176 | for f, n in m1.iteritems(): |
|
176 | for f, n in m1.iteritems(): | |
177 | if partial and not partial(f): |
|
177 | if partial and not partial(f): | |
178 | continue |
|
178 | continue | |
179 | if f in m2: |
|
179 | if f in m2: | |
180 | if overwrite or backwards: |
|
180 | if overwrite or backwards: | |
181 | rflags = m2.flags(f) |
|
181 | rflags = m2.flags(f) | |
182 | else: |
|
182 | else: | |
183 | rflags = fmerge(f) |
|
183 | rflags = fmerge(f) | |
184 | # are files different? |
|
184 | # are files different? | |
185 | if n != m2[f]: |
|
185 | if n != m2[f]: | |
186 | a = ma.get(f, nullid) |
|
186 | a = ma.get(f, nullid) | |
187 | # are we clobbering? |
|
187 | # are we clobbering? | |
188 | if overwrite: |
|
188 | if overwrite: | |
189 | act("clobbering", "g", f, rflags) |
|
189 | act("clobbering", "g", f, rflags) | |
190 | # or are we going back in time and clean? |
|
190 | # or are we going back in time and clean? | |
191 | elif backwards: |
|
191 | elif backwards: | |
192 | if not n[20:] or not p2[f].cmp(p1[f].data()): |
|
192 | if not n[20:] or not p2[f].cmp(p1[f].data()): | |
193 | act("reverting", "g", f, rflags) |
|
193 | act("reverting", "g", f, rflags) | |
194 | # are both different from the ancestor? |
|
194 | # are both different from the ancestor? | |
195 | elif n != a and m2[f] != a: |
|
195 | elif n != a and m2[f] != a: | |
196 | act("versions differ", "m", f, f, f, rflags, False) |
|
196 | act("versions differ", "m", f, f, f, rflags, False) | |
197 | # is remote's version newer? |
|
197 | # is remote's version newer? | |
198 | elif m2[f] != a: |
|
198 | elif m2[f] != a: | |
199 | act("remote is newer", "g", f, rflags) |
|
199 | act("remote is newer", "g", f, rflags) | |
200 | # local is newer, not overwrite, check mode bits |
|
200 | # local is newer, not overwrite, check mode bits | |
201 | elif m1.flags(f) != rflags: |
|
201 | elif m1.flags(f) != rflags: | |
202 | act("update permissions", "e", f, rflags) |
|
202 | act("update permissions", "e", f, rflags) | |
203 | # contents same, check mode bits |
|
203 | # contents same, check mode bits | |
204 | elif m1.flags(f) != rflags: |
|
204 | elif m1.flags(f) != rflags: | |
205 | act("update permissions", "e", f, rflags) |
|
205 | act("update permissions", "e", f, rflags) | |
206 | elif f in copied: |
|
206 | elif f in copied: | |
207 | continue |
|
207 | continue | |
208 | elif f in copy: |
|
208 | elif f in copy: | |
209 | f2 = copy[f] |
|
209 | f2 = copy[f] | |
210 | if f2 not in m2: # directory rename |
|
210 | if f2 not in m2: # directory rename | |
211 | act("remote renamed directory to " + f2, "d", |
|
211 | act("remote renamed directory to " + f2, "d", | |
212 | f, None, f2, m1.flags(f)) |
|
212 | f, None, f2, m1.flags(f)) | |
213 | elif f2 in m1: # case 2 A,B/B/B |
|
213 | elif f2 in m1: # case 2 A,B/B/B | |
214 | act("local copied to " + f2, "m", |
|
214 | act("local copied to " + f2, "m", | |
215 | f, f2, f, fmerge(f, f2, f2), False) |
|
215 | f, f2, f, fmerge(f, f2, f2), False) | |
216 | else: # case 4,21 A/B/B |
|
216 | else: # case 4,21 A/B/B | |
217 | act("local moved to " + f2, "m", |
|
217 | act("local moved to " + f2, "m", | |
218 | f, f2, f, fmerge(f, f2, f2), False) |
|
218 | f, f2, f, fmerge(f, f2, f2), False) | |
219 | elif f in ma: |
|
219 | elif f in ma: | |
220 | if n != ma[f] and not overwrite: |
|
220 | if n != ma[f] and not overwrite: | |
221 | if repo.ui.prompt( |
|
221 | if repo.ui.prompt( | |
222 | _(" local changed %s which remote deleted\n" |
|
222 | _(" local changed %s which remote deleted\n" | |
223 | "use (c)hanged version or (d)elete?") % f, |
|
223 | "use (c)hanged version or (d)elete?") % f, | |
224 | (_("&Changed"), _("&Delete")), _("c")) == _("d"): |
|
224 | (_("&Changed"), _("&Delete")), _("c")) == _("d"): | |
225 | act("prompt delete", "r", f) |
|
225 | act("prompt delete", "r", f) | |
226 | act("prompt keep", "a", f) |
|
226 | act("prompt keep", "a", f) | |
227 | else: |
|
227 | else: | |
228 | act("other deleted", "r", f) |
|
228 | act("other deleted", "r", f) | |
|
229 | elif overwrite and n[20:] == "a": # do not erase the working copy | |||
|
230 | act("remote deleted", "f", f) | |||
229 | else: |
|
231 | else: | |
230 | # file is created on branch or in working directory |
|
232 | # file is created on branch or in working directory | |
231 | if (overwrite and n[20:] != "u") or (backwards and not n[20:]): |
|
233 | if (overwrite and n[20:] != "u") or (backwards and not n[20:]): | |
232 | act("remote deleted", "r", f) |
|
234 | act("remote deleted", "r", f) | |
233 |
|
235 | |||
234 | for f, n in m2.iteritems(): |
|
236 | for f, n in m2.iteritems(): | |
235 | if partial and not partial(f): |
|
237 | if partial and not partial(f): | |
236 | continue |
|
238 | continue | |
237 | if f in m1: |
|
239 | if f in m1: | |
238 | continue |
|
240 | continue | |
239 | if f in copied: |
|
241 | if f in copied: | |
240 | continue |
|
242 | continue | |
241 | if f in copy: |
|
243 | if f in copy: | |
242 | f2 = copy[f] |
|
244 | f2 = copy[f] | |
243 | if f2 not in m1: # directory rename |
|
245 | if f2 not in m1: # directory rename | |
244 | act("local renamed directory to " + f2, "d", |
|
246 | act("local renamed directory to " + f2, "d", | |
245 | None, f, f2, m2.flags(f)) |
|
247 | None, f, f2, m2.flags(f)) | |
246 | elif f2 in m2: # rename case 1, A/A,B/A |
|
248 | elif f2 in m2: # rename case 1, A/A,B/A | |
247 | act("remote copied to " + f, "m", |
|
249 | act("remote copied to " + f, "m", | |
248 | f2, f, f, fmerge(f2, f, f2), False) |
|
250 | f2, f, f, fmerge(f2, f, f2), False) | |
249 | else: # case 3,20 A/B/A |
|
251 | else: # case 3,20 A/B/A | |
250 | act("remote moved to " + f, "m", |
|
252 | act("remote moved to " + f, "m", | |
251 | f2, f, f, fmerge(f2, f, f2), True) |
|
253 | f2, f, f, fmerge(f2, f, f2), True) | |
252 | elif f in ma: |
|
254 | elif f in ma: | |
253 | if overwrite or backwards: |
|
255 | if overwrite or backwards: | |
254 | act("recreating", "g", f, m2.flags(f)) |
|
256 | act("recreating", "g", f, m2.flags(f)) | |
255 | elif n != ma[f]: |
|
257 | elif n != ma[f]: | |
256 | if repo.ui.prompt( |
|
258 | if repo.ui.prompt( | |
257 | _("remote changed %s which local deleted\n" |
|
259 | _("remote changed %s which local deleted\n" | |
258 | "use (c)hanged version or leave (d)eleted?") % f, |
|
260 | "use (c)hanged version or leave (d)eleted?") % f, | |
259 | (_("&Changed"), _("&Deleted")), _("c")) == _("c"): |
|
261 | (_("&Changed"), _("&Deleted")), _("c")) == _("c"): | |
260 | act("prompt recreating", "g", f, m2.flags(f)) |
|
262 | act("prompt recreating", "g", f, m2.flags(f)) | |
261 | else: |
|
263 | else: | |
262 | act("remote created", "g", f, m2.flags(f)) |
|
264 | act("remote created", "g", f, m2.flags(f)) | |
263 |
|
265 | |||
264 | return action |
|
266 | return action | |
265 |
|
267 | |||
266 | def actionkey(a): |
|
268 | def actionkey(a): | |
267 | return a[1] == 'r' and -1 or 0, a |
|
269 | return a[1] == 'r' and -1 or 0, a | |
268 |
|
270 | |||
269 | def applyupdates(repo, action, wctx, mctx): |
|
271 | def applyupdates(repo, action, wctx, mctx): | |
270 | "apply the merge action list to the working directory" |
|
272 | "apply the merge action list to the working directory" | |
271 |
|
273 | |||
272 | updated, merged, removed, unresolved = 0, 0, 0, 0 |
|
274 | updated, merged, removed, unresolved = 0, 0, 0, 0 | |
273 | ms = mergestate(repo) |
|
275 | ms = mergestate(repo) | |
274 | ms.reset(wctx.parents()[0].node()) |
|
276 | ms.reset(wctx.parents()[0].node()) | |
275 | moves = [] |
|
277 | moves = [] | |
276 | action.sort(key=actionkey) |
|
278 | action.sort(key=actionkey) | |
277 |
|
279 | |||
278 | # prescan for merges |
|
280 | # prescan for merges | |
279 | for a in action: |
|
281 | for a in action: | |
280 | f, m = a[:2] |
|
282 | f, m = a[:2] | |
281 | if m == 'm': # merge |
|
283 | if m == 'm': # merge | |
282 | f2, fd, flags, move = a[2:] |
|
284 | f2, fd, flags, move = a[2:] | |
283 | repo.ui.debug(_("preserving %s for resolve of %s\n") % (f, fd)) |
|
285 | repo.ui.debug(_("preserving %s for resolve of %s\n") % (f, fd)) | |
284 | fcl = wctx[f] |
|
286 | fcl = wctx[f] | |
285 | fco = mctx[f2] |
|
287 | fco = mctx[f2] | |
286 | fca = fcl.ancestor(fco) or repo.filectx(f, fileid=nullrev) |
|
288 | fca = fcl.ancestor(fco) or repo.filectx(f, fileid=nullrev) | |
287 | ms.add(fcl, fco, fca, fd, flags) |
|
289 | ms.add(fcl, fco, fca, fd, flags) | |
288 | if f != fd and move: |
|
290 | if f != fd and move: | |
289 | moves.append(f) |
|
291 | moves.append(f) | |
290 |
|
292 | |||
291 | # remove renamed files after safely stored |
|
293 | # remove renamed files after safely stored | |
292 | for f in moves: |
|
294 | for f in moves: | |
293 | if util.lexists(repo.wjoin(f)): |
|
295 | if util.lexists(repo.wjoin(f)): | |
294 | repo.ui.debug(_("removing %s\n") % f) |
|
296 | repo.ui.debug(_("removing %s\n") % f) | |
295 | os.unlink(repo.wjoin(f)) |
|
297 | os.unlink(repo.wjoin(f)) | |
296 |
|
298 | |||
297 | audit_path = util.path_auditor(repo.root) |
|
299 | audit_path = util.path_auditor(repo.root) | |
298 |
|
300 | |||
299 | for a in action: |
|
301 | for a in action: | |
300 | f, m = a[:2] |
|
302 | f, m = a[:2] | |
301 | if f and f[0] == "/": |
|
303 | if f and f[0] == "/": | |
302 | continue |
|
304 | continue | |
303 | if m == "r": # remove |
|
305 | if m == "r": # remove | |
304 | repo.ui.note(_("removing %s\n") % f) |
|
306 | repo.ui.note(_("removing %s\n") % f) | |
305 | audit_path(f) |
|
307 | audit_path(f) | |
306 | try: |
|
308 | try: | |
307 | util.unlink(repo.wjoin(f)) |
|
309 | util.unlink(repo.wjoin(f)) | |
308 | except OSError, inst: |
|
310 | except OSError, inst: | |
309 | if inst.errno != errno.ENOENT: |
|
311 | if inst.errno != errno.ENOENT: | |
310 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
312 | repo.ui.warn(_("update failed to remove %s: %s!\n") % | |
311 | (f, inst.strerror)) |
|
313 | (f, inst.strerror)) | |
312 | removed += 1 |
|
314 | removed += 1 | |
313 | elif m == "m": # merge |
|
315 | elif m == "m": # merge | |
314 | f2, fd, flags, move = a[2:] |
|
316 | f2, fd, flags, move = a[2:] | |
315 | r = ms.resolve(fd, wctx, mctx) |
|
317 | r = ms.resolve(fd, wctx, mctx) | |
316 | if r > 0: |
|
318 | if r > 0: | |
317 | unresolved += 1 |
|
319 | unresolved += 1 | |
318 | else: |
|
320 | else: | |
319 | if r is None: |
|
321 | if r is None: | |
320 | updated += 1 |
|
322 | updated += 1 | |
321 | else: |
|
323 | else: | |
322 | merged += 1 |
|
324 | merged += 1 | |
323 | util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) |
|
325 | util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) | |
324 | if f != fd and move and util.lexists(repo.wjoin(f)): |
|
326 | if f != fd and move and util.lexists(repo.wjoin(f)): | |
325 | repo.ui.debug(_("removing %s\n") % f) |
|
327 | repo.ui.debug(_("removing %s\n") % f) | |
326 | os.unlink(repo.wjoin(f)) |
|
328 | os.unlink(repo.wjoin(f)) | |
327 | elif m == "g": # get |
|
329 | elif m == "g": # get | |
328 | flags = a[2] |
|
330 | flags = a[2] | |
329 | repo.ui.note(_("getting %s\n") % f) |
|
331 | repo.ui.note(_("getting %s\n") % f) | |
330 | t = mctx.filectx(f).data() |
|
332 | t = mctx.filectx(f).data() | |
331 | repo.wwrite(f, t, flags) |
|
333 | repo.wwrite(f, t, flags) | |
332 | updated += 1 |
|
334 | updated += 1 | |
333 | elif m == "d": # directory rename |
|
335 | elif m == "d": # directory rename | |
334 | f2, fd, flags = a[2:] |
|
336 | f2, fd, flags = a[2:] | |
335 | if f: |
|
337 | if f: | |
336 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) |
|
338 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) | |
337 | t = wctx.filectx(f).data() |
|
339 | t = wctx.filectx(f).data() | |
338 | repo.wwrite(fd, t, flags) |
|
340 | repo.wwrite(fd, t, flags) | |
339 | util.unlink(repo.wjoin(f)) |
|
341 | util.unlink(repo.wjoin(f)) | |
340 | if f2: |
|
342 | if f2: | |
341 | repo.ui.note(_("getting %s to %s\n") % (f2, fd)) |
|
343 | repo.ui.note(_("getting %s to %s\n") % (f2, fd)) | |
342 | t = mctx.filectx(f2).data() |
|
344 | t = mctx.filectx(f2).data() | |
343 | repo.wwrite(fd, t, flags) |
|
345 | repo.wwrite(fd, t, flags) | |
344 | updated += 1 |
|
346 | updated += 1 | |
345 | elif m == "dr": # divergent renames |
|
347 | elif m == "dr": # divergent renames | |
346 | fl = a[2] |
|
348 | fl = a[2] | |
347 | repo.ui.warn(_("warning: detected divergent renames of %s to:\n") % f) |
|
349 | repo.ui.warn(_("warning: detected divergent renames of %s to:\n") % f) | |
348 | for nf in fl: |
|
350 | for nf in fl: | |
349 | repo.ui.warn(" %s\n" % nf) |
|
351 | repo.ui.warn(" %s\n" % nf) | |
350 | elif m == "e": # exec |
|
352 | elif m == "e": # exec | |
351 | flags = a[2] |
|
353 | flags = a[2] | |
352 | util.set_flags(repo.wjoin(f), 'l' in flags, 'x' in flags) |
|
354 | util.set_flags(repo.wjoin(f), 'l' in flags, 'x' in flags) | |
353 |
|
355 | |||
354 | return updated, merged, removed, unresolved |
|
356 | return updated, merged, removed, unresolved | |
355 |
|
357 | |||
356 | def recordupdates(repo, action, branchmerge): |
|
358 | def recordupdates(repo, action, branchmerge): | |
357 | "record merge actions to the dirstate" |
|
359 | "record merge actions to the dirstate" | |
358 |
|
360 | |||
359 | for a in action: |
|
361 | for a in action: | |
360 | f, m = a[:2] |
|
362 | f, m = a[:2] | |
361 | if m == "r": # remove |
|
363 | if m == "r": # remove | |
362 | if branchmerge: |
|
364 | if branchmerge: | |
363 | repo.dirstate.remove(f) |
|
365 | repo.dirstate.remove(f) | |
364 | else: |
|
366 | else: | |
365 | repo.dirstate.forget(f) |
|
367 | repo.dirstate.forget(f) | |
366 | elif m == "a": # re-add |
|
368 | elif m == "a": # re-add | |
367 | if not branchmerge: |
|
369 | if not branchmerge: | |
368 | repo.dirstate.add(f) |
|
370 | repo.dirstate.add(f) | |
369 | elif m == "f": # forget |
|
371 | elif m == "f": # forget | |
370 | repo.dirstate.forget(f) |
|
372 | repo.dirstate.forget(f) | |
371 | elif m == "e": # exec change |
|
373 | elif m == "e": # exec change | |
372 | repo.dirstate.normallookup(f) |
|
374 | repo.dirstate.normallookup(f) | |
373 | elif m == "g": # get |
|
375 | elif m == "g": # get | |
374 | if branchmerge: |
|
376 | if branchmerge: | |
375 | repo.dirstate.normaldirty(f) |
|
377 | repo.dirstate.normaldirty(f) | |
376 | else: |
|
378 | else: | |
377 | repo.dirstate.normal(f) |
|
379 | repo.dirstate.normal(f) | |
378 | elif m == "m": # merge |
|
380 | elif m == "m": # merge | |
379 | f2, fd, flag, move = a[2:] |
|
381 | f2, fd, flag, move = a[2:] | |
380 | if branchmerge: |
|
382 | if branchmerge: | |
381 | # We've done a branch merge, mark this file as merged |
|
383 | # We've done a branch merge, mark this file as merged | |
382 | # so that we properly record the merger later |
|
384 | # so that we properly record the merger later | |
383 | repo.dirstate.merge(fd) |
|
385 | repo.dirstate.merge(fd) | |
384 | if f != f2: # copy/rename |
|
386 | if f != f2: # copy/rename | |
385 | if move: |
|
387 | if move: | |
386 | repo.dirstate.remove(f) |
|
388 | repo.dirstate.remove(f) | |
387 | if f != fd: |
|
389 | if f != fd: | |
388 | repo.dirstate.copy(f, fd) |
|
390 | repo.dirstate.copy(f, fd) | |
389 | else: |
|
391 | else: | |
390 | repo.dirstate.copy(f2, fd) |
|
392 | repo.dirstate.copy(f2, fd) | |
391 | else: |
|
393 | else: | |
392 | # We've update-merged a locally modified file, so |
|
394 | # We've update-merged a locally modified file, so | |
393 | # we set the dirstate to emulate a normal checkout |
|
395 | # we set the dirstate to emulate a normal checkout | |
394 | # of that file some time in the past. Thus our |
|
396 | # of that file some time in the past. Thus our | |
395 | # merge will appear as a normal local file |
|
397 | # merge will appear as a normal local file | |
396 | # modification. |
|
398 | # modification. | |
397 | repo.dirstate.normallookup(fd) |
|
399 | repo.dirstate.normallookup(fd) | |
398 | if move: |
|
400 | if move: | |
399 | repo.dirstate.forget(f) |
|
401 | repo.dirstate.forget(f) | |
400 | elif m == "d": # directory rename |
|
402 | elif m == "d": # directory rename | |
401 | f2, fd, flag = a[2:] |
|
403 | f2, fd, flag = a[2:] | |
402 | if not f2 and f not in repo.dirstate: |
|
404 | if not f2 and f not in repo.dirstate: | |
403 | # untracked file moved |
|
405 | # untracked file moved | |
404 | continue |
|
406 | continue | |
405 | if branchmerge: |
|
407 | if branchmerge: | |
406 | repo.dirstate.add(fd) |
|
408 | repo.dirstate.add(fd) | |
407 | if f: |
|
409 | if f: | |
408 | repo.dirstate.remove(f) |
|
410 | repo.dirstate.remove(f) | |
409 | repo.dirstate.copy(f, fd) |
|
411 | repo.dirstate.copy(f, fd) | |
410 | if f2: |
|
412 | if f2: | |
411 | repo.dirstate.copy(f2, fd) |
|
413 | repo.dirstate.copy(f2, fd) | |
412 | else: |
|
414 | else: | |
413 | repo.dirstate.normal(fd) |
|
415 | repo.dirstate.normal(fd) | |
414 | if f: |
|
416 | if f: | |
415 | repo.dirstate.forget(f) |
|
417 | repo.dirstate.forget(f) | |
416 |
|
418 | |||
417 | def update(repo, node, branchmerge, force, partial): |
|
419 | def update(repo, node, branchmerge, force, partial): | |
418 | """ |
|
420 | """ | |
419 | Perform a merge between the working directory and the given node |
|
421 | Perform a merge between the working directory and the given node | |
420 |
|
422 | |||
421 | branchmerge = whether to merge between branches |
|
423 | branchmerge = whether to merge between branches | |
422 | force = whether to force branch merging or file overwriting |
|
424 | force = whether to force branch merging or file overwriting | |
423 | partial = a function to filter file lists (dirstate not updated) |
|
425 | partial = a function to filter file lists (dirstate not updated) | |
424 | """ |
|
426 | """ | |
425 |
|
427 | |||
426 | wlock = repo.wlock() |
|
428 | wlock = repo.wlock() | |
427 | try: |
|
429 | try: | |
428 | wc = repo[None] |
|
430 | wc = repo[None] | |
429 | if node is None: |
|
431 | if node is None: | |
430 | # tip of current branch |
|
432 | # tip of current branch | |
431 | try: |
|
433 | try: | |
432 | node = repo.branchtags()[wc.branch()] |
|
434 | node = repo.branchtags()[wc.branch()] | |
433 | except KeyError: |
|
435 | except KeyError: | |
434 | if wc.branch() == "default": # no default branch! |
|
436 | if wc.branch() == "default": # no default branch! | |
435 | node = repo.lookup("tip") # update to tip |
|
437 | node = repo.lookup("tip") # update to tip | |
436 | else: |
|
438 | else: | |
437 | raise util.Abort(_("branch %s not found") % wc.branch()) |
|
439 | raise util.Abort(_("branch %s not found") % wc.branch()) | |
438 | overwrite = force and not branchmerge |
|
440 | overwrite = force and not branchmerge | |
439 | pl = wc.parents() |
|
441 | pl = wc.parents() | |
440 | p1, p2 = pl[0], repo[node] |
|
442 | p1, p2 = pl[0], repo[node] | |
441 | pa = p1.ancestor(p2) |
|
443 | pa = p1.ancestor(p2) | |
442 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
|
444 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) | |
443 | fastforward = False |
|
445 | fastforward = False | |
444 |
|
446 | |||
445 | ### check phase |
|
447 | ### check phase | |
446 | if not overwrite and len(pl) > 1: |
|
448 | if not overwrite and len(pl) > 1: | |
447 | raise util.Abort(_("outstanding uncommitted merges")) |
|
449 | raise util.Abort(_("outstanding uncommitted merges")) | |
448 | if branchmerge: |
|
450 | if branchmerge: | |
449 | if pa == p2: |
|
451 | if pa == p2: | |
450 | raise util.Abort(_("can't merge with ancestor")) |
|
452 | raise util.Abort(_("can't merge with ancestor")) | |
451 | elif pa == p1: |
|
453 | elif pa == p1: | |
452 | if p1.branch() != p2.branch(): |
|
454 | if p1.branch() != p2.branch(): | |
453 | fastforward = True |
|
455 | fastforward = True | |
454 | else: |
|
456 | else: | |
455 | raise util.Abort(_("nothing to merge (use 'hg update'" |
|
457 | raise util.Abort(_("nothing to merge (use 'hg update'" | |
456 | " or check 'hg heads')")) |
|
458 | " or check 'hg heads')")) | |
457 | if not force and (wc.files() or wc.deleted()): |
|
459 | if not force and (wc.files() or wc.deleted()): | |
458 | raise util.Abort(_("outstanding uncommitted changes")) |
|
460 | raise util.Abort(_("outstanding uncommitted changes")) | |
459 | elif not overwrite: |
|
461 | elif not overwrite: | |
460 | if pa == p1 or pa == p2: # linear |
|
462 | if pa == p1 or pa == p2: # linear | |
461 | pass # all good |
|
463 | pass # all good | |
462 | elif p1.branch() == p2.branch(): |
|
464 | elif p1.branch() == p2.branch(): | |
463 | if wc.files() or wc.deleted(): |
|
465 | if wc.files() or wc.deleted(): | |
464 | raise util.Abort(_("crosses branches (use 'hg merge' or " |
|
466 | raise util.Abort(_("crosses branches (use 'hg merge' or " | |
465 | "'hg update -C' to discard changes)")) |
|
467 | "'hg update -C' to discard changes)")) | |
466 | raise util.Abort(_("crosses branches (use 'hg merge' " |
|
468 | raise util.Abort(_("crosses branches (use 'hg merge' " | |
467 | "or 'hg update -C')")) |
|
469 | "or 'hg update -C')")) | |
468 | elif wc.files() or wc.deleted(): |
|
470 | elif wc.files() or wc.deleted(): | |
469 | raise util.Abort(_("crosses named branches (use " |
|
471 | raise util.Abort(_("crosses named branches (use " | |
470 | "'hg update -C' to discard changes)")) |
|
472 | "'hg update -C' to discard changes)")) | |
471 | else: |
|
473 | else: | |
472 | # Allow jumping branches if there are no changes |
|
474 | # Allow jumping branches if there are no changes | |
473 | overwrite = True |
|
475 | overwrite = True | |
474 |
|
476 | |||
475 | ### calculate phase |
|
477 | ### calculate phase | |
476 | action = [] |
|
478 | action = [] | |
477 | if not force: |
|
479 | if not force: | |
478 | _checkunknown(wc, p2) |
|
480 | _checkunknown(wc, p2) | |
479 | if not util.checkcase(repo.path): |
|
481 | if not util.checkcase(repo.path): | |
480 | _checkcollision(p2) |
|
482 | _checkcollision(p2) | |
481 | action += _forgetremoved(wc, p2, branchmerge) |
|
483 | action += _forgetremoved(wc, p2, branchmerge) | |
482 | action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
|
484 | action += manifestmerge(repo, wc, p2, pa, overwrite, partial) | |
483 |
|
485 | |||
484 | ### apply phase |
|
486 | ### apply phase | |
485 | if not branchmerge: # just jump to the new rev |
|
487 | if not branchmerge: # just jump to the new rev | |
486 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
|
488 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' | |
487 | if not partial: |
|
489 | if not partial: | |
488 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
|
490 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | |
489 |
|
491 | |||
490 | stats = applyupdates(repo, action, wc, p2) |
|
492 | stats = applyupdates(repo, action, wc, p2) | |
491 |
|
493 | |||
492 | if not partial: |
|
494 | if not partial: | |
493 | recordupdates(repo, action, branchmerge) |
|
495 | recordupdates(repo, action, branchmerge) | |
494 | repo.dirstate.setparents(fp1, fp2) |
|
496 | repo.dirstate.setparents(fp1, fp2) | |
495 | if not branchmerge and not fastforward: |
|
497 | if not branchmerge and not fastforward: | |
496 | repo.dirstate.setbranch(p2.branch()) |
|
498 | repo.dirstate.setbranch(p2.branch()) | |
497 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) |
|
499 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) | |
498 |
|
500 | |||
499 | return stats |
|
501 | return stats | |
500 | finally: |
|
502 | finally: | |
501 | wlock.release() |
|
503 | wlock.release() |
@@ -1,498 +1,502 b'' | |||||
1 | % help |
|
1 | % help | |
2 | keyword extension - keyword expansion in local repositories |
|
2 | keyword extension - keyword expansion in local repositories | |
3 |
|
3 | |||
4 | This extension expands RCS/CVS-like or self-customized $Keywords$ in |
|
4 | This extension expands RCS/CVS-like or self-customized $Keywords$ in | |
5 | tracked text files selected by your configuration. |
|
5 | tracked text files selected by your configuration. | |
6 |
|
6 | |||
7 | Keywords are only expanded in local repositories and not stored in the |
|
7 | Keywords are only expanded in local repositories and not stored in the | |
8 | change history. The mechanism can be regarded as a convenience for the |
|
8 | change history. The mechanism can be regarded as a convenience for the | |
9 | current user or for archive distribution. |
|
9 | current user or for archive distribution. | |
10 |
|
10 | |||
11 | Configuration is done in the [keyword] and [keywordmaps] sections of |
|
11 | Configuration is done in the [keyword] and [keywordmaps] sections of | |
12 | hgrc files. |
|
12 | hgrc files. | |
13 |
|
13 | |||
14 | Example: |
|
14 | Example: | |
15 |
|
15 | |||
16 | [keyword] |
|
16 | [keyword] | |
17 | # expand keywords in every python file except those matching "x*" |
|
17 | # expand keywords in every python file except those matching "x*" | |
18 | **.py = |
|
18 | **.py = | |
19 | x* = ignore |
|
19 | x* = ignore | |
20 |
|
20 | |||
21 | Note: the more specific you are in your filename patterns |
|
21 | Note: the more specific you are in your filename patterns | |
22 | the less you lose speed in huge repositories. |
|
22 | the less you lose speed in huge repositories. | |
23 |
|
23 | |||
24 | For [keywordmaps] template mapping and expansion demonstration and |
|
24 | For [keywordmaps] template mapping and expansion demonstration and | |
25 | control run "hg kwdemo". |
|
25 | control run "hg kwdemo". | |
26 |
|
26 | |||
27 | An additional date template filter {date|utcdate} is provided. |
|
27 | An additional date template filter {date|utcdate} is provided. | |
28 |
|
28 | |||
29 | The default template mappings (view with "hg kwdemo -d") can be |
|
29 | The default template mappings (view with "hg kwdemo -d") can be | |
30 | replaced with customized keywords and templates. Again, run "hg |
|
30 | replaced with customized keywords and templates. Again, run "hg | |
31 | kwdemo" to control the results of your config changes. |
|
31 | kwdemo" to control the results of your config changes. | |
32 |
|
32 | |||
33 | Before changing/disabling active keywords, run "hg kwshrink" to avoid |
|
33 | Before changing/disabling active keywords, run "hg kwshrink" to avoid | |
34 | the risk of inadvertedly storing expanded keywords in the change |
|
34 | the risk of inadvertedly storing expanded keywords in the change | |
35 | history. |
|
35 | history. | |
36 |
|
36 | |||
37 | To force expansion after enabling it, or a configuration change, run |
|
37 | To force expansion after enabling it, or a configuration change, run | |
38 | "hg kwexpand". |
|
38 | "hg kwexpand". | |
39 |
|
39 | |||
40 | Also, when committing with the record extension or using mq's qrecord, |
|
40 | Also, when committing with the record extension or using mq's qrecord, | |
41 | be aware that keywords cannot be updated. Again, run "hg kwexpand" on |
|
41 | be aware that keywords cannot be updated. Again, run "hg kwexpand" on | |
42 | the files in question to update keyword expansions after all changes |
|
42 | the files in question to update keyword expansions after all changes | |
43 | have been checked in. |
|
43 | have been checked in. | |
44 |
|
44 | |||
45 | Expansions spanning more than one line and incremental expansions, |
|
45 | Expansions spanning more than one line and incremental expansions, | |
46 | like CVS' $Log$, are not supported. A keyword template map |
|
46 | like CVS' $Log$, are not supported. A keyword template map | |
47 | "Log = {desc}" expands to the first line of the changeset description. |
|
47 | "Log = {desc}" expands to the first line of the changeset description. | |
48 |
|
48 | |||
49 | list of commands: |
|
49 | list of commands: | |
50 |
|
50 | |||
51 | kwdemo print [keywordmaps] configuration and an expansion example |
|
51 | kwdemo print [keywordmaps] configuration and an expansion example | |
52 | kwexpand expand keywords in working directory |
|
52 | kwexpand expand keywords in working directory | |
53 | kwfiles print files currently configured for keyword expansion |
|
53 | kwfiles print files currently configured for keyword expansion | |
54 | kwshrink revert expanded keywords in working directory |
|
54 | kwshrink revert expanded keywords in working directory | |
55 |
|
55 | |||
56 | enabled extensions: |
|
56 | enabled extensions: | |
57 |
|
57 | |||
58 | keyword keyword expansion in local repositories |
|
58 | keyword keyword expansion in local repositories | |
59 | mq patch management and development |
|
59 | mq patch management and development | |
60 | notify hook extension to email notifications on commits/pushes |
|
60 | notify hook extension to email notifications on commits/pushes | |
61 |
|
61 | |||
62 | use "hg -v help keyword" to show aliases and global options |
|
62 | use "hg -v help keyword" to show aliases and global options | |
63 | % hg kwdemo |
|
63 | % hg kwdemo | |
64 | [extensions] |
|
64 | [extensions] | |
65 | hgext.keyword = |
|
65 | hgext.keyword = | |
66 | [keyword] |
|
66 | [keyword] | |
67 | * = |
|
67 | * = | |
68 | b = ignore |
|
68 | b = ignore | |
69 | demo.txt = |
|
69 | demo.txt = | |
70 | [keywordmaps] |
|
70 | [keywordmaps] | |
71 | RCSFile = {file|basename},v |
|
71 | RCSFile = {file|basename},v | |
72 | Author = {author|user} |
|
72 | Author = {author|user} | |
73 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} |
|
73 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} | |
74 | Source = {root}/{file},v |
|
74 | Source = {root}/{file},v | |
75 | Date = {date|utcdate} |
|
75 | Date = {date|utcdate} | |
76 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} |
|
76 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} | |
77 | Revision = {node|short} |
|
77 | Revision = {node|short} | |
78 | $RCSFile: demo.txt,v $ |
|
78 | $RCSFile: demo.txt,v $ | |
79 | $Author: test $ |
|
79 | $Author: test $ | |
80 | $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $ |
|
80 | $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $ | |
81 | $Source: /TMP/demo.txt,v $ |
|
81 | $Source: /TMP/demo.txt,v $ | |
82 | $Date: 2000/00/00 00:00:00 $ |
|
82 | $Date: 2000/00/00 00:00:00 $ | |
83 | $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $ |
|
83 | $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $ | |
84 | $Revision: xxxxxxxxxxxx $ |
|
84 | $Revision: xxxxxxxxxxxx $ | |
85 | [extensions] |
|
85 | [extensions] | |
86 | hgext.keyword = |
|
86 | hgext.keyword = | |
87 | [keyword] |
|
87 | [keyword] | |
88 | * = |
|
88 | * = | |
89 | b = ignore |
|
89 | b = ignore | |
90 | demo.txt = |
|
90 | demo.txt = | |
91 | [keywordmaps] |
|
91 | [keywordmaps] | |
92 | Branch = {branches} |
|
92 | Branch = {branches} | |
93 | $Branch: demobranch $ |
|
93 | $Branch: demobranch $ | |
94 | % kwshrink should exit silently in empty/invalid repo |
|
94 | % kwshrink should exit silently in empty/invalid repo | |
95 | pulling from test-keyword.hg |
|
95 | pulling from test-keyword.hg | |
96 | requesting all changes |
|
96 | requesting all changes | |
97 | adding changesets |
|
97 | adding changesets | |
98 | adding manifests |
|
98 | adding manifests | |
99 | adding file changes |
|
99 | adding file changes | |
100 | added 1 changesets with 1 changes to 1 files |
|
100 | added 1 changesets with 1 changes to 1 files | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | % cat |
|
102 | % cat | |
103 | expand $Id$ |
|
103 | expand $Id$ | |
104 | do not process $Id: |
|
104 | do not process $Id: | |
105 | xxx $ |
|
105 | xxx $ | |
106 | ignore $Id$ |
|
106 | ignore $Id$ | |
107 | % addremove |
|
107 | % addremove | |
108 | adding a |
|
108 | adding a | |
109 | adding b |
|
109 | adding b | |
110 | % status |
|
110 | % status | |
111 | A a |
|
111 | A a | |
112 | A b |
|
112 | A b | |
113 | % default keyword expansion including commit hook |
|
113 | % default keyword expansion including commit hook | |
114 | % interrupted commit should not change state or run commit hook |
|
114 | % interrupted commit should not change state or run commit hook | |
115 | abort: empty commit message |
|
115 | abort: empty commit message | |
116 | % status |
|
116 | % status | |
117 | A a |
|
117 | A a | |
118 | A b |
|
118 | A b | |
119 | % commit |
|
119 | % commit | |
120 | a |
|
120 | a | |
121 | b |
|
121 | b | |
122 | overwriting a expanding keywords |
|
122 | overwriting a expanding keywords | |
123 | running hook commit.test: cp a hooktest |
|
123 | running hook commit.test: cp a hooktest | |
124 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
124 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
125 | % status |
|
125 | % status | |
126 | ? hooktest |
|
126 | ? hooktest | |
127 | % identify |
|
127 | % identify | |
128 | ef63ca68695b |
|
128 | ef63ca68695b | |
129 | % cat |
|
129 | % cat | |
130 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
130 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
131 | do not process $Id: |
|
131 | do not process $Id: | |
132 | xxx $ |
|
132 | xxx $ | |
133 | ignore $Id$ |
|
133 | ignore $Id$ | |
134 | % hg cat |
|
134 | % hg cat | |
135 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
135 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
136 | do not process $Id: |
|
136 | do not process $Id: | |
137 | xxx $ |
|
137 | xxx $ | |
138 | ignore $Id$ |
|
138 | ignore $Id$ | |
139 | a |
|
139 | a | |
140 | % diff a hooktest |
|
140 | % diff a hooktest | |
141 | % removing commit hook from config |
|
141 | % removing commit hook from config | |
142 | % bundle |
|
142 | % bundle | |
143 | 2 changesets found |
|
143 | 2 changesets found | |
144 | % notify on pull to check whether keywords stay as is in email |
|
144 | % notify on pull to check whether keywords stay as is in email | |
145 | % ie. if patch.diff wrapper acts as it should |
|
145 | % ie. if patch.diff wrapper acts as it should | |
146 | % pull from bundle |
|
146 | % pull from bundle | |
147 | pulling from ../kw.hg |
|
147 | pulling from ../kw.hg | |
148 | requesting all changes |
|
148 | requesting all changes | |
149 | adding changesets |
|
149 | adding changesets | |
150 | adding manifests |
|
150 | adding manifests | |
151 | adding file changes |
|
151 | adding file changes | |
152 | added 2 changesets with 3 changes to 3 files |
|
152 | added 2 changesets with 3 changes to 3 files | |
153 |
|
153 | |||
154 | diff -r 000000000000 -r a2392c293916 sym |
|
154 | diff -r 000000000000 -r a2392c293916 sym | |
155 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
155 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
156 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 |
|
156 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 | |
157 | @@ -0,0 +1,1 @@ |
|
157 | @@ -0,0 +1,1 @@ | |
158 | +a |
|
158 | +a | |
159 | \ No newline at end of file |
|
159 | \ No newline at end of file | |
160 |
|
160 | |||
161 | diff -r a2392c293916 -r ef63ca68695b a |
|
161 | diff -r a2392c293916 -r ef63ca68695b a | |
162 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
162 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
163 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
163 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
164 | @@ -0,0 +1,3 @@ |
|
164 | @@ -0,0 +1,3 @@ | |
165 | +expand $Id$ |
|
165 | +expand $Id$ | |
166 | +do not process $Id: |
|
166 | +do not process $Id: | |
167 | +xxx $ |
|
167 | +xxx $ | |
168 | diff -r a2392c293916 -r ef63ca68695b b |
|
168 | diff -r a2392c293916 -r ef63ca68695b b | |
169 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
169 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
170 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
170 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
171 | @@ -0,0 +1,1 @@ |
|
171 | @@ -0,0 +1,1 @@ | |
172 | +ignore $Id$ |
|
172 | +ignore $Id$ | |
173 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
173 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
174 | % remove notify config |
|
174 | % remove notify config | |
175 | % touch |
|
175 | % touch | |
176 | % status |
|
176 | % status | |
177 | % update |
|
177 | % update | |
178 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
179 | % cat |
|
179 | % cat | |
180 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
180 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
181 | do not process $Id: |
|
181 | do not process $Id: | |
182 | xxx $ |
|
182 | xxx $ | |
183 | ignore $Id$ |
|
183 | ignore $Id$ | |
184 | % check whether expansion is filewise |
|
184 | % check whether expansion is filewise | |
185 | % commit c |
|
185 | % commit c | |
186 | adding c |
|
186 | adding c | |
187 | % force expansion |
|
187 | % force expansion | |
188 | overwriting a expanding keywords |
|
188 | overwriting a expanding keywords | |
189 | overwriting c expanding keywords |
|
189 | overwriting c expanding keywords | |
190 | % compare changenodes in a c |
|
190 | % compare changenodes in a c | |
191 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
191 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
192 | do not process $Id: |
|
192 | do not process $Id: | |
193 | xxx $ |
|
193 | xxx $ | |
194 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
194 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
195 | tests for different changenodes |
|
195 | tests for different changenodes | |
196 | % qinit -c |
|
196 | % qinit -c | |
197 | % qimport |
|
197 | % qimport | |
198 | % qcommit |
|
198 | % qcommit | |
199 | % keywords should not be expanded in patch |
|
199 | % keywords should not be expanded in patch | |
200 | # HG changeset patch |
|
200 | # HG changeset patch | |
201 | # User User Name <user@example.com> |
|
201 | # User User Name <user@example.com> | |
202 | # Date 1 0 |
|
202 | # Date 1 0 | |
203 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad |
|
203 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad | |
204 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
204 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
205 | cndiff |
|
205 | cndiff | |
206 |
|
206 | |||
207 | diff -r ef63ca68695b -r 40a904bbbe4c c |
|
207 | diff -r ef63ca68695b -r 40a904bbbe4c c | |
208 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
208 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
209 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 |
|
209 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 | |
210 | @@ -0,0 +1,2 @@ |
|
210 | @@ -0,0 +1,2 @@ | |
211 | +$Id$ |
|
211 | +$Id$ | |
212 | +tests for different changenodes |
|
212 | +tests for different changenodes | |
213 | % qpop |
|
213 | % qpop | |
214 | patch queue now empty |
|
214 | patch queue now empty | |
215 | % qgoto - should imply qpush |
|
215 | % qgoto - should imply qpush | |
216 | applying mqtest.diff |
|
216 | applying mqtest.diff | |
217 | now at: mqtest.diff |
|
217 | now at: mqtest.diff | |
218 | % cat |
|
218 | % cat | |
219 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
219 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
220 | tests for different changenodes |
|
220 | tests for different changenodes | |
221 | % qpop and move on |
|
221 | % qpop and move on | |
222 | patch queue now empty |
|
222 | patch queue now empty | |
223 | % copy |
|
223 | % copy | |
224 | % kwfiles added |
|
224 | % kwfiles added | |
225 | a |
|
225 | a | |
226 | c |
|
226 | c | |
227 | % commit |
|
227 | % commit | |
228 | c |
|
228 | c | |
229 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 |
|
229 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 | |
230 | overwriting c expanding keywords |
|
230 | overwriting c expanding keywords | |
231 | committed changeset 2:e22d299ac0c2bd8897b3df5114374b9e4d4ca62f |
|
231 | committed changeset 2:e22d299ac0c2bd8897b3df5114374b9e4d4ca62f | |
232 | % cat a c |
|
232 | % cat a c | |
233 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
233 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
234 | do not process $Id: |
|
234 | do not process $Id: | |
235 | xxx $ |
|
235 | xxx $ | |
236 | expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $ |
|
236 | expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $ | |
237 | do not process $Id: |
|
237 | do not process $Id: | |
238 | xxx $ |
|
238 | xxx $ | |
239 | % touch copied c |
|
239 | % touch copied c | |
240 | % status |
|
240 | % status | |
241 | % kwfiles |
|
241 | % kwfiles | |
242 | a |
|
242 | a | |
243 | c |
|
243 | c | |
244 | % diff --rev |
|
244 | % diff --rev | |
245 | diff -r ef63ca68695b c |
|
245 | diff -r ef63ca68695b c | |
246 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
246 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
247 | @@ -0,0 +1,3 @@ |
|
247 | @@ -0,0 +1,3 @@ | |
248 | +expand $Id$ |
|
248 | +expand $Id$ | |
249 | +do not process $Id: |
|
249 | +do not process $Id: | |
250 | +xxx $ |
|
250 | +xxx $ | |
251 | % rollback |
|
251 | % rollback | |
252 | rolling back last transaction |
|
252 | rolling back last transaction | |
253 | % status |
|
253 | % status | |
254 | A c |
|
254 | A c | |
255 | % update -C |
|
255 | % update -C | |
256 |
0 files updated, 0 files merged, |
|
256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | % custom keyword expansion |
|
257 | % custom keyword expansion | |
258 | % try with kwdemo |
|
258 | % try with kwdemo | |
259 | [extensions] |
|
259 | [extensions] | |
260 | hgext.keyword = |
|
260 | hgext.keyword = | |
261 | [keyword] |
|
261 | [keyword] | |
262 | * = |
|
262 | * = | |
263 | b = ignore |
|
263 | b = ignore | |
264 | demo.txt = |
|
264 | demo.txt = | |
265 | [keywordmaps] |
|
265 | [keywordmaps] | |
266 | Xinfo = {author}: {desc} |
|
266 | Xinfo = {author}: {desc} | |
267 | $Xinfo: test: hg keyword config and expansion example $ |
|
267 | $Xinfo: test: hg keyword config and expansion example $ | |
268 | % cat |
|
268 | % cat | |
269 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
269 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
270 | do not process $Id: |
|
270 | do not process $Id: | |
271 | xxx $ |
|
271 | xxx $ | |
272 | ignore $Id$ |
|
272 | ignore $Id$ | |
273 | % hg cat |
|
273 | % hg cat | |
274 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ |
|
274 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ | |
275 | do not process $Id: |
|
275 | do not process $Id: | |
276 | xxx $ |
|
276 | xxx $ | |
277 | ignore $Id$ |
|
277 | ignore $Id$ | |
278 | a |
|
278 | a | |
279 | % interrupted commit should not change state |
|
279 | % interrupted commit should not change state | |
280 | abort: empty commit message |
|
280 | abort: empty commit message | |
281 | % status |
|
281 | % status | |
282 | M a |
|
282 | M a | |
|
283 | ? c | |||
283 | ? log |
|
284 | ? log | |
284 | % commit |
|
285 | % commit | |
285 | a |
|
286 | a | |
286 | overwriting a expanding keywords |
|
287 | overwriting a expanding keywords | |
287 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
288 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 | |
288 | % status |
|
289 | % status | |
|
290 | ? c | |||
289 | % verify |
|
291 | % verify | |
290 | checking changesets |
|
292 | checking changesets | |
291 | checking manifests |
|
293 | checking manifests | |
292 | crosschecking files in changesets and manifests |
|
294 | crosschecking files in changesets and manifests | |
293 | checking files |
|
295 | checking files | |
294 | 3 files, 3 changesets, 4 total revisions |
|
296 | 3 files, 3 changesets, 4 total revisions | |
295 | % cat |
|
297 | % cat | |
296 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
298 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
297 | do not process $Id: |
|
299 | do not process $Id: | |
298 | xxx $ |
|
300 | xxx $ | |
299 | $Xinfo: User Name <user@example.com>: firstline $ |
|
301 | $Xinfo: User Name <user@example.com>: firstline $ | |
300 | ignore $Id$ |
|
302 | ignore $Id$ | |
301 | % hg cat |
|
303 | % hg cat | |
302 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
304 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
303 | do not process $Id: |
|
305 | do not process $Id: | |
304 | xxx $ |
|
306 | xxx $ | |
305 | $Xinfo: User Name <user@example.com>: firstline $ |
|
307 | $Xinfo: User Name <user@example.com>: firstline $ | |
306 | ignore $Id$ |
|
308 | ignore $Id$ | |
307 | a |
|
309 | a | |
308 | % annotate |
|
310 | % annotate | |
309 | 1: expand $Id$ |
|
311 | 1: expand $Id$ | |
310 | 1: do not process $Id: |
|
312 | 1: do not process $Id: | |
311 | 1: xxx $ |
|
313 | 1: xxx $ | |
312 | 2: $Xinfo$ |
|
314 | 2: $Xinfo$ | |
313 | % remove |
|
315 | % remove | |
314 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 |
|
316 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 | |
315 | % status |
|
317 | % status | |
|
318 | ? c | |||
316 | % rollback |
|
319 | % rollback | |
317 | rolling back last transaction |
|
320 | rolling back last transaction | |
318 | % status |
|
321 | % status | |
319 | R a |
|
322 | R a | |
|
323 | ? c | |||
320 | % revert a |
|
324 | % revert a | |
321 | % cat a |
|
325 | % cat a | |
322 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
326 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
323 | do not process $Id: |
|
327 | do not process $Id: | |
324 | xxx $ |
|
328 | xxx $ | |
325 | $Xinfo: User Name <user@example.com>: firstline $ |
|
329 | $Xinfo: User Name <user@example.com>: firstline $ | |
326 | % clone to test incoming |
|
330 | % clone to test incoming | |
327 | requesting all changes |
|
331 | requesting all changes | |
328 | adding changesets |
|
332 | adding changesets | |
329 | adding manifests |
|
333 | adding manifests | |
330 | adding file changes |
|
334 | adding file changes | |
331 | added 2 changesets with 3 changes to 3 files |
|
335 | added 2 changesets with 3 changes to 3 files | |
332 | updating working directory |
|
336 | updating working directory | |
333 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
337 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
334 | % incoming |
|
338 | % incoming | |
335 | comparing with test-keyword/Test |
|
339 | comparing with test-keyword/Test | |
336 | searching for changes |
|
340 | searching for changes | |
337 | changeset: 2:bb948857c743 |
|
341 | changeset: 2:bb948857c743 | |
338 | tag: tip |
|
342 | tag: tip | |
339 | user: User Name <user@example.com> |
|
343 | user: User Name <user@example.com> | |
340 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
344 | date: Thu Jan 01 00:00:02 1970 +0000 | |
341 | summary: firstline |
|
345 | summary: firstline | |
342 |
|
346 | |||
343 | % commit rejecttest |
|
347 | % commit rejecttest | |
344 | a |
|
348 | a | |
345 | overwriting a expanding keywords |
|
349 | overwriting a expanding keywords | |
346 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
|
350 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 | |
347 | % export |
|
351 | % export | |
348 | % import |
|
352 | % import | |
349 | applying ../rejecttest.diff |
|
353 | applying ../rejecttest.diff | |
350 | % cat |
|
354 | % cat | |
351 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest |
|
355 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest | |
352 | do not process $Id: rejecttest |
|
356 | do not process $Id: rejecttest | |
353 | xxx $ |
|
357 | xxx $ | |
354 | $Xinfo: User Name <user@example.com>: rejects? $ |
|
358 | $Xinfo: User Name <user@example.com>: rejects? $ | |
355 | ignore $Id$ |
|
359 | ignore $Id$ | |
356 |
|
360 | |||
357 | % rollback |
|
361 | % rollback | |
358 | rolling back last transaction |
|
362 | rolling back last transaction | |
359 | % clean update |
|
363 | % clean update | |
360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
361 | % kwexpand/kwshrink on selected files |
|
365 | % kwexpand/kwshrink on selected files | |
362 | % copy a x/a |
|
366 | % copy a x/a | |
363 | % kwexpand a |
|
367 | % kwexpand a | |
364 | overwriting a expanding keywords |
|
368 | overwriting a expanding keywords | |
365 | % kwexpand x/a should abort |
|
369 | % kwexpand x/a should abort | |
366 | abort: outstanding uncommitted changes |
|
370 | abort: outstanding uncommitted changes | |
367 | x/a |
|
371 | x/a | |
368 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e |
|
372 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e | |
369 | overwriting x/a expanding keywords |
|
373 | overwriting x/a expanding keywords | |
370 | committed changeset 3:cfa68229c1167443337266ebac453c73b1d5d16e |
|
374 | committed changeset 3:cfa68229c1167443337266ebac453c73b1d5d16e | |
371 | % cat a |
|
375 | % cat a | |
372 | expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $ |
|
376 | expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $ | |
373 | do not process $Id: |
|
377 | do not process $Id: | |
374 | xxx $ |
|
378 | xxx $ | |
375 | $Xinfo: User Name <user@example.com>: xa $ |
|
379 | $Xinfo: User Name <user@example.com>: xa $ | |
376 | % kwshrink a inside directory x |
|
380 | % kwshrink a inside directory x | |
377 | overwriting x/a shrinking keywords |
|
381 | overwriting x/a shrinking keywords | |
378 | % cat a |
|
382 | % cat a | |
379 | expand $Id$ |
|
383 | expand $Id$ | |
380 | do not process $Id: |
|
384 | do not process $Id: | |
381 | xxx $ |
|
385 | xxx $ | |
382 | $Xinfo$ |
|
386 | $Xinfo$ | |
383 | % kwexpand nonexistent |
|
387 | % kwexpand nonexistent | |
384 | nonexistent: |
|
388 | nonexistent: | |
385 | % hg serve |
|
389 | % hg serve | |
386 | % expansion |
|
390 | % expansion | |
387 | % hgweb file |
|
391 | % hgweb file | |
388 | 200 Script output follows |
|
392 | 200 Script output follows | |
389 |
|
393 | |||
390 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
394 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
391 | do not process $Id: |
|
395 | do not process $Id: | |
392 | xxx $ |
|
396 | xxx $ | |
393 | $Xinfo: User Name <user@example.com>: firstline $ |
|
397 | $Xinfo: User Name <user@example.com>: firstline $ | |
394 | % no expansion |
|
398 | % no expansion | |
395 | % hgweb annotate |
|
399 | % hgweb annotate | |
396 | 200 Script output follows |
|
400 | 200 Script output follows | |
397 |
|
401 | |||
398 |
|
402 | |||
399 | user@1: expand $Id$ |
|
403 | user@1: expand $Id$ | |
400 | user@1: do not process $Id: |
|
404 | user@1: do not process $Id: | |
401 | user@1: xxx $ |
|
405 | user@1: xxx $ | |
402 | user@2: $Xinfo$ |
|
406 | user@2: $Xinfo$ | |
403 |
|
407 | |||
404 |
|
408 | |||
405 |
|
409 | |||
406 |
|
410 | |||
407 | % hgweb changeset |
|
411 | % hgweb changeset | |
408 | 200 Script output follows |
|
412 | 200 Script output follows | |
409 |
|
413 | |||
410 |
|
414 | |||
411 | # HG changeset patch |
|
415 | # HG changeset patch | |
412 | # User User Name <user@example.com> |
|
416 | # User User Name <user@example.com> | |
413 | # Date 3 0 |
|
417 | # Date 3 0 | |
414 | # Node ID cfa68229c1167443337266ebac453c73b1d5d16e |
|
418 | # Node ID cfa68229c1167443337266ebac453c73b1d5d16e | |
415 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
419 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 | |
416 | xa |
|
420 | xa | |
417 |
|
421 | |||
418 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
422 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
419 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 |
|
423 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 | |
420 | @@ -0,0 +1,4 @@ |
|
424 | @@ -0,0 +1,4 @@ | |
421 | +expand $Id$ |
|
425 | +expand $Id$ | |
422 | +do not process $Id: |
|
426 | +do not process $Id: | |
423 | +xxx $ |
|
427 | +xxx $ | |
424 | +$Xinfo$ |
|
428 | +$Xinfo$ | |
425 |
|
429 | |||
426 | % hgweb filediff |
|
430 | % hgweb filediff | |
427 | 200 Script output follows |
|
431 | 200 Script output follows | |
428 |
|
432 | |||
429 |
|
433 | |||
430 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
434 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
431 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
435 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 | |
432 | @@ -1,3 +1,4 @@ |
|
436 | @@ -1,3 +1,4 @@ | |
433 | expand $Id$ |
|
437 | expand $Id$ | |
434 | do not process $Id: |
|
438 | do not process $Id: | |
435 | xxx $ |
|
439 | xxx $ | |
436 | +$Xinfo$ |
|
440 | +$Xinfo$ | |
437 |
|
441 | |||
438 |
|
442 | |||
439 |
|
443 | |||
440 |
|
444 | |||
441 | % errors encountered |
|
445 | % errors encountered | |
442 | % merge/resolve |
|
446 | % merge/resolve | |
443 | % simplemerge |
|
447 | % simplemerge | |
444 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
448 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
445 | created new head |
|
449 | created new head | |
446 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
450 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
447 | (branch merge, don't forget to commit) |
|
451 | (branch merge, don't forget to commit) | |
448 | $Id: m 8731e1dadc99 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
452 | $Id: m 8731e1dadc99 Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
449 | foo |
|
453 | foo | |
450 | % conflict |
|
454 | % conflict | |
451 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
455 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
452 | created new head |
|
456 | created new head | |
453 | merging m |
|
457 | merging m | |
454 | warning: conflicts during merge. |
|
458 | warning: conflicts during merge. | |
455 | merging m failed! |
|
459 | merging m failed! | |
456 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
460 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
457 | use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
|
461 | use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon | |
458 | % keyword stays outside conflict zone |
|
462 | % keyword stays outside conflict zone | |
459 | $Id$ |
|
463 | $Id$ | |
460 | <<<<<<< local |
|
464 | <<<<<<< local | |
461 | bar |
|
465 | bar | |
462 | ======= |
|
466 | ======= | |
463 | foo |
|
467 | foo | |
464 | >>>>>>> other |
|
468 | >>>>>>> other | |
465 | % resolve to local |
|
469 | % resolve to local | |
466 | $Id: m 43dfd2854b5b Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
470 | $Id: m 43dfd2854b5b Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
467 | bar |
|
471 | bar | |
468 | % switch off expansion |
|
472 | % switch off expansion | |
469 | % kwshrink with unknown file u |
|
473 | % kwshrink with unknown file u | |
470 | overwriting a shrinking keywords |
|
474 | overwriting a shrinking keywords | |
471 | overwriting m shrinking keywords |
|
475 | overwriting m shrinking keywords | |
472 | overwriting x/a shrinking keywords |
|
476 | overwriting x/a shrinking keywords | |
473 | % cat |
|
477 | % cat | |
474 | expand $Id$ |
|
478 | expand $Id$ | |
475 | do not process $Id: |
|
479 | do not process $Id: | |
476 | xxx $ |
|
480 | xxx $ | |
477 | $Xinfo$ |
|
481 | $Xinfo$ | |
478 | ignore $Id$ |
|
482 | ignore $Id$ | |
479 | % hg cat |
|
483 | % hg cat | |
480 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
484 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
481 | do not process $Id: |
|
485 | do not process $Id: | |
482 | xxx $ |
|
486 | xxx $ | |
483 | $Xinfo: User Name <user@example.com>: firstline $ |
|
487 | $Xinfo: User Name <user@example.com>: firstline $ | |
484 | ignore $Id$ |
|
488 | ignore $Id$ | |
485 | a |
|
489 | a | |
486 | % cat |
|
490 | % cat | |
487 | expand $Id$ |
|
491 | expand $Id$ | |
488 | do not process $Id: |
|
492 | do not process $Id: | |
489 | xxx $ |
|
493 | xxx $ | |
490 | $Xinfo$ |
|
494 | $Xinfo$ | |
491 | ignore $Id$ |
|
495 | ignore $Id$ | |
492 | % hg cat |
|
496 | % hg cat | |
493 | expand $Id$ |
|
497 | expand $Id$ | |
494 | do not process $Id: |
|
498 | do not process $Id: | |
495 | xxx $ |
|
499 | xxx $ | |
496 | $Xinfo$ |
|
500 | $Xinfo$ | |
497 | ignore $Id$ |
|
501 | ignore $Id$ | |
498 | a |
|
502 | a |
@@ -1,542 +1,542 b'' | |||||
1 | % help |
|
1 | % help | |
2 | mq extension - patch management and development |
|
2 | mq extension - patch management and development | |
3 |
|
3 | |||
4 | This extension lets you work with a stack of patches in a Mercurial |
|
4 | This extension lets you work with a stack of patches in a Mercurial | |
5 | repository. It manages two stacks of patches - all known patches, and |
|
5 | repository. It manages two stacks of patches - all known patches, and | |
6 | applied patches (subset of known patches). |
|
6 | applied patches (subset of known patches). | |
7 |
|
7 | |||
8 | Known patches are represented as patch files in the .hg/patches |
|
8 | Known patches are represented as patch files in the .hg/patches | |
9 | directory. Applied patches are both patch files and changesets. |
|
9 | directory. Applied patches are both patch files and changesets. | |
10 |
|
10 | |||
11 | Common tasks (use "hg help command" for more details): |
|
11 | Common tasks (use "hg help command" for more details): | |
12 |
|
12 | |||
13 | prepare repository to work with patches qinit |
|
13 | prepare repository to work with patches qinit | |
14 | create new patch qnew |
|
14 | create new patch qnew | |
15 | import existing patch qimport |
|
15 | import existing patch qimport | |
16 |
|
16 | |||
17 | print patch series qseries |
|
17 | print patch series qseries | |
18 | print applied patches qapplied |
|
18 | print applied patches qapplied | |
19 | print name of top applied patch qtop |
|
19 | print name of top applied patch qtop | |
20 |
|
20 | |||
21 | add known patch to applied stack qpush |
|
21 | add known patch to applied stack qpush | |
22 | remove patch from applied stack qpop |
|
22 | remove patch from applied stack qpop | |
23 | refresh contents of top applied patch qrefresh |
|
23 | refresh contents of top applied patch qrefresh | |
24 |
|
24 | |||
25 | list of commands: |
|
25 | list of commands: | |
26 |
|
26 | |||
27 | qapplied print the patches already applied |
|
27 | qapplied print the patches already applied | |
28 | qclone clone main and patch repository at same time |
|
28 | qclone clone main and patch repository at same time | |
29 | qcommit commit changes in the queue repository |
|
29 | qcommit commit changes in the queue repository | |
30 | qdelete remove patches from queue |
|
30 | qdelete remove patches from queue | |
31 | qdiff diff of the current patch and subsequent modifications |
|
31 | qdiff diff of the current patch and subsequent modifications | |
32 | qfinish move applied patches into repository history |
|
32 | qfinish move applied patches into repository history | |
33 | qfold fold the named patches into the current patch |
|
33 | qfold fold the named patches into the current patch | |
34 | qgoto push or pop patches until named patch is at top of stack |
|
34 | qgoto push or pop patches until named patch is at top of stack | |
35 | qguard set or print guards for a patch |
|
35 | qguard set or print guards for a patch | |
36 | qheader print the header of the topmost or specified patch |
|
36 | qheader print the header of the topmost or specified patch | |
37 | qimport import a patch |
|
37 | qimport import a patch | |
38 | qinit init a new queue repository |
|
38 | qinit init a new queue repository | |
39 | qnew create a new patch |
|
39 | qnew create a new patch | |
40 | qnext print the name of the next patch |
|
40 | qnext print the name of the next patch | |
41 | qpop pop the current patch off the stack |
|
41 | qpop pop the current patch off the stack | |
42 | qprev print the name of the previous patch |
|
42 | qprev print the name of the previous patch | |
43 | qpush push the next patch onto the stack |
|
43 | qpush push the next patch onto the stack | |
44 | qrefresh update the current patch |
|
44 | qrefresh update the current patch | |
45 | qrename rename a patch |
|
45 | qrename rename a patch | |
46 | qrestore restore the queue state saved by a revision |
|
46 | qrestore restore the queue state saved by a revision | |
47 | qsave save current queue state |
|
47 | qsave save current queue state | |
48 | qselect set or print guarded patches to push |
|
48 | qselect set or print guarded patches to push | |
49 | qseries print the entire series file |
|
49 | qseries print the entire series file | |
50 | qtop print the name of the current patch |
|
50 | qtop print the name of the current patch | |
51 | qunapplied print the patches not yet applied |
|
51 | qunapplied print the patches not yet applied | |
52 | strip strip a revision and all its descendants from the repository |
|
52 | strip strip a revision and all its descendants from the repository | |
53 |
|
53 | |||
54 | enabled extensions: |
|
54 | enabled extensions: | |
55 |
|
55 | |||
56 | mq patch management and development |
|
56 | mq patch management and development | |
57 |
|
57 | |||
58 | use "hg -v help mq" to show aliases and global options |
|
58 | use "hg -v help mq" to show aliases and global options | |
59 | adding a |
|
59 | adding a | |
60 | updating working directory |
|
60 | updating working directory | |
61 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
62 | adding b/z |
|
62 | adding b/z | |
63 | % qinit |
|
63 | % qinit | |
64 | % -R qinit |
|
64 | % -R qinit | |
65 | % qinit -c |
|
65 | % qinit -c | |
66 | A .hgignore |
|
66 | A .hgignore | |
67 | A series |
|
67 | A series | |
68 | % qinit; qinit -c |
|
68 | % qinit; qinit -c | |
69 | .hgignore: |
|
69 | .hgignore: | |
70 | ^\.hg |
|
70 | ^\.hg | |
71 | ^\.mq |
|
71 | ^\.mq | |
72 | syntax: glob |
|
72 | syntax: glob | |
73 | status |
|
73 | status | |
74 | guards |
|
74 | guards | |
75 | series: |
|
75 | series: | |
76 | abort: repository already exists! |
|
76 | abort: repository already exists! | |
77 | % qinit; <stuff>; qinit -c |
|
77 | % qinit; <stuff>; qinit -c | |
78 | adding .hg/patches/A |
|
78 | adding .hg/patches/A | |
79 | adding .hg/patches/B |
|
79 | adding .hg/patches/B | |
80 | A .hgignore |
|
80 | A .hgignore | |
81 | A A |
|
81 | A A | |
82 | A B |
|
82 | A B | |
83 | A series |
|
83 | A series | |
84 | .hgignore: |
|
84 | .hgignore: | |
85 | status |
|
85 | status | |
86 | bleh |
|
86 | bleh | |
87 | series: |
|
87 | series: | |
88 | A |
|
88 | A | |
89 | B |
|
89 | B | |
90 | % qrefresh |
|
90 | % qrefresh | |
91 | foo bar |
|
91 | foo bar | |
92 |
|
92 | |||
93 | diff -r xa |
|
93 | diff -r xa | |
94 | --- a/a |
|
94 | --- a/a | |
95 | +++ b/a |
|
95 | +++ b/a | |
96 | @@ -1,1 +1,2 @@ |
|
96 | @@ -1,1 +1,2 @@ | |
97 | a |
|
97 | a | |
98 | +a |
|
98 | +a | |
99 | % empty qrefresh |
|
99 | % empty qrefresh | |
100 | revision: |
|
100 | revision: | |
101 | patch: |
|
101 | patch: | |
102 | foo bar |
|
102 | foo bar | |
103 |
|
103 | |||
104 | working dir diff: |
|
104 | working dir diff: | |
105 | --- a/a |
|
105 | --- a/a | |
106 | +++ b/a |
|
106 | +++ b/a | |
107 | @@ -1,1 +1,2 @@ |
|
107 | @@ -1,1 +1,2 @@ | |
108 | a |
|
108 | a | |
109 | +a |
|
109 | +a | |
110 | % qpop |
|
110 | % qpop | |
111 | patch queue now empty |
|
111 | patch queue now empty | |
112 | % qpush |
|
112 | % qpush | |
113 | applying test.patch |
|
113 | applying test.patch | |
114 | now at: test.patch |
|
114 | now at: test.patch | |
115 | % pop/push outside repo |
|
115 | % pop/push outside repo | |
116 | patch queue now empty |
|
116 | patch queue now empty | |
117 | applying test.patch |
|
117 | applying test.patch | |
118 | now at: test.patch |
|
118 | now at: test.patch | |
119 | % qrefresh in subdir |
|
119 | % qrefresh in subdir | |
120 | % pop/push -a in subdir |
|
120 | % pop/push -a in subdir | |
121 | patch queue now empty |
|
121 | patch queue now empty | |
122 | applying test.patch |
|
122 | applying test.patch | |
123 | applying test2.patch |
|
123 | applying test2.patch | |
124 | now at: test2.patch |
|
124 | now at: test2.patch | |
125 | % qseries |
|
125 | % qseries | |
126 | test.patch |
|
126 | test.patch | |
127 | test2.patch |
|
127 | test2.patch | |
128 | now at: test.patch |
|
128 | now at: test.patch | |
129 | 0 A test.patch: foo bar |
|
129 | 0 A test.patch: foo bar | |
130 | 1 U test2.patch: |
|
130 | 1 U test2.patch: | |
131 | applying test2.patch |
|
131 | applying test2.patch | |
132 | now at: test2.patch |
|
132 | now at: test2.patch | |
133 | % qapplied |
|
133 | % qapplied | |
134 | test.patch |
|
134 | test.patch | |
135 | test2.patch |
|
135 | test2.patch | |
136 | % qtop |
|
136 | % qtop | |
137 | test2.patch |
|
137 | test2.patch | |
138 | % qprev |
|
138 | % qprev | |
139 | test.patch |
|
139 | test.patch | |
140 | % qnext |
|
140 | % qnext | |
141 | all patches applied |
|
141 | all patches applied | |
142 | % pop, qnext, qprev, qapplied |
|
142 | % pop, qnext, qprev, qapplied | |
143 | now at: test.patch |
|
143 | now at: test.patch | |
144 | test2.patch |
|
144 | test2.patch | |
145 | only one patch applied |
|
145 | only one patch applied | |
146 | test.patch |
|
146 | test.patch | |
147 | % commit should fail |
|
147 | % commit should fail | |
148 | abort: cannot commit over an applied mq patch |
|
148 | abort: cannot commit over an applied mq patch | |
149 | % push should fail |
|
149 | % push should fail | |
150 | pushing to ../../k |
|
150 | pushing to ../../k | |
151 | abort: source has mq patches applied |
|
151 | abort: source has mq patches applied | |
152 | % import should fail |
|
152 | % import should fail | |
153 | abort: cannot import over an applied patch |
|
153 | abort: cannot import over an applied patch | |
154 | % qunapplied |
|
154 | % qunapplied | |
155 | test2.patch |
|
155 | test2.patch | |
156 | % qpush/qpop with index |
|
156 | % qpush/qpop with index | |
157 | applying test2.patch |
|
157 | applying test2.patch | |
158 | now at: test2.patch |
|
158 | now at: test2.patch | |
159 | now at: test.patch |
|
159 | now at: test.patch | |
160 | applying test1b.patch |
|
160 | applying test1b.patch | |
161 | now at: test1b.patch |
|
161 | now at: test1b.patch | |
162 | applying test2.patch |
|
162 | applying test2.patch | |
163 | now at: test2.patch |
|
163 | now at: test2.patch | |
164 | now at: test1b.patch |
|
164 | now at: test1b.patch | |
165 | now at: test.patch |
|
165 | now at: test.patch | |
166 | applying test1b.patch |
|
166 | applying test1b.patch | |
167 | applying test2.patch |
|
167 | applying test2.patch | |
168 | now at: test2.patch |
|
168 | now at: test2.patch | |
169 | % push should succeed |
|
169 | % push should succeed | |
170 | patch queue now empty |
|
170 | patch queue now empty | |
171 | pushing to ../../k |
|
171 | pushing to ../../k | |
172 | searching for changes |
|
172 | searching for changes | |
173 | adding changesets |
|
173 | adding changesets | |
174 | adding manifests |
|
174 | adding manifests | |
175 | adding file changes |
|
175 | adding file changes | |
176 | added 1 changesets with 1 changes to 1 files |
|
176 | added 1 changesets with 1 changes to 1 files | |
177 | % qpush/qpop error codes |
|
177 | % qpush/qpop error codes | |
178 | applying test.patch |
|
178 | applying test.patch | |
179 | applying test1b.patch |
|
179 | applying test1b.patch | |
180 | applying test2.patch |
|
180 | applying test2.patch | |
181 | now at: test2.patch |
|
181 | now at: test2.patch | |
182 | % pops all patches and succeeds |
|
182 | % pops all patches and succeeds | |
183 | patch queue now empty |
|
183 | patch queue now empty | |
184 | qpop -a succeeds |
|
184 | qpop -a succeeds | |
185 | % does nothing and succeeds |
|
185 | % does nothing and succeeds | |
186 | no patches applied |
|
186 | no patches applied | |
187 | qpop -a succeeds |
|
187 | qpop -a succeeds | |
188 | % fails - nothing else to pop |
|
188 | % fails - nothing else to pop | |
189 | no patches applied |
|
189 | no patches applied | |
190 | qpop fails |
|
190 | qpop fails | |
191 | % pushes a patch and succeeds |
|
191 | % pushes a patch and succeeds | |
192 | applying test.patch |
|
192 | applying test.patch | |
193 | now at: test.patch |
|
193 | now at: test.patch | |
194 | qpush succeeds |
|
194 | qpush succeeds | |
195 | % pops a patch and succeeds |
|
195 | % pops a patch and succeeds | |
196 | patch queue now empty |
|
196 | patch queue now empty | |
197 | qpop succeeds |
|
197 | qpop succeeds | |
198 | % pushes up to test1b.patch and succeeds |
|
198 | % pushes up to test1b.patch and succeeds | |
199 | applying test.patch |
|
199 | applying test.patch | |
200 | applying test1b.patch |
|
200 | applying test1b.patch | |
201 | now at: test1b.patch |
|
201 | now at: test1b.patch | |
202 | qpush test1b.patch succeeds |
|
202 | qpush test1b.patch succeeds | |
203 | % does nothing and succeeds |
|
203 | % does nothing and succeeds | |
204 | qpush: test1b.patch is already at the top |
|
204 | qpush: test1b.patch is already at the top | |
205 | qpush test1b.patch succeeds |
|
205 | qpush test1b.patch succeeds | |
206 | % does nothing and succeeds |
|
206 | % does nothing and succeeds | |
207 | qpop: test1b.patch is already at the top |
|
207 | qpop: test1b.patch is already at the top | |
208 | qpop test1b.patch succeeds |
|
208 | qpop test1b.patch succeeds | |
209 | % fails - can't push to this patch |
|
209 | % fails - can't push to this patch | |
210 | abort: cannot push to a previous patch: test.patch |
|
210 | abort: cannot push to a previous patch: test.patch | |
211 | qpush test.patch fails |
|
211 | qpush test.patch fails | |
212 | % fails - can't pop to this patch |
|
212 | % fails - can't pop to this patch | |
213 | abort: patch test2.patch is not applied |
|
213 | abort: patch test2.patch is not applied | |
214 | qpop test2.patch fails |
|
214 | qpop test2.patch fails | |
215 | % pops up to test.patch and succeeds |
|
215 | % pops up to test.patch and succeeds | |
216 | now at: test.patch |
|
216 | now at: test.patch | |
217 | qpop test.patch succeeds |
|
217 | qpop test.patch succeeds | |
218 | % pushes all patches and succeeds |
|
218 | % pushes all patches and succeeds | |
219 | applying test1b.patch |
|
219 | applying test1b.patch | |
220 | applying test2.patch |
|
220 | applying test2.patch | |
221 | now at: test2.patch |
|
221 | now at: test2.patch | |
222 | qpush -a succeeds |
|
222 | qpush -a succeeds | |
223 | % does nothing and succeeds |
|
223 | % does nothing and succeeds | |
224 | all patches are currently applied |
|
224 | all patches are currently applied | |
225 | qpush -a succeeds |
|
225 | qpush -a succeeds | |
226 | % fails - nothing else to push |
|
226 | % fails - nothing else to push | |
227 | patch series already fully applied |
|
227 | patch series already fully applied | |
228 | qpush fails |
|
228 | qpush fails | |
229 | % does nothing and succeeds |
|
229 | % does nothing and succeeds | |
230 | qpush: test2.patch is already at the top |
|
230 | qpush: test2.patch is already at the top | |
231 | qpush test2.patch succeeds |
|
231 | qpush test2.patch succeeds | |
232 | % strip |
|
232 | % strip | |
233 | adding x |
|
233 | adding x | |
234 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
234 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
235 | saving bundle to |
|
235 | saving bundle to | |
236 | adding changesets |
|
236 | adding changesets | |
237 | adding manifests |
|
237 | adding manifests | |
238 | adding file changes |
|
238 | adding file changes | |
239 | added 1 changesets with 1 changes to 1 files |
|
239 | added 1 changesets with 1 changes to 1 files | |
240 | (run 'hg update' to get a working copy) |
|
240 | (run 'hg update' to get a working copy) | |
241 | % strip with local changes, should complain |
|
241 | % strip with local changes, should complain | |
242 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
243 | abort: local changes found |
|
243 | abort: local changes found | |
244 | % --force strip with local changes |
|
244 | % --force strip with local changes | |
245 |
0 files updated, 0 files merged, |
|
245 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
246 | saving bundle to |
|
246 | saving bundle to | |
247 | % cd b; hg qrefresh |
|
247 | % cd b; hg qrefresh | |
248 | adding a |
|
248 | adding a | |
249 | foo |
|
249 | foo | |
250 |
|
250 | |||
251 | diff -r cb9a9f314b8b a |
|
251 | diff -r cb9a9f314b8b a | |
252 | --- a/a |
|
252 | --- a/a | |
253 | +++ b/a |
|
253 | +++ b/a | |
254 | @@ -1,1 +1,2 @@ |
|
254 | @@ -1,1 +1,2 @@ | |
255 | a |
|
255 | a | |
256 | +a |
|
256 | +a | |
257 | diff -r cb9a9f314b8b b/f |
|
257 | diff -r cb9a9f314b8b b/f | |
258 | --- /dev/null |
|
258 | --- /dev/null | |
259 | +++ b/b/f |
|
259 | +++ b/b/f | |
260 | @@ -0,0 +1,1 @@ |
|
260 | @@ -0,0 +1,1 @@ | |
261 | +f |
|
261 | +f | |
262 | % hg qrefresh . |
|
262 | % hg qrefresh . | |
263 | foo |
|
263 | foo | |
264 |
|
264 | |||
265 | diff -r cb9a9f314b8b b/f |
|
265 | diff -r cb9a9f314b8b b/f | |
266 | --- /dev/null |
|
266 | --- /dev/null | |
267 | +++ b/b/f |
|
267 | +++ b/b/f | |
268 | @@ -0,0 +1,1 @@ |
|
268 | @@ -0,0 +1,1 @@ | |
269 | +f |
|
269 | +f | |
270 | M a |
|
270 | M a | |
271 | % qpush failure |
|
271 | % qpush failure | |
272 | patch queue now empty |
|
272 | patch queue now empty | |
273 | applying foo |
|
273 | applying foo | |
274 | applying bar |
|
274 | applying bar | |
275 | file foo already exists |
|
275 | file foo already exists | |
276 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
276 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
277 | patch failed, unable to continue (try -v) |
|
277 | patch failed, unable to continue (try -v) | |
278 | patch failed, rejects left in working dir |
|
278 | patch failed, rejects left in working dir | |
279 | errors during apply, please fix and refresh bar |
|
279 | errors during apply, please fix and refresh bar | |
280 | ? foo |
|
280 | ? foo | |
281 | ? foo.rej |
|
281 | ? foo.rej | |
282 | % mq tags |
|
282 | % mq tags | |
283 | 0 qparent |
|
283 | 0 qparent | |
284 | 1 qbase foo |
|
284 | 1 qbase foo | |
285 | 2 qtip bar tip |
|
285 | 2 qtip bar tip | |
286 | % bad node in status |
|
286 | % bad node in status | |
287 | now at: foo |
|
287 | now at: foo | |
288 | changeset: 0:cb9a9f314b8b |
|
288 | changeset: 0:cb9a9f314b8b | |
289 | mq status file refers to unknown node |
|
289 | mq status file refers to unknown node | |
290 | tag: tip |
|
290 | tag: tip | |
291 | user: test |
|
291 | user: test | |
292 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
292 | date: Thu Jan 01 00:00:00 1970 +0000 | |
293 | summary: a |
|
293 | summary: a | |
294 |
|
294 | |||
295 | mq status file refers to unknown node |
|
295 | mq status file refers to unknown node | |
296 | default 0:cb9a9f314b8b |
|
296 | default 0:cb9a9f314b8b | |
297 | abort: trying to pop unknown node |
|
297 | abort: trying to pop unknown node | |
298 | new file |
|
298 | new file | |
299 |
|
299 | |||
300 | diff --git a/new b/new |
|
300 | diff --git a/new b/new | |
301 | new file mode 100755 |
|
301 | new file mode 100755 | |
302 | --- /dev/null |
|
302 | --- /dev/null | |
303 | +++ b/new |
|
303 | +++ b/new | |
304 | @@ -0,0 +1,1 @@ |
|
304 | @@ -0,0 +1,1 @@ | |
305 | +foo |
|
305 | +foo | |
306 | copy file |
|
306 | copy file | |
307 |
|
307 | |||
308 | diff --git a/new b/copy |
|
308 | diff --git a/new b/copy | |
309 | copy from new |
|
309 | copy from new | |
310 | copy to copy |
|
310 | copy to copy | |
311 | now at: new |
|
311 | now at: new | |
312 | applying copy |
|
312 | applying copy | |
313 | now at: copy |
|
313 | now at: copy | |
314 | diff --git a/new b/copy |
|
314 | diff --git a/new b/copy | |
315 | copy from new |
|
315 | copy from new | |
316 | copy to copy |
|
316 | copy to copy | |
317 | diff --git a/new b/copy |
|
317 | diff --git a/new b/copy | |
318 | copy from new |
|
318 | copy from new | |
319 | copy to copy |
|
319 | copy to copy | |
320 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
320 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
321 | created new head |
|
321 | created new head | |
322 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
322 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
323 | adding branch |
|
323 | adding branch | |
324 | adding changesets |
|
324 | adding changesets | |
325 | adding manifests |
|
325 | adding manifests | |
326 | adding file changes |
|
326 | adding file changes | |
327 | added 1 changesets with 1 changes to 1 files |
|
327 | added 1 changesets with 1 changes to 1 files | |
328 | patch queue now empty |
|
328 | patch queue now empty | |
329 | (working directory not at a head) |
|
329 | (working directory not at a head) | |
330 | applying bar |
|
330 | applying bar | |
331 | now at: bar |
|
331 | now at: bar | |
332 | diff --git a/bar b/bar |
|
332 | diff --git a/bar b/bar | |
333 | new file mode 100644 |
|
333 | new file mode 100644 | |
334 | --- /dev/null |
|
334 | --- /dev/null | |
335 | +++ b/bar |
|
335 | +++ b/bar | |
336 | @@ -0,0 +1,1 @@ |
|
336 | @@ -0,0 +1,1 @@ | |
337 | +bar |
|
337 | +bar | |
338 | diff --git a/foo b/baz |
|
338 | diff --git a/foo b/baz | |
339 | rename from foo |
|
339 | rename from foo | |
340 | rename to baz |
|
340 | rename to baz | |
341 | 2 baz (foo) |
|
341 | 2 baz (foo) | |
342 | diff --git a/bar b/bar |
|
342 | diff --git a/bar b/bar | |
343 | new file mode 100644 |
|
343 | new file mode 100644 | |
344 | --- /dev/null |
|
344 | --- /dev/null | |
345 | +++ b/bar |
|
345 | +++ b/bar | |
346 | @@ -0,0 +1,1 @@ |
|
346 | @@ -0,0 +1,1 @@ | |
347 | +bar |
|
347 | +bar | |
348 | diff --git a/foo b/baz |
|
348 | diff --git a/foo b/baz | |
349 | rename from foo |
|
349 | rename from foo | |
350 | rename to baz |
|
350 | rename to baz | |
351 | 2 baz (foo) |
|
351 | 2 baz (foo) | |
352 | diff --git a/bar b/bar |
|
352 | diff --git a/bar b/bar | |
353 | diff --git a/foo b/baz |
|
353 | diff --git a/foo b/baz | |
354 |
|
354 | |||
355 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
355 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
356 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
356 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
357 | adding branch |
|
357 | adding branch | |
358 | adding changesets |
|
358 | adding changesets | |
359 | adding manifests |
|
359 | adding manifests | |
360 | adding file changes |
|
360 | adding file changes | |
361 | added 1 changesets with 1 changes to 1 files |
|
361 | added 1 changesets with 1 changes to 1 files | |
362 | patch queue now empty |
|
362 | patch queue now empty | |
363 | (working directory not at a head) |
|
363 | (working directory not at a head) | |
364 | applying bar |
|
364 | applying bar | |
365 | now at: bar |
|
365 | now at: bar | |
366 | diff --git a/foo b/bleh |
|
366 | diff --git a/foo b/bleh | |
367 | rename from foo |
|
367 | rename from foo | |
368 | rename to bleh |
|
368 | rename to bleh | |
369 | diff --git a/quux b/quux |
|
369 | diff --git a/quux b/quux | |
370 | new file mode 100644 |
|
370 | new file mode 100644 | |
371 | --- /dev/null |
|
371 | --- /dev/null | |
372 | +++ b/quux |
|
372 | +++ b/quux | |
373 | @@ -0,0 +1,1 @@ |
|
373 | @@ -0,0 +1,1 @@ | |
374 | +bar |
|
374 | +bar | |
375 | 3 bleh (foo) |
|
375 | 3 bleh (foo) | |
376 | diff --git a/foo b/barney |
|
376 | diff --git a/foo b/barney | |
377 | rename from foo |
|
377 | rename from foo | |
378 | rename to barney |
|
378 | rename to barney | |
379 | diff --git a/fred b/fred |
|
379 | diff --git a/fred b/fred | |
380 | new file mode 100644 |
|
380 | new file mode 100644 | |
381 | --- /dev/null |
|
381 | --- /dev/null | |
382 | +++ b/fred |
|
382 | +++ b/fred | |
383 | @@ -0,0 +1,1 @@ |
|
383 | @@ -0,0 +1,1 @@ | |
384 | +bar |
|
384 | +bar | |
385 | 3 barney (foo) |
|
385 | 3 barney (foo) | |
386 | % refresh omitting an added file |
|
386 | % refresh omitting an added file | |
387 | C newfile |
|
387 | C newfile | |
388 | A newfile |
|
388 | A newfile | |
389 | now at: bar |
|
389 | now at: bar | |
390 | % create a git patch |
|
390 | % create a git patch | |
391 | diff --git a/alexander b/alexander |
|
391 | diff --git a/alexander b/alexander | |
392 | % create a git binary patch |
|
392 | % create a git binary patch | |
393 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
393 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
394 | diff --git a/bucephalus b/bucephalus |
|
394 | diff --git a/bucephalus b/bucephalus | |
395 | % check binary patches can be popped and pushed |
|
395 | % check binary patches can be popped and pushed | |
396 | now at: addalexander |
|
396 | now at: addalexander | |
397 | applying addbucephalus |
|
397 | applying addbucephalus | |
398 | now at: addbucephalus |
|
398 | now at: addbucephalus | |
399 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
399 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
400 | % strip again |
|
400 | % strip again | |
401 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
401 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
402 | created new head |
|
402 | created new head | |
403 | merging foo |
|
403 | merging foo | |
404 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
404 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
405 | (branch merge, don't forget to commit) |
|
405 | (branch merge, don't forget to commit) | |
406 | changeset: 3:99615015637b |
|
406 | changeset: 3:99615015637b | |
407 | tag: tip |
|
407 | tag: tip | |
408 | parent: 2:20cbbe65cff7 |
|
408 | parent: 2:20cbbe65cff7 | |
409 | parent: 1:d2871fc282d4 |
|
409 | parent: 1:d2871fc282d4 | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:00 1970 +0000 | |
412 | summary: merge |
|
412 | summary: merge | |
413 |
|
413 | |||
414 | changeset: 2:20cbbe65cff7 |
|
414 | changeset: 2:20cbbe65cff7 | |
415 | parent: 0:53245c60e682 |
|
415 | parent: 0:53245c60e682 | |
416 | user: test |
|
416 | user: test | |
417 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | date: Thu Jan 01 00:00:00 1970 +0000 | |
418 | summary: change foo 2 |
|
418 | summary: change foo 2 | |
419 |
|
419 | |||
420 | changeset: 1:d2871fc282d4 |
|
420 | changeset: 1:d2871fc282d4 | |
421 | user: test |
|
421 | user: test | |
422 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | date: Thu Jan 01 00:00:00 1970 +0000 | |
423 | summary: change foo 1 |
|
423 | summary: change foo 1 | |
424 |
|
424 | |||
425 | changeset: 0:53245c60e682 |
|
425 | changeset: 0:53245c60e682 | |
426 | user: test |
|
426 | user: test | |
427 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | date: Thu Jan 01 00:00:00 1970 +0000 | |
428 | summary: add foo |
|
428 | summary: add foo | |
429 |
|
429 | |||
430 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
430 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
431 | saving bundle to |
|
431 | saving bundle to | |
432 | saving bundle to |
|
432 | saving bundle to | |
433 | adding branch |
|
433 | adding branch | |
434 | adding changesets |
|
434 | adding changesets | |
435 | adding manifests |
|
435 | adding manifests | |
436 | adding file changes |
|
436 | adding file changes | |
437 | added 1 changesets with 1 changes to 1 files |
|
437 | added 1 changesets with 1 changes to 1 files | |
438 | changeset: 1:20cbbe65cff7 |
|
438 | changeset: 1:20cbbe65cff7 | |
439 | tag: tip |
|
439 | tag: tip | |
440 | user: test |
|
440 | user: test | |
441 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
441 | date: Thu Jan 01 00:00:00 1970 +0000 | |
442 | summary: change foo 2 |
|
442 | summary: change foo 2 | |
443 |
|
443 | |||
444 | changeset: 0:53245c60e682 |
|
444 | changeset: 0:53245c60e682 | |
445 | user: test |
|
445 | user: test | |
446 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
446 | date: Thu Jan 01 00:00:00 1970 +0000 | |
447 | summary: add foo |
|
447 | summary: add foo | |
448 |
|
448 | |||
449 | % qclone |
|
449 | % qclone | |
450 | abort: versioned patch repository not found (see qinit -c) |
|
450 | abort: versioned patch repository not found (see qinit -c) | |
451 | adding .hg/patches/patch1 |
|
451 | adding .hg/patches/patch1 | |
452 | main repo: |
|
452 | main repo: | |
453 | rev 1: change foo |
|
453 | rev 1: change foo | |
454 | rev 0: add foo |
|
454 | rev 0: add foo | |
455 | patch repo: |
|
455 | patch repo: | |
456 | rev 0: checkpoint |
|
456 | rev 0: checkpoint | |
457 | updating working directory |
|
457 | updating working directory | |
458 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
458 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
460 | main repo: |
|
460 | main repo: | |
461 | rev 0: add foo |
|
461 | rev 0: add foo | |
462 | patch repo: |
|
462 | patch repo: | |
463 | rev 0: checkpoint |
|
463 | rev 0: checkpoint | |
464 | patch queue now empty |
|
464 | patch queue now empty | |
465 | main repo: |
|
465 | main repo: | |
466 | rev 0: add foo |
|
466 | rev 0: add foo | |
467 | patch repo: |
|
467 | patch repo: | |
468 | rev 0: checkpoint |
|
468 | rev 0: checkpoint | |
469 | updating working directory |
|
469 | updating working directory | |
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
472 | main repo: |
|
472 | main repo: | |
473 | rev 0: add foo |
|
473 | rev 0: add foo | |
474 | patch repo: |
|
474 | patch repo: | |
475 | rev 0: checkpoint |
|
475 | rev 0: checkpoint | |
476 | % test applying on an empty file (issue 1033) |
|
476 | % test applying on an empty file (issue 1033) | |
477 | adding a |
|
477 | adding a | |
478 | patch queue now empty |
|
478 | patch queue now empty | |
479 | applying changea |
|
479 | applying changea | |
480 | now at: changea |
|
480 | now at: changea | |
481 | % test qpush with --force, issue1087 |
|
481 | % test qpush with --force, issue1087 | |
482 | adding bye.txt |
|
482 | adding bye.txt | |
483 | adding hello.txt |
|
483 | adding hello.txt | |
484 | patch queue now empty |
|
484 | patch queue now empty | |
485 | % qpush should fail, local changes |
|
485 | % qpush should fail, local changes | |
486 | abort: local changes found, refresh first |
|
486 | abort: local changes found, refresh first | |
487 | % apply force, should not discard changes with empty patch |
|
487 | % apply force, should not discard changes with empty patch | |
488 | applying empty |
|
488 | applying empty | |
489 | patch empty is empty |
|
489 | patch empty is empty | |
490 | now at: empty |
|
490 | now at: empty | |
491 | diff -r bf5fc3f07a0a hello.txt |
|
491 | diff -r bf5fc3f07a0a hello.txt | |
492 | --- a/hello.txt |
|
492 | --- a/hello.txt | |
493 | +++ b/hello.txt |
|
493 | +++ b/hello.txt | |
494 | @@ -1,1 +1,2 @@ |
|
494 | @@ -1,1 +1,2 @@ | |
495 | hello |
|
495 | hello | |
496 | +world |
|
496 | +world | |
497 | diff -r 9ecee4f634e3 hello.txt |
|
497 | diff -r 9ecee4f634e3 hello.txt | |
498 | --- a/hello.txt |
|
498 | --- a/hello.txt | |
499 | +++ b/hello.txt |
|
499 | +++ b/hello.txt | |
500 | @@ -1,1 +1,2 @@ |
|
500 | @@ -1,1 +1,2 @@ | |
501 | hello |
|
501 | hello | |
502 | +world |
|
502 | +world | |
503 | changeset: 1:bf5fc3f07a0a |
|
503 | changeset: 1:bf5fc3f07a0a | |
504 | tag: qtip |
|
504 | tag: qtip | |
505 | tag: tip |
|
505 | tag: tip | |
506 | tag: empty |
|
506 | tag: empty | |
507 | tag: qbase |
|
507 | tag: qbase | |
508 | user: test |
|
508 | user: test | |
509 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
509 | date: Thu Jan 01 00:00:00 1970 +0000 | |
510 | summary: imported patch empty |
|
510 | summary: imported patch empty | |
511 |
|
511 | |||
512 |
|
512 | |||
513 | patch queue now empty |
|
513 | patch queue now empty | |
514 | % qpush should fail, local changes |
|
514 | % qpush should fail, local changes | |
515 | abort: local changes found, refresh first |
|
515 | abort: local changes found, refresh first | |
516 | % apply force, should discard changes in hello, but not bye |
|
516 | % apply force, should discard changes in hello, but not bye | |
517 | applying empty |
|
517 | applying empty | |
518 | now at: empty |
|
518 | now at: empty | |
519 | M bye.txt |
|
519 | M bye.txt | |
520 | diff -r ba252371dbc1 bye.txt |
|
520 | diff -r ba252371dbc1 bye.txt | |
521 | --- a/bye.txt |
|
521 | --- a/bye.txt | |
522 | +++ b/bye.txt |
|
522 | +++ b/bye.txt | |
523 | @@ -1,1 +1,2 @@ |
|
523 | @@ -1,1 +1,2 @@ | |
524 | bye |
|
524 | bye | |
525 | +universe |
|
525 | +universe | |
526 | diff -r 9ecee4f634e3 bye.txt |
|
526 | diff -r 9ecee4f634e3 bye.txt | |
527 | --- a/bye.txt |
|
527 | --- a/bye.txt | |
528 | +++ b/bye.txt |
|
528 | +++ b/bye.txt | |
529 | @@ -1,1 +1,2 @@ |
|
529 | @@ -1,1 +1,2 @@ | |
530 | bye |
|
530 | bye | |
531 | +universe |
|
531 | +universe | |
532 | diff -r 9ecee4f634e3 hello.txt |
|
532 | diff -r 9ecee4f634e3 hello.txt | |
533 | --- a/hello.txt |
|
533 | --- a/hello.txt | |
534 | +++ b/hello.txt |
|
534 | +++ b/hello.txt | |
535 | @@ -1,1 +1,3 @@ |
|
535 | @@ -1,1 +1,3 @@ | |
536 | hello |
|
536 | hello | |
537 | +world |
|
537 | +world | |
538 | +universe |
|
538 | +universe | |
539 | % test popping revisions not in working dir ancestry |
|
539 | % test popping revisions not in working dir ancestry | |
540 | 0 A empty |
|
540 | 0 A empty | |
541 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
541 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
542 | patch queue now empty |
|
542 | patch queue now empty |
@@ -1,76 +1,80 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | add() |
|
3 | add() | |
4 | { |
|
4 | { | |
5 | echo $2 >> $1 |
|
5 | echo $2 >> $1 | |
6 | } |
|
6 | } | |
7 |
|
7 | |||
8 | hg init t |
|
8 | hg init t | |
9 | cd t |
|
9 | cd t | |
10 |
|
10 | |||
11 | # set up a boring main branch |
|
11 | # set up a boring main branch | |
12 | add a a |
|
12 | add a a | |
13 | hg add a |
|
13 | hg add a | |
14 | mkdir x |
|
14 | mkdir x | |
15 | add x/x x |
|
15 | add x/x x | |
16 | hg add x/x |
|
16 | hg add x/x | |
17 | hg ci -m0 |
|
17 | hg ci -m0 | |
18 |
|
18 | |||
19 | add a m1 |
|
19 | add a m1 | |
20 | hg ci -m1 |
|
20 | hg ci -m1 | |
21 |
|
21 | |||
22 | add a m2 |
|
22 | add a m2 | |
23 | add x/y y1 |
|
23 | add x/y y1 | |
24 | hg add x/y |
|
24 | hg add x/y | |
25 | hg ci -m2 |
|
25 | hg ci -m2 | |
|
26 | cd .. | |||
26 |
|
27 | |||
27 | show() |
|
28 | show() | |
28 | { |
|
29 | { | |
29 | echo "- $2: $1" |
|
30 | echo "- $2: $1" | |
30 | hg st -C $1 |
|
31 | hg st -C $1 | |
31 | echo |
|
32 | echo | |
32 | hg diff --git $1 |
|
33 | hg diff --git $1 | |
33 | echo |
|
34 | echo | |
34 | } |
|
35 | } | |
35 |
|
36 | |||
36 | count=0 |
|
37 | count=0 | |
37 | # make a new branch and get diff/status output |
|
38 | # make a new branch and get diff/status output | |
38 | # $1 - first commit |
|
39 | # $1 - first commit | |
39 | # $2 - second commit |
|
40 | # $2 - second commit | |
40 | # $3 - working dir action |
|
41 | # $3 - working dir action | |
41 | # $4 - test description |
|
42 | # $4 - test description | |
42 | tb() |
|
43 | tb() | |
43 | { |
|
44 | { | |
|
45 | hg clone t t2 ; cd t2 | |||
44 | hg co -q -C 0 |
|
46 | hg co -q -C 0 | |
45 |
|
47 | |||
46 | add a $count |
|
48 | add a $count | |
47 | count=`expr $count + 1` |
|
49 | count=`expr $count + 1` | |
48 | hg ci -m "t0" |
|
50 | hg ci -m "t0" | |
49 | $1 |
|
51 | $1 | |
50 | hg ci -m "t1" |
|
52 | hg ci -m "t1" | |
51 | $2 |
|
53 | $2 | |
52 | hg ci -m "t2" |
|
54 | hg ci -m "t2" | |
53 | $3 |
|
55 | $3 | |
54 |
|
56 | |||
55 | echo "** $4 **" |
|
57 | echo "** $4 **" | |
56 | echo "** $1 / $2 / $3" |
|
58 | echo "** $1 / $2 / $3" | |
57 | show "" "working to parent" |
|
59 | show "" "working to parent" | |
58 | show "--rev 0" "working to root" |
|
60 | show "--rev 0" "working to root" | |
59 | show "--rev 2" "working to branch" |
|
61 | show "--rev 2" "working to branch" | |
60 | show "--rev 0 --rev ." "root to parent" |
|
62 | show "--rev 0 --rev ." "root to parent" | |
61 | show "--rev . --rev 0" "parent to root" |
|
63 | show "--rev . --rev 0" "parent to root" | |
62 | show "--rev 2 --rev ." "branch to parent" |
|
64 | show "--rev 2 --rev ." "branch to parent" | |
63 | show "--rev . --rev 2" "parent to branch" |
|
65 | show "--rev . --rev 2" "parent to branch" | |
64 | echo |
|
66 | echo | |
|
67 | cd .. | |||
|
68 | rm -rf t2 | |||
65 | } |
|
69 | } | |
66 |
|
70 | |||
67 |
|
71 | |||
68 | tb "add a a1" "add a a2" "hg mv a b" "rename in working dir" |
|
72 | tb "add a a1" "add a a2" "hg mv a b" "rename in working dir" | |
69 | tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" |
|
73 | tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" | |
70 | tb "hg mv a b" "add b b1" "add b w" "single rename" |
|
74 | tb "hg mv a b" "add b b1" "add b w" "single rename" | |
71 | tb "hg cp a b" "add b b1" "add a w" "single copy" |
|
75 | tb "hg cp a b" "add b b1" "add a w" "single copy" | |
72 | tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" |
|
76 | tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" | |
73 | tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" |
|
77 | tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" | |
74 | tb "add a a1" "hg mv a b" "hg mv b a" "circular rename" |
|
78 | tb "add a a1" "hg mv a b" "hg mv b a" "circular rename" | |
75 |
|
79 | |||
76 | tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move" |
|
80 | tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move" |
@@ -1,1220 +1,1236 b'' | |||||
|
1 | updating working directory | |||
|
2 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
1 | created new head |
|
3 | created new head | |
2 | ** rename in working dir ** |
|
4 | ** rename in working dir ** | |
3 | ** add a a1 / add a a2 / hg mv a b |
|
5 | ** add a a1 / add a a2 / hg mv a b | |
4 | - working to parent: |
|
6 | - working to parent: | |
5 | A b |
|
7 | A b | |
6 | a |
|
8 | a | |
7 | R a |
|
9 | R a | |
8 |
|
10 | |||
9 | diff --git a/a b/b |
|
11 | diff --git a/a b/b | |
10 | rename from a |
|
12 | rename from a | |
11 | rename to b |
|
13 | rename to b | |
12 |
|
14 | |||
13 | - working to root: --rev 0 |
|
15 | - working to root: --rev 0 | |
14 | A b |
|
16 | A b | |
15 | a |
|
17 | a | |
16 | R a |
|
18 | R a | |
17 |
|
19 | |||
18 | diff --git a/a b/b |
|
20 | diff --git a/a b/b | |
19 | rename from a |
|
21 | rename from a | |
20 | rename to b |
|
22 | rename to b | |
21 | --- a/a |
|
23 | --- a/a | |
22 | +++ b/b |
|
24 | +++ b/b | |
23 | @@ -1,1 +1,4 @@ |
|
25 | @@ -1,1 +1,4 @@ | |
24 | a |
|
26 | a | |
25 | +0 |
|
27 | +0 | |
26 | +a1 |
|
28 | +a1 | |
27 | +a2 |
|
29 | +a2 | |
28 |
|
30 | |||
29 | - working to branch: --rev 2 |
|
31 | - working to branch: --rev 2 | |
30 | A b |
|
32 | A b | |
31 | a |
|
33 | a | |
32 | R a |
|
34 | R a | |
33 | R x/y |
|
35 | R x/y | |
34 |
|
36 | |||
35 | diff --git a/a b/b |
|
37 | diff --git a/a b/b | |
36 | rename from a |
|
38 | rename from a | |
37 | rename to b |
|
39 | rename to b | |
38 | --- a/a |
|
40 | --- a/a | |
39 | +++ b/b |
|
41 | +++ b/b | |
40 | @@ -1,3 +1,4 @@ |
|
42 | @@ -1,3 +1,4 @@ | |
41 | a |
|
43 | a | |
42 | -m1 |
|
44 | -m1 | |
43 | -m2 |
|
45 | -m2 | |
44 | +0 |
|
46 | +0 | |
45 | +a1 |
|
47 | +a1 | |
46 | +a2 |
|
48 | +a2 | |
47 | diff --git a/x/y b/x/y |
|
49 | diff --git a/x/y b/x/y | |
48 | deleted file mode 100644 |
|
50 | deleted file mode 100644 | |
49 | --- a/x/y |
|
51 | --- a/x/y | |
50 | +++ /dev/null |
|
52 | +++ /dev/null | |
51 | @@ -1,1 +0,0 @@ |
|
53 | @@ -1,1 +0,0 @@ | |
52 | -y1 |
|
54 | -y1 | |
53 |
|
55 | |||
54 | - root to parent: --rev 0 --rev . |
|
56 | - root to parent: --rev 0 --rev . | |
55 | M a |
|
57 | M a | |
56 |
|
58 | |||
57 | diff --git a/a b/a |
|
59 | diff --git a/a b/a | |
58 | --- a/a |
|
60 | --- a/a | |
59 | +++ b/a |
|
61 | +++ b/a | |
60 | @@ -1,1 +1,4 @@ |
|
62 | @@ -1,1 +1,4 @@ | |
61 | a |
|
63 | a | |
62 | +0 |
|
64 | +0 | |
63 | +a1 |
|
65 | +a1 | |
64 | +a2 |
|
66 | +a2 | |
65 |
|
67 | |||
66 | - parent to root: --rev . --rev 0 |
|
68 | - parent to root: --rev . --rev 0 | |
67 | M a |
|
69 | M a | |
68 |
|
70 | |||
69 | diff --git a/a b/a |
|
71 | diff --git a/a b/a | |
70 | --- a/a |
|
72 | --- a/a | |
71 | +++ b/a |
|
73 | +++ b/a | |
72 | @@ -1,4 +1,1 @@ |
|
74 | @@ -1,4 +1,1 @@ | |
73 | a |
|
75 | a | |
74 | -0 |
|
76 | -0 | |
75 | -a1 |
|
77 | -a1 | |
76 | -a2 |
|
78 | -a2 | |
77 |
|
79 | |||
78 | - branch to parent: --rev 2 --rev . |
|
80 | - branch to parent: --rev 2 --rev . | |
79 | M a |
|
81 | M a | |
80 | R x/y |
|
82 | R x/y | |
81 |
|
83 | |||
82 | diff --git a/a b/a |
|
84 | diff --git a/a b/a | |
83 | --- a/a |
|
85 | --- a/a | |
84 | +++ b/a |
|
86 | +++ b/a | |
85 | @@ -1,3 +1,4 @@ |
|
87 | @@ -1,3 +1,4 @@ | |
86 | a |
|
88 | a | |
87 | -m1 |
|
89 | -m1 | |
88 | -m2 |
|
90 | -m2 | |
89 | +0 |
|
91 | +0 | |
90 | +a1 |
|
92 | +a1 | |
91 | +a2 |
|
93 | +a2 | |
92 | diff --git a/x/y b/x/y |
|
94 | diff --git a/x/y b/x/y | |
93 | deleted file mode 100644 |
|
95 | deleted file mode 100644 | |
94 | --- a/x/y |
|
96 | --- a/x/y | |
95 | +++ /dev/null |
|
97 | +++ /dev/null | |
96 | @@ -1,1 +0,0 @@ |
|
98 | @@ -1,1 +0,0 @@ | |
97 | -y1 |
|
99 | -y1 | |
98 |
|
100 | |||
99 | - parent to branch: --rev . --rev 2 |
|
101 | - parent to branch: --rev . --rev 2 | |
100 | M a |
|
102 | M a | |
101 | A x/y |
|
103 | A x/y | |
102 |
|
104 | |||
103 | diff --git a/a b/a |
|
105 | diff --git a/a b/a | |
104 | --- a/a |
|
106 | --- a/a | |
105 | +++ b/a |
|
107 | +++ b/a | |
106 | @@ -1,4 +1,3 @@ |
|
108 | @@ -1,4 +1,3 @@ | |
107 | a |
|
109 | a | |
108 | -0 |
|
110 | -0 | |
109 | -a1 |
|
111 | -a1 | |
110 | -a2 |
|
112 | -a2 | |
111 | +m1 |
|
113 | +m1 | |
112 | +m2 |
|
114 | +m2 | |
113 | diff --git a/x/y b/x/y |
|
115 | diff --git a/x/y b/x/y | |
114 | new file mode 100644 |
|
116 | new file mode 100644 | |
115 | --- /dev/null |
|
117 | --- /dev/null | |
116 | +++ b/x/y |
|
118 | +++ b/x/y | |
117 | @@ -0,0 +1,1 @@ |
|
119 | @@ -0,0 +1,1 @@ | |
118 | +y1 |
|
120 | +y1 | |
119 |
|
121 | |||
120 |
|
122 | |||
|
123 | updating working directory | |||
|
124 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
121 | created new head |
|
125 | created new head | |
122 | ** copy in working dir ** |
|
126 | ** copy in working dir ** | |
123 | ** add a a1 / add a a2 / hg cp a b |
|
127 | ** add a a1 / add a a2 / hg cp a b | |
124 | - working to parent: |
|
128 | - working to parent: | |
125 | A b |
|
129 | A b | |
126 | a |
|
130 | a | |
127 |
|
131 | |||
128 | diff --git a/a b/b |
|
132 | diff --git a/a b/b | |
129 | copy from a |
|
133 | copy from a | |
130 | copy to b |
|
134 | copy to b | |
131 |
|
135 | |||
132 | - working to root: --rev 0 |
|
136 | - working to root: --rev 0 | |
133 | M a |
|
137 | M a | |
134 | A b |
|
138 | A b | |
135 | a |
|
139 | a | |
136 |
|
140 | |||
137 | diff --git a/a b/a |
|
141 | diff --git a/a b/a | |
138 | --- a/a |
|
142 | --- a/a | |
139 | +++ b/a |
|
143 | +++ b/a | |
140 | @@ -1,1 +1,4 @@ |
|
144 | @@ -1,1 +1,4 @@ | |
141 | a |
|
145 | a | |
142 | +1 |
|
146 | +1 | |
143 | +a1 |
|
147 | +a1 | |
144 | +a2 |
|
148 | +a2 | |
145 | diff --git a/a b/b |
|
149 | diff --git a/a b/b | |
146 | copy from a |
|
150 | copy from a | |
147 | copy to b |
|
151 | copy to b | |
148 | --- a/a |
|
152 | --- a/a | |
149 | +++ b/b |
|
153 | +++ b/b | |
150 | @@ -1,1 +1,4 @@ |
|
154 | @@ -1,1 +1,4 @@ | |
151 | a |
|
155 | a | |
152 | +1 |
|
156 | +1 | |
153 | +a1 |
|
157 | +a1 | |
154 | +a2 |
|
158 | +a2 | |
155 |
|
159 | |||
156 | - working to branch: --rev 2 |
|
160 | - working to branch: --rev 2 | |
157 | M a |
|
161 | M a | |
158 | A b |
|
162 | A b | |
159 | a |
|
163 | a | |
160 | R x/y |
|
164 | R x/y | |
161 |
|
165 | |||
162 | diff --git a/a b/a |
|
166 | diff --git a/a b/a | |
163 | --- a/a |
|
167 | --- a/a | |
164 | +++ b/a |
|
168 | +++ b/a | |
165 | @@ -1,3 +1,4 @@ |
|
169 | @@ -1,3 +1,4 @@ | |
166 | a |
|
170 | a | |
167 | -m1 |
|
171 | -m1 | |
168 | -m2 |
|
172 | -m2 | |
169 | +1 |
|
173 | +1 | |
170 | +a1 |
|
174 | +a1 | |
171 | +a2 |
|
175 | +a2 | |
172 | diff --git a/a b/b |
|
176 | diff --git a/a b/b | |
173 | copy from a |
|
177 | copy from a | |
174 | copy to b |
|
178 | copy to b | |
175 | --- a/a |
|
179 | --- a/a | |
176 | +++ b/b |
|
180 | +++ b/b | |
177 | @@ -1,3 +1,4 @@ |
|
181 | @@ -1,3 +1,4 @@ | |
178 | a |
|
182 | a | |
179 | -m1 |
|
183 | -m1 | |
180 | -m2 |
|
184 | -m2 | |
181 | +1 |
|
185 | +1 | |
182 | +a1 |
|
186 | +a1 | |
183 | +a2 |
|
187 | +a2 | |
184 | diff --git a/x/y b/x/y |
|
188 | diff --git a/x/y b/x/y | |
185 | deleted file mode 100644 |
|
189 | deleted file mode 100644 | |
186 | --- a/x/y |
|
190 | --- a/x/y | |
187 | +++ /dev/null |
|
191 | +++ /dev/null | |
188 | @@ -1,1 +0,0 @@ |
|
192 | @@ -1,1 +0,0 @@ | |
189 | -y1 |
|
193 | -y1 | |
190 |
|
194 | |||
191 | - root to parent: --rev 0 --rev . |
|
195 | - root to parent: --rev 0 --rev . | |
192 | M a |
|
196 | M a | |
193 |
|
197 | |||
194 | diff --git a/a b/a |
|
198 | diff --git a/a b/a | |
195 | --- a/a |
|
199 | --- a/a | |
196 | +++ b/a |
|
200 | +++ b/a | |
197 | @@ -1,1 +1,4 @@ |
|
201 | @@ -1,1 +1,4 @@ | |
198 | a |
|
202 | a | |
199 | +1 |
|
203 | +1 | |
200 | +a1 |
|
204 | +a1 | |
201 | +a2 |
|
205 | +a2 | |
202 |
|
206 | |||
203 | - parent to root: --rev . --rev 0 |
|
207 | - parent to root: --rev . --rev 0 | |
204 | M a |
|
208 | M a | |
205 |
|
209 | |||
206 | diff --git a/a b/a |
|
210 | diff --git a/a b/a | |
207 | --- a/a |
|
211 | --- a/a | |
208 | +++ b/a |
|
212 | +++ b/a | |
209 | @@ -1,4 +1,1 @@ |
|
213 | @@ -1,4 +1,1 @@ | |
210 | a |
|
214 | a | |
211 | -1 |
|
215 | -1 | |
212 | -a1 |
|
216 | -a1 | |
213 | -a2 |
|
217 | -a2 | |
214 |
|
218 | |||
215 | - branch to parent: --rev 2 --rev . |
|
219 | - branch to parent: --rev 2 --rev . | |
216 | M a |
|
220 | M a | |
217 | R x/y |
|
221 | R x/y | |
218 |
|
222 | |||
219 | diff --git a/a b/a |
|
223 | diff --git a/a b/a | |
220 | --- a/a |
|
224 | --- a/a | |
221 | +++ b/a |
|
225 | +++ b/a | |
222 | @@ -1,3 +1,4 @@ |
|
226 | @@ -1,3 +1,4 @@ | |
223 | a |
|
227 | a | |
224 | -m1 |
|
228 | -m1 | |
225 | -m2 |
|
229 | -m2 | |
226 | +1 |
|
230 | +1 | |
227 | +a1 |
|
231 | +a1 | |
228 | +a2 |
|
232 | +a2 | |
229 | diff --git a/x/y b/x/y |
|
233 | diff --git a/x/y b/x/y | |
230 | deleted file mode 100644 |
|
234 | deleted file mode 100644 | |
231 | --- a/x/y |
|
235 | --- a/x/y | |
232 | +++ /dev/null |
|
236 | +++ /dev/null | |
233 | @@ -1,1 +0,0 @@ |
|
237 | @@ -1,1 +0,0 @@ | |
234 | -y1 |
|
238 | -y1 | |
235 |
|
239 | |||
236 | - parent to branch: --rev . --rev 2 |
|
240 | - parent to branch: --rev . --rev 2 | |
237 | M a |
|
241 | M a | |
238 | A x/y |
|
242 | A x/y | |
239 |
|
243 | |||
240 | diff --git a/a b/a |
|
244 | diff --git a/a b/a | |
241 | --- a/a |
|
245 | --- a/a | |
242 | +++ b/a |
|
246 | +++ b/a | |
243 | @@ -1,4 +1,3 @@ |
|
247 | @@ -1,4 +1,3 @@ | |
244 | a |
|
248 | a | |
245 | -1 |
|
249 | -1 | |
246 | -a1 |
|
250 | -a1 | |
247 | -a2 |
|
251 | -a2 | |
248 | +m1 |
|
252 | +m1 | |
249 | +m2 |
|
253 | +m2 | |
250 | diff --git a/x/y b/x/y |
|
254 | diff --git a/x/y b/x/y | |
251 | new file mode 100644 |
|
255 | new file mode 100644 | |
252 | --- /dev/null |
|
256 | --- /dev/null | |
253 | +++ b/x/y |
|
257 | +++ b/x/y | |
254 | @@ -0,0 +1,1 @@ |
|
258 | @@ -0,0 +1,1 @@ | |
255 | +y1 |
|
259 | +y1 | |
256 |
|
260 | |||
257 |
|
261 | |||
|
262 | updating working directory | |||
|
263 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
258 | created new head |
|
264 | created new head | |
259 | ** single rename ** |
|
265 | ** single rename ** | |
260 | ** hg mv a b / add b b1 / add b w |
|
266 | ** hg mv a b / add b b1 / add b w | |
261 | - working to parent: |
|
267 | - working to parent: | |
262 | M b |
|
268 | M b | |
263 |
|
269 | |||
264 | diff --git a/b b/b |
|
270 | diff --git a/b b/b | |
265 | --- a/b |
|
271 | --- a/b | |
266 | +++ b/b |
|
272 | +++ b/b | |
267 | @@ -1,3 +1,4 @@ |
|
273 | @@ -1,3 +1,4 @@ | |
268 | a |
|
274 | a | |
269 | 2 |
|
275 | 2 | |
270 | b1 |
|
276 | b1 | |
271 | +w |
|
277 | +w | |
272 |
|
278 | |||
273 | - working to root: --rev 0 |
|
279 | - working to root: --rev 0 | |
274 | A b |
|
280 | A b | |
275 | a |
|
281 | a | |
276 | R a |
|
282 | R a | |
277 |
|
283 | |||
278 | diff --git a/a b/b |
|
284 | diff --git a/a b/b | |
279 | rename from a |
|
285 | rename from a | |
280 | rename to b |
|
286 | rename to b | |
281 | --- a/a |
|
287 | --- a/a | |
282 | +++ b/b |
|
288 | +++ b/b | |
283 | @@ -1,1 +1,4 @@ |
|
289 | @@ -1,1 +1,4 @@ | |
284 | a |
|
290 | a | |
285 | +2 |
|
291 | +2 | |
286 | +b1 |
|
292 | +b1 | |
287 | +w |
|
293 | +w | |
288 |
|
294 | |||
289 | - working to branch: --rev 2 |
|
295 | - working to branch: --rev 2 | |
290 | A b |
|
296 | A b | |
291 | a |
|
297 | a | |
292 | R a |
|
298 | R a | |
293 | R x/y |
|
299 | R x/y | |
294 |
|
300 | |||
295 | diff --git a/a b/b |
|
301 | diff --git a/a b/b | |
296 | rename from a |
|
302 | rename from a | |
297 | rename to b |
|
303 | rename to b | |
298 | --- a/a |
|
304 | --- a/a | |
299 | +++ b/b |
|
305 | +++ b/b | |
300 | @@ -1,3 +1,4 @@ |
|
306 | @@ -1,3 +1,4 @@ | |
301 | a |
|
307 | a | |
302 | -m1 |
|
308 | -m1 | |
303 | -m2 |
|
309 | -m2 | |
304 | +2 |
|
310 | +2 | |
305 | +b1 |
|
311 | +b1 | |
306 | +w |
|
312 | +w | |
307 | diff --git a/x/y b/x/y |
|
313 | diff --git a/x/y b/x/y | |
308 | deleted file mode 100644 |
|
314 | deleted file mode 100644 | |
309 | --- a/x/y |
|
315 | --- a/x/y | |
310 | +++ /dev/null |
|
316 | +++ /dev/null | |
311 | @@ -1,1 +0,0 @@ |
|
317 | @@ -1,1 +0,0 @@ | |
312 | -y1 |
|
318 | -y1 | |
313 |
|
319 | |||
314 | - root to parent: --rev 0 --rev . |
|
320 | - root to parent: --rev 0 --rev . | |
315 | A b |
|
321 | A b | |
316 | a |
|
322 | a | |
317 | R a |
|
323 | R a | |
318 |
|
324 | |||
319 | diff --git a/a b/b |
|
325 | diff --git a/a b/b | |
320 | rename from a |
|
326 | rename from a | |
321 | rename to b |
|
327 | rename to b | |
322 | --- a/a |
|
328 | --- a/a | |
323 | +++ b/b |
|
329 | +++ b/b | |
324 | @@ -1,1 +1,3 @@ |
|
330 | @@ -1,1 +1,3 @@ | |
325 | a |
|
331 | a | |
326 | +2 |
|
332 | +2 | |
327 | +b1 |
|
333 | +b1 | |
328 |
|
334 | |||
329 | - parent to root: --rev . --rev 0 |
|
335 | - parent to root: --rev . --rev 0 | |
330 | A a |
|
336 | A a | |
331 | b |
|
337 | b | |
332 | R b |
|
338 | R b | |
333 |
|
339 | |||
334 | diff --git a/b b/a |
|
340 | diff --git a/b b/a | |
335 | rename from b |
|
341 | rename from b | |
336 | rename to a |
|
342 | rename to a | |
337 | --- a/b |
|
343 | --- a/b | |
338 | +++ b/a |
|
344 | +++ b/a | |
339 | @@ -1,3 +1,1 @@ |
|
345 | @@ -1,3 +1,1 @@ | |
340 | a |
|
346 | a | |
341 | -2 |
|
347 | -2 | |
342 | -b1 |
|
348 | -b1 | |
343 |
|
349 | |||
344 | - branch to parent: --rev 2 --rev . |
|
350 | - branch to parent: --rev 2 --rev . | |
345 | A b |
|
351 | A b | |
346 | a |
|
352 | a | |
347 | R a |
|
353 | R a | |
348 | R x/y |
|
354 | R x/y | |
349 |
|
355 | |||
350 | diff --git a/a b/b |
|
356 | diff --git a/a b/b | |
351 | rename from a |
|
357 | rename from a | |
352 | rename to b |
|
358 | rename to b | |
353 | --- a/a |
|
359 | --- a/a | |
354 | +++ b/b |
|
360 | +++ b/b | |
355 | @@ -1,3 +1,3 @@ |
|
361 | @@ -1,3 +1,3 @@ | |
356 | a |
|
362 | a | |
357 | -m1 |
|
363 | -m1 | |
358 | -m2 |
|
364 | -m2 | |
359 | +2 |
|
365 | +2 | |
360 | +b1 |
|
366 | +b1 | |
361 | diff --git a/x/y b/x/y |
|
367 | diff --git a/x/y b/x/y | |
362 | deleted file mode 100644 |
|
368 | deleted file mode 100644 | |
363 | --- a/x/y |
|
369 | --- a/x/y | |
364 | +++ /dev/null |
|
370 | +++ /dev/null | |
365 | @@ -1,1 +0,0 @@ |
|
371 | @@ -1,1 +0,0 @@ | |
366 | -y1 |
|
372 | -y1 | |
367 |
|
373 | |||
368 | - parent to branch: --rev . --rev 2 |
|
374 | - parent to branch: --rev . --rev 2 | |
369 | A a |
|
375 | A a | |
370 | b |
|
376 | b | |
371 | A x/y |
|
377 | A x/y | |
372 | R b |
|
378 | R b | |
373 |
|
379 | |||
374 | diff --git a/b b/a |
|
380 | diff --git a/b b/a | |
375 | rename from b |
|
381 | rename from b | |
376 | rename to a |
|
382 | rename to a | |
377 | --- a/b |
|
383 | --- a/b | |
378 | +++ b/a |
|
384 | +++ b/a | |
379 | @@ -1,3 +1,3 @@ |
|
385 | @@ -1,3 +1,3 @@ | |
380 | a |
|
386 | a | |
381 | -2 |
|
387 | -2 | |
382 | -b1 |
|
388 | -b1 | |
383 | +m1 |
|
389 | +m1 | |
384 | +m2 |
|
390 | +m2 | |
385 | diff --git a/x/y b/x/y |
|
391 | diff --git a/x/y b/x/y | |
386 | new file mode 100644 |
|
392 | new file mode 100644 | |
387 | --- /dev/null |
|
393 | --- /dev/null | |
388 | +++ b/x/y |
|
394 | +++ b/x/y | |
389 | @@ -0,0 +1,1 @@ |
|
395 | @@ -0,0 +1,1 @@ | |
390 | +y1 |
|
396 | +y1 | |
391 |
|
397 | |||
392 |
|
398 | |||
|
399 | updating working directory | |||
|
400 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
393 | created new head |
|
401 | created new head | |
394 | ** single copy ** |
|
402 | ** single copy ** | |
395 | ** hg cp a b / add b b1 / add a w |
|
403 | ** hg cp a b / add b b1 / add a w | |
396 | - working to parent: |
|
404 | - working to parent: | |
397 | M a |
|
405 | M a | |
398 |
|
406 | |||
399 | diff --git a/a b/a |
|
407 | diff --git a/a b/a | |
400 | --- a/a |
|
408 | --- a/a | |
401 | +++ b/a |
|
409 | +++ b/a | |
402 | @@ -1,2 +1,3 @@ |
|
410 | @@ -1,2 +1,3 @@ | |
403 | a |
|
411 | a | |
404 | 3 |
|
412 | 3 | |
405 | +w |
|
413 | +w | |
406 |
|
414 | |||
407 | - working to root: --rev 0 |
|
415 | - working to root: --rev 0 | |
408 | M a |
|
416 | M a | |
409 | A b |
|
417 | A b | |
410 | a |
|
418 | a | |
411 |
|
419 | |||
412 | diff --git a/a b/a |
|
420 | diff --git a/a b/a | |
413 | --- a/a |
|
421 | --- a/a | |
414 | +++ b/a |
|
422 | +++ b/a | |
415 | @@ -1,1 +1,3 @@ |
|
423 | @@ -1,1 +1,3 @@ | |
416 | a |
|
424 | a | |
417 | +3 |
|
425 | +3 | |
418 | +w |
|
426 | +w | |
419 | diff --git a/a b/b |
|
427 | diff --git a/a b/b | |
420 | copy from a |
|
428 | copy from a | |
421 | copy to b |
|
429 | copy to b | |
422 | --- a/a |
|
430 | --- a/a | |
423 | +++ b/b |
|
431 | +++ b/b | |
424 | @@ -1,1 +1,3 @@ |
|
432 | @@ -1,1 +1,3 @@ | |
425 | a |
|
433 | a | |
426 | +3 |
|
434 | +3 | |
427 | +b1 |
|
435 | +b1 | |
428 |
|
436 | |||
429 | - working to branch: --rev 2 |
|
437 | - working to branch: --rev 2 | |
430 | M a |
|
438 | M a | |
431 | A b |
|
439 | A b | |
432 | a |
|
440 | a | |
433 | R x/y |
|
441 | R x/y | |
434 |
|
442 | |||
435 | diff --git a/a b/a |
|
443 | diff --git a/a b/a | |
436 | --- a/a |
|
444 | --- a/a | |
437 | +++ b/a |
|
445 | +++ b/a | |
438 | @@ -1,3 +1,3 @@ |
|
446 | @@ -1,3 +1,3 @@ | |
439 | a |
|
447 | a | |
440 | -m1 |
|
448 | -m1 | |
441 | -m2 |
|
449 | -m2 | |
442 | +3 |
|
450 | +3 | |
443 | +w |
|
451 | +w | |
444 | diff --git a/a b/b |
|
452 | diff --git a/a b/b | |
445 | copy from a |
|
453 | copy from a | |
446 | copy to b |
|
454 | copy to b | |
447 | --- a/a |
|
455 | --- a/a | |
448 | +++ b/b |
|
456 | +++ b/b | |
449 | @@ -1,3 +1,3 @@ |
|
457 | @@ -1,3 +1,3 @@ | |
450 | a |
|
458 | a | |
451 | -m1 |
|
459 | -m1 | |
452 | -m2 |
|
460 | -m2 | |
453 | +3 |
|
461 | +3 | |
454 | +b1 |
|
462 | +b1 | |
455 | diff --git a/x/y b/x/y |
|
463 | diff --git a/x/y b/x/y | |
456 | deleted file mode 100644 |
|
464 | deleted file mode 100644 | |
457 | --- a/x/y |
|
465 | --- a/x/y | |
458 | +++ /dev/null |
|
466 | +++ /dev/null | |
459 | @@ -1,1 +0,0 @@ |
|
467 | @@ -1,1 +0,0 @@ | |
460 | -y1 |
|
468 | -y1 | |
461 |
|
469 | |||
462 | - root to parent: --rev 0 --rev . |
|
470 | - root to parent: --rev 0 --rev . | |
463 | M a |
|
471 | M a | |
464 | A b |
|
472 | A b | |
465 | a |
|
473 | a | |
466 |
|
474 | |||
467 | diff --git a/a b/a |
|
475 | diff --git a/a b/a | |
468 | --- a/a |
|
476 | --- a/a | |
469 | +++ b/a |
|
477 | +++ b/a | |
470 | @@ -1,1 +1,2 @@ |
|
478 | @@ -1,1 +1,2 @@ | |
471 | a |
|
479 | a | |
472 | +3 |
|
480 | +3 | |
473 | diff --git a/a b/b |
|
481 | diff --git a/a b/b | |
474 | copy from a |
|
482 | copy from a | |
475 | copy to b |
|
483 | copy to b | |
476 | --- a/a |
|
484 | --- a/a | |
477 | +++ b/b |
|
485 | +++ b/b | |
478 | @@ -1,1 +1,3 @@ |
|
486 | @@ -1,1 +1,3 @@ | |
479 | a |
|
487 | a | |
480 | +3 |
|
488 | +3 | |
481 | +b1 |
|
489 | +b1 | |
482 |
|
490 | |||
483 | - parent to root: --rev . --rev 0 |
|
491 | - parent to root: --rev . --rev 0 | |
484 | M a |
|
492 | M a | |
485 | R b |
|
493 | R b | |
486 |
|
494 | |||
487 | diff --git a/a b/a |
|
495 | diff --git a/a b/a | |
488 | --- a/a |
|
496 | --- a/a | |
489 | +++ b/a |
|
497 | +++ b/a | |
490 | @@ -1,2 +1,1 @@ |
|
498 | @@ -1,2 +1,1 @@ | |
491 | a |
|
499 | a | |
492 | -3 |
|
500 | -3 | |
493 | diff --git a/b b/b |
|
501 | diff --git a/b b/b | |
494 | deleted file mode 100644 |
|
502 | deleted file mode 100644 | |
495 | --- a/b |
|
503 | --- a/b | |
496 | +++ /dev/null |
|
504 | +++ /dev/null | |
497 | @@ -1,3 +0,0 @@ |
|
505 | @@ -1,3 +0,0 @@ | |
498 | -a |
|
506 | -a | |
499 | -3 |
|
507 | -3 | |
500 | -b1 |
|
508 | -b1 | |
501 |
|
509 | |||
502 | - branch to parent: --rev 2 --rev . |
|
510 | - branch to parent: --rev 2 --rev . | |
503 | M a |
|
511 | M a | |
504 | A b |
|
512 | A b | |
505 | a |
|
513 | a | |
506 | R x/y |
|
514 | R x/y | |
507 |
|
515 | |||
508 | diff --git a/a b/a |
|
516 | diff --git a/a b/a | |
509 | --- a/a |
|
517 | --- a/a | |
510 | +++ b/a |
|
518 | +++ b/a | |
511 | @@ -1,3 +1,2 @@ |
|
519 | @@ -1,3 +1,2 @@ | |
512 | a |
|
520 | a | |
513 | -m1 |
|
521 | -m1 | |
514 | -m2 |
|
522 | -m2 | |
515 | +3 |
|
523 | +3 | |
516 | diff --git a/a b/b |
|
524 | diff --git a/a b/b | |
517 | copy from a |
|
525 | copy from a | |
518 | copy to b |
|
526 | copy to b | |
519 | --- a/a |
|
527 | --- a/a | |
520 | +++ b/b |
|
528 | +++ b/b | |
521 | @@ -1,3 +1,3 @@ |
|
529 | @@ -1,3 +1,3 @@ | |
522 | a |
|
530 | a | |
523 | -m1 |
|
531 | -m1 | |
524 | -m2 |
|
532 | -m2 | |
525 | +3 |
|
533 | +3 | |
526 | +b1 |
|
534 | +b1 | |
527 | diff --git a/x/y b/x/y |
|
535 | diff --git a/x/y b/x/y | |
528 | deleted file mode 100644 |
|
536 | deleted file mode 100644 | |
529 | --- a/x/y |
|
537 | --- a/x/y | |
530 | +++ /dev/null |
|
538 | +++ /dev/null | |
531 | @@ -1,1 +0,0 @@ |
|
539 | @@ -1,1 +0,0 @@ | |
532 | -y1 |
|
540 | -y1 | |
533 |
|
541 | |||
534 | - parent to branch: --rev . --rev 2 |
|
542 | - parent to branch: --rev . --rev 2 | |
535 | M a |
|
543 | M a | |
536 | A x/y |
|
544 | A x/y | |
537 | R b |
|
545 | R b | |
538 |
|
546 | |||
539 | diff --git a/a b/a |
|
547 | diff --git a/a b/a | |
540 | --- a/a |
|
548 | --- a/a | |
541 | +++ b/a |
|
549 | +++ b/a | |
542 | @@ -1,2 +1,3 @@ |
|
550 | @@ -1,2 +1,3 @@ | |
543 | a |
|
551 | a | |
544 | -3 |
|
552 | -3 | |
545 | +m1 |
|
553 | +m1 | |
546 | +m2 |
|
554 | +m2 | |
547 | diff --git a/b b/b |
|
555 | diff --git a/b b/b | |
548 | deleted file mode 100644 |
|
556 | deleted file mode 100644 | |
549 | --- a/b |
|
557 | --- a/b | |
550 | +++ /dev/null |
|
558 | +++ /dev/null | |
551 | @@ -1,3 +0,0 @@ |
|
559 | @@ -1,3 +0,0 @@ | |
552 | -a |
|
560 | -a | |
553 | -3 |
|
561 | -3 | |
554 | -b1 |
|
562 | -b1 | |
555 | diff --git a/x/y b/x/y |
|
563 | diff --git a/x/y b/x/y | |
556 | new file mode 100644 |
|
564 | new file mode 100644 | |
557 | --- /dev/null |
|
565 | --- /dev/null | |
558 | +++ b/x/y |
|
566 | +++ b/x/y | |
559 | @@ -0,0 +1,1 @@ |
|
567 | @@ -0,0 +1,1 @@ | |
560 | +y1 |
|
568 | +y1 | |
561 |
|
569 | |||
562 |
|
570 | |||
|
571 | updating working directory | |||
|
572 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
563 | created new head |
|
573 | created new head | |
564 | ** rename chain ** |
|
574 | ** rename chain ** | |
565 | ** hg mv a b / hg mv b c / hg mv c d |
|
575 | ** hg mv a b / hg mv b c / hg mv c d | |
566 | - working to parent: |
|
576 | - working to parent: | |
567 | A d |
|
577 | A d | |
568 | c |
|
578 | c | |
569 | R c |
|
579 | R c | |
570 |
|
580 | |||
571 | diff --git a/c b/d |
|
581 | diff --git a/c b/d | |
572 | rename from c |
|
582 | rename from c | |
573 | rename to d |
|
583 | rename to d | |
574 |
|
584 | |||
575 | - working to root: --rev 0 |
|
585 | - working to root: --rev 0 | |
576 | A d |
|
586 | A d | |
577 | a |
|
587 | a | |
578 | R a |
|
588 | R a | |
579 |
|
589 | |||
580 | diff --git a/a b/d |
|
590 | diff --git a/a b/d | |
581 | rename from a |
|
591 | rename from a | |
582 | rename to d |
|
592 | rename to d | |
583 | --- a/a |
|
593 | --- a/a | |
584 | +++ b/d |
|
594 | +++ b/d | |
585 | @@ -1,1 +1,2 @@ |
|
595 | @@ -1,1 +1,2 @@ | |
586 | a |
|
596 | a | |
587 | +4 |
|
597 | +4 | |
588 |
|
598 | |||
589 | - working to branch: --rev 2 |
|
599 | - working to branch: --rev 2 | |
590 | A d |
|
600 | A d | |
591 | a |
|
601 | a | |
592 | R a |
|
602 | R a | |
593 | R x/y |
|
603 | R x/y | |
594 |
|
604 | |||
595 | diff --git a/a b/d |
|
605 | diff --git a/a b/d | |
596 | rename from a |
|
606 | rename from a | |
597 | rename to d |
|
607 | rename to d | |
598 | --- a/a |
|
608 | --- a/a | |
599 | +++ b/d |
|
609 | +++ b/d | |
600 | @@ -1,3 +1,2 @@ |
|
610 | @@ -1,3 +1,2 @@ | |
601 | a |
|
611 | a | |
602 | -m1 |
|
612 | -m1 | |
603 | -m2 |
|
613 | -m2 | |
604 | +4 |
|
614 | +4 | |
605 | diff --git a/x/y b/x/y |
|
615 | diff --git a/x/y b/x/y | |
606 | deleted file mode 100644 |
|
616 | deleted file mode 100644 | |
607 | --- a/x/y |
|
617 | --- a/x/y | |
608 | +++ /dev/null |
|
618 | +++ /dev/null | |
609 | @@ -1,1 +0,0 @@ |
|
619 | @@ -1,1 +0,0 @@ | |
610 | -y1 |
|
620 | -y1 | |
611 |
|
621 | |||
612 | - root to parent: --rev 0 --rev . |
|
622 | - root to parent: --rev 0 --rev . | |
613 | A c |
|
623 | A c | |
614 | a |
|
624 | a | |
615 | R a |
|
625 | R a | |
616 |
|
626 | |||
617 | diff --git a/a b/c |
|
627 | diff --git a/a b/c | |
618 | rename from a |
|
628 | rename from a | |
619 | rename to c |
|
629 | rename to c | |
620 | --- a/a |
|
630 | --- a/a | |
621 | +++ b/c |
|
631 | +++ b/c | |
622 | @@ -1,1 +1,2 @@ |
|
632 | @@ -1,1 +1,2 @@ | |
623 | a |
|
633 | a | |
624 | +4 |
|
634 | +4 | |
625 |
|
635 | |||
626 | - parent to root: --rev . --rev 0 |
|
636 | - parent to root: --rev . --rev 0 | |
627 | A a |
|
637 | A a | |
628 | c |
|
638 | c | |
629 | R c |
|
639 | R c | |
630 |
|
640 | |||
631 | diff --git a/c b/a |
|
641 | diff --git a/c b/a | |
632 | rename from c |
|
642 | rename from c | |
633 | rename to a |
|
643 | rename to a | |
634 | --- a/c |
|
644 | --- a/c | |
635 | +++ b/a |
|
645 | +++ b/a | |
636 | @@ -1,2 +1,1 @@ |
|
646 | @@ -1,2 +1,1 @@ | |
637 | a |
|
647 | a | |
638 | -4 |
|
648 | -4 | |
639 |
|
649 | |||
640 | - branch to parent: --rev 2 --rev . |
|
650 | - branch to parent: --rev 2 --rev . | |
641 | A c |
|
651 | A c | |
642 | a |
|
652 | a | |
643 | R a |
|
653 | R a | |
644 | R x/y |
|
654 | R x/y | |
645 |
|
655 | |||
646 | diff --git a/a b/c |
|
656 | diff --git a/a b/c | |
647 | rename from a |
|
657 | rename from a | |
648 | rename to c |
|
658 | rename to c | |
649 | --- a/a |
|
659 | --- a/a | |
650 | +++ b/c |
|
660 | +++ b/c | |
651 | @@ -1,3 +1,2 @@ |
|
661 | @@ -1,3 +1,2 @@ | |
652 | a |
|
662 | a | |
653 | -m1 |
|
663 | -m1 | |
654 | -m2 |
|
664 | -m2 | |
655 | +4 |
|
665 | +4 | |
656 | diff --git a/x/y b/x/y |
|
666 | diff --git a/x/y b/x/y | |
657 | deleted file mode 100644 |
|
667 | deleted file mode 100644 | |
658 | --- a/x/y |
|
668 | --- a/x/y | |
659 | +++ /dev/null |
|
669 | +++ /dev/null | |
660 | @@ -1,1 +0,0 @@ |
|
670 | @@ -1,1 +0,0 @@ | |
661 | -y1 |
|
671 | -y1 | |
662 |
|
672 | |||
663 | - parent to branch: --rev . --rev 2 |
|
673 | - parent to branch: --rev . --rev 2 | |
664 | A a |
|
674 | A a | |
665 | c |
|
675 | c | |
666 | A x/y |
|
676 | A x/y | |
667 | R c |
|
677 | R c | |
668 |
|
678 | |||
669 | diff --git a/c b/a |
|
679 | diff --git a/c b/a | |
670 | rename from c |
|
680 | rename from c | |
671 | rename to a |
|
681 | rename to a | |
672 | --- a/c |
|
682 | --- a/c | |
673 | +++ b/a |
|
683 | +++ b/a | |
674 | @@ -1,2 +1,3 @@ |
|
684 | @@ -1,2 +1,3 @@ | |
675 | a |
|
685 | a | |
676 | -4 |
|
686 | -4 | |
677 | +m1 |
|
687 | +m1 | |
678 | +m2 |
|
688 | +m2 | |
679 | diff --git a/x/y b/x/y |
|
689 | diff --git a/x/y b/x/y | |
680 | new file mode 100644 |
|
690 | new file mode 100644 | |
681 | --- /dev/null |
|
691 | --- /dev/null | |
682 | +++ b/x/y |
|
692 | +++ b/x/y | |
683 | @@ -0,0 +1,1 @@ |
|
693 | @@ -0,0 +1,1 @@ | |
684 | +y1 |
|
694 | +y1 | |
685 |
|
695 | |||
686 |
|
696 | |||
|
697 | updating working directory | |||
|
698 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
687 | created new head |
|
699 | created new head | |
688 | ** copy chain ** |
|
700 | ** copy chain ** | |
689 | ** hg cp a b / hg cp b c / hg cp c d |
|
701 | ** hg cp a b / hg cp b c / hg cp c d | |
690 | - working to parent: |
|
702 | - working to parent: | |
691 | A d |
|
703 | A d | |
692 | c |
|
704 | c | |
693 |
|
705 | |||
694 | diff --git a/c b/d |
|
706 | diff --git a/c b/d | |
695 | copy from c |
|
707 | copy from c | |
696 | copy to d |
|
708 | copy to d | |
697 |
|
709 | |||
698 | - working to root: --rev 0 |
|
710 | - working to root: --rev 0 | |
699 | M a |
|
711 | M a | |
700 | A b |
|
712 | A b | |
701 | a |
|
713 | a | |
702 | A c |
|
714 | A c | |
703 | a |
|
715 | a | |
704 | A d |
|
716 | A d | |
705 | a |
|
717 | a | |
706 |
|
718 | |||
707 | diff --git a/a b/a |
|
719 | diff --git a/a b/a | |
708 | --- a/a |
|
720 | --- a/a | |
709 | +++ b/a |
|
721 | +++ b/a | |
710 | @@ -1,1 +1,2 @@ |
|
722 | @@ -1,1 +1,2 @@ | |
711 | a |
|
723 | a | |
712 | +5 |
|
724 | +5 | |
713 | diff --git a/a b/b |
|
725 | diff --git a/a b/b | |
714 | copy from a |
|
726 | copy from a | |
715 | copy to b |
|
727 | copy to b | |
716 | --- a/a |
|
728 | --- a/a | |
717 | +++ b/b |
|
729 | +++ b/b | |
718 | @@ -1,1 +1,2 @@ |
|
730 | @@ -1,1 +1,2 @@ | |
719 | a |
|
731 | a | |
720 | +5 |
|
732 | +5 | |
721 | diff --git a/a b/c |
|
733 | diff --git a/a b/c | |
722 | copy from a |
|
734 | copy from a | |
723 | copy to c |
|
735 | copy to c | |
724 | --- a/a |
|
736 | --- a/a | |
725 | +++ b/c |
|
737 | +++ b/c | |
726 | @@ -1,1 +1,2 @@ |
|
738 | @@ -1,1 +1,2 @@ | |
727 | a |
|
739 | a | |
728 | +5 |
|
740 | +5 | |
729 | diff --git a/a b/d |
|
741 | diff --git a/a b/d | |
730 | copy from a |
|
742 | copy from a | |
731 | copy to d |
|
743 | copy to d | |
732 | --- a/a |
|
744 | --- a/a | |
733 | +++ b/d |
|
745 | +++ b/d | |
734 | @@ -1,1 +1,2 @@ |
|
746 | @@ -1,1 +1,2 @@ | |
735 | a |
|
747 | a | |
736 | +5 |
|
748 | +5 | |
737 |
|
749 | |||
738 | - working to branch: --rev 2 |
|
750 | - working to branch: --rev 2 | |
739 | M a |
|
751 | M a | |
740 | A b |
|
752 | A b | |
741 | a |
|
753 | a | |
742 | A c |
|
754 | A c | |
743 | a |
|
755 | a | |
744 | A d |
|
756 | A d | |
745 | a |
|
757 | a | |
746 | R x/y |
|
758 | R x/y | |
747 |
|
759 | |||
748 | diff --git a/a b/a |
|
760 | diff --git a/a b/a | |
749 | --- a/a |
|
761 | --- a/a | |
750 | +++ b/a |
|
762 | +++ b/a | |
751 | @@ -1,3 +1,2 @@ |
|
763 | @@ -1,3 +1,2 @@ | |
752 | a |
|
764 | a | |
753 | -m1 |
|
765 | -m1 | |
754 | -m2 |
|
766 | -m2 | |
755 | +5 |
|
767 | +5 | |
756 | diff --git a/a b/b |
|
768 | diff --git a/a b/b | |
757 | copy from a |
|
769 | copy from a | |
758 | copy to b |
|
770 | copy to b | |
759 | --- a/a |
|
771 | --- a/a | |
760 | +++ b/b |
|
772 | +++ b/b | |
761 | @@ -1,3 +1,2 @@ |
|
773 | @@ -1,3 +1,2 @@ | |
762 | a |
|
774 | a | |
763 | -m1 |
|
775 | -m1 | |
764 | -m2 |
|
776 | -m2 | |
765 | +5 |
|
777 | +5 | |
766 | diff --git a/a b/c |
|
778 | diff --git a/a b/c | |
767 | copy from a |
|
779 | copy from a | |
768 | copy to c |
|
780 | copy to c | |
769 | --- a/a |
|
781 | --- a/a | |
770 | +++ b/c |
|
782 | +++ b/c | |
771 | @@ -1,3 +1,2 @@ |
|
783 | @@ -1,3 +1,2 @@ | |
772 | a |
|
784 | a | |
773 | -m1 |
|
785 | -m1 | |
774 | -m2 |
|
786 | -m2 | |
775 | +5 |
|
787 | +5 | |
776 | diff --git a/a b/d |
|
788 | diff --git a/a b/d | |
777 | copy from a |
|
789 | copy from a | |
778 | copy to d |
|
790 | copy to d | |
779 | --- a/a |
|
791 | --- a/a | |
780 | +++ b/d |
|
792 | +++ b/d | |
781 | @@ -1,3 +1,2 @@ |
|
793 | @@ -1,3 +1,2 @@ | |
782 | a |
|
794 | a | |
783 | -m1 |
|
795 | -m1 | |
784 | -m2 |
|
796 | -m2 | |
785 | +5 |
|
797 | +5 | |
786 | diff --git a/x/y b/x/y |
|
798 | diff --git a/x/y b/x/y | |
787 | deleted file mode 100644 |
|
799 | deleted file mode 100644 | |
788 | --- a/x/y |
|
800 | --- a/x/y | |
789 | +++ /dev/null |
|
801 | +++ /dev/null | |
790 | @@ -1,1 +0,0 @@ |
|
802 | @@ -1,1 +0,0 @@ | |
791 | -y1 |
|
803 | -y1 | |
792 |
|
804 | |||
793 | - root to parent: --rev 0 --rev . |
|
805 | - root to parent: --rev 0 --rev . | |
794 | M a |
|
806 | M a | |
795 | A b |
|
807 | A b | |
796 | a |
|
808 | a | |
797 | A c |
|
809 | A c | |
798 | a |
|
810 | a | |
799 |
|
811 | |||
800 | diff --git a/a b/a |
|
812 | diff --git a/a b/a | |
801 | --- a/a |
|
813 | --- a/a | |
802 | +++ b/a |
|
814 | +++ b/a | |
803 | @@ -1,1 +1,2 @@ |
|
815 | @@ -1,1 +1,2 @@ | |
804 | a |
|
816 | a | |
805 | +5 |
|
817 | +5 | |
806 | diff --git a/a b/b |
|
818 | diff --git a/a b/b | |
807 | copy from a |
|
819 | copy from a | |
808 | copy to b |
|
820 | copy to b | |
809 | --- a/a |
|
821 | --- a/a | |
810 | +++ b/b |
|
822 | +++ b/b | |
811 | @@ -1,1 +1,2 @@ |
|
823 | @@ -1,1 +1,2 @@ | |
812 | a |
|
824 | a | |
813 | +5 |
|
825 | +5 | |
814 | diff --git a/a b/c |
|
826 | diff --git a/a b/c | |
815 | copy from a |
|
827 | copy from a | |
816 | copy to c |
|
828 | copy to c | |
817 | --- a/a |
|
829 | --- a/a | |
818 | +++ b/c |
|
830 | +++ b/c | |
819 | @@ -1,1 +1,2 @@ |
|
831 | @@ -1,1 +1,2 @@ | |
820 | a |
|
832 | a | |
821 | +5 |
|
833 | +5 | |
822 |
|
834 | |||
823 | - parent to root: --rev . --rev 0 |
|
835 | - parent to root: --rev . --rev 0 | |
824 | M a |
|
836 | M a | |
825 | R b |
|
837 | R b | |
826 | R c |
|
838 | R c | |
827 |
|
839 | |||
828 | diff --git a/a b/a |
|
840 | diff --git a/a b/a | |
829 | --- a/a |
|
841 | --- a/a | |
830 | +++ b/a |
|
842 | +++ b/a | |
831 | @@ -1,2 +1,1 @@ |
|
843 | @@ -1,2 +1,1 @@ | |
832 | a |
|
844 | a | |
833 | -5 |
|
845 | -5 | |
834 | diff --git a/b b/b |
|
846 | diff --git a/b b/b | |
835 | deleted file mode 100644 |
|
847 | deleted file mode 100644 | |
836 | --- a/b |
|
848 | --- a/b | |
837 | +++ /dev/null |
|
849 | +++ /dev/null | |
838 | @@ -1,2 +0,0 @@ |
|
850 | @@ -1,2 +0,0 @@ | |
839 | -a |
|
851 | -a | |
840 | -5 |
|
852 | -5 | |
841 | diff --git a/c b/c |
|
853 | diff --git a/c b/c | |
842 | deleted file mode 100644 |
|
854 | deleted file mode 100644 | |
843 | --- a/c |
|
855 | --- a/c | |
844 | +++ /dev/null |
|
856 | +++ /dev/null | |
845 | @@ -1,2 +0,0 @@ |
|
857 | @@ -1,2 +0,0 @@ | |
846 | -a |
|
858 | -a | |
847 | -5 |
|
859 | -5 | |
848 |
|
860 | |||
849 | - branch to parent: --rev 2 --rev . |
|
861 | - branch to parent: --rev 2 --rev . | |
850 | M a |
|
862 | M a | |
851 | A b |
|
863 | A b | |
852 | a |
|
864 | a | |
853 | A c |
|
865 | A c | |
854 | a |
|
866 | a | |
855 | R x/y |
|
867 | R x/y | |
856 |
|
868 | |||
857 | diff --git a/a b/a |
|
869 | diff --git a/a b/a | |
858 | --- a/a |
|
870 | --- a/a | |
859 | +++ b/a |
|
871 | +++ b/a | |
860 | @@ -1,3 +1,2 @@ |
|
872 | @@ -1,3 +1,2 @@ | |
861 | a |
|
873 | a | |
862 | -m1 |
|
874 | -m1 | |
863 | -m2 |
|
875 | -m2 | |
864 | +5 |
|
876 | +5 | |
865 | diff --git a/a b/b |
|
877 | diff --git a/a b/b | |
866 | copy from a |
|
878 | copy from a | |
867 | copy to b |
|
879 | copy to b | |
868 | --- a/a |
|
880 | --- a/a | |
869 | +++ b/b |
|
881 | +++ b/b | |
870 | @@ -1,3 +1,2 @@ |
|
882 | @@ -1,3 +1,2 @@ | |
871 | a |
|
883 | a | |
872 | -m1 |
|
884 | -m1 | |
873 | -m2 |
|
885 | -m2 | |
874 | +5 |
|
886 | +5 | |
875 | diff --git a/a b/c |
|
887 | diff --git a/a b/c | |
876 | copy from a |
|
888 | copy from a | |
877 | copy to c |
|
889 | copy to c | |
878 | --- a/a |
|
890 | --- a/a | |
879 | +++ b/c |
|
891 | +++ b/c | |
880 | @@ -1,3 +1,2 @@ |
|
892 | @@ -1,3 +1,2 @@ | |
881 | a |
|
893 | a | |
882 | -m1 |
|
894 | -m1 | |
883 | -m2 |
|
895 | -m2 | |
884 | +5 |
|
896 | +5 | |
885 | diff --git a/x/y b/x/y |
|
897 | diff --git a/x/y b/x/y | |
886 | deleted file mode 100644 |
|
898 | deleted file mode 100644 | |
887 | --- a/x/y |
|
899 | --- a/x/y | |
888 | +++ /dev/null |
|
900 | +++ /dev/null | |
889 | @@ -1,1 +0,0 @@ |
|
901 | @@ -1,1 +0,0 @@ | |
890 | -y1 |
|
902 | -y1 | |
891 |
|
903 | |||
892 | - parent to branch: --rev . --rev 2 |
|
904 | - parent to branch: --rev . --rev 2 | |
893 | M a |
|
905 | M a | |
894 | A x/y |
|
906 | A x/y | |
895 | R b |
|
907 | R b | |
896 | R c |
|
908 | R c | |
897 |
|
909 | |||
898 | diff --git a/a b/a |
|
910 | diff --git a/a b/a | |
899 | --- a/a |
|
911 | --- a/a | |
900 | +++ b/a |
|
912 | +++ b/a | |
901 | @@ -1,2 +1,3 @@ |
|
913 | @@ -1,2 +1,3 @@ | |
902 | a |
|
914 | a | |
903 | -5 |
|
915 | -5 | |
904 | +m1 |
|
916 | +m1 | |
905 | +m2 |
|
917 | +m2 | |
906 | diff --git a/b b/b |
|
918 | diff --git a/b b/b | |
907 | deleted file mode 100644 |
|
919 | deleted file mode 100644 | |
908 | --- a/b |
|
920 | --- a/b | |
909 | +++ /dev/null |
|
921 | +++ /dev/null | |
910 | @@ -1,2 +0,0 @@ |
|
922 | @@ -1,2 +0,0 @@ | |
911 | -a |
|
923 | -a | |
912 | -5 |
|
924 | -5 | |
913 | diff --git a/c b/c |
|
925 | diff --git a/c b/c | |
914 | deleted file mode 100644 |
|
926 | deleted file mode 100644 | |
915 | --- a/c |
|
927 | --- a/c | |
916 | +++ /dev/null |
|
928 | +++ /dev/null | |
917 | @@ -1,2 +0,0 @@ |
|
929 | @@ -1,2 +0,0 @@ | |
918 | -a |
|
930 | -a | |
919 | -5 |
|
931 | -5 | |
920 | diff --git a/x/y b/x/y |
|
932 | diff --git a/x/y b/x/y | |
921 | new file mode 100644 |
|
933 | new file mode 100644 | |
922 | --- /dev/null |
|
934 | --- /dev/null | |
923 | +++ b/x/y |
|
935 | +++ b/x/y | |
924 | @@ -0,0 +1,1 @@ |
|
936 | @@ -0,0 +1,1 @@ | |
925 | +y1 |
|
937 | +y1 | |
926 |
|
938 | |||
927 |
|
939 | |||
|
940 | updating working directory | |||
|
941 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
928 | created new head |
|
942 | created new head | |
929 | ** circular rename ** |
|
943 | ** circular rename ** | |
930 | ** add a a1 / hg mv a b / hg mv b a |
|
944 | ** add a a1 / hg mv a b / hg mv b a | |
931 | - working to parent: |
|
945 | - working to parent: | |
932 | A a |
|
946 | A a | |
933 | b |
|
947 | b | |
934 | R b |
|
948 | R b | |
935 |
|
949 | |||
936 | diff --git a/b b/a |
|
950 | diff --git a/b b/a | |
937 | rename from b |
|
951 | rename from b | |
938 | rename to a |
|
952 | rename to a | |
939 |
|
953 | |||
940 | - working to root: --rev 0 |
|
954 | - working to root: --rev 0 | |
941 | M a |
|
955 | M a | |
942 |
|
956 | |||
943 | diff --git a/a b/a |
|
957 | diff --git a/a b/a | |
944 | --- a/a |
|
958 | --- a/a | |
945 | +++ b/a |
|
959 | +++ b/a | |
946 | @@ -1,1 +1,3 @@ |
|
960 | @@ -1,1 +1,3 @@ | |
947 | a |
|
961 | a | |
948 | +6 |
|
962 | +6 | |
949 | +a1 |
|
963 | +a1 | |
950 |
|
964 | |||
951 | - working to branch: --rev 2 |
|
965 | - working to branch: --rev 2 | |
952 | M a |
|
966 | M a | |
953 | R x/y |
|
967 | R x/y | |
954 |
|
968 | |||
955 | diff --git a/a b/a |
|
969 | diff --git a/a b/a | |
956 | --- a/a |
|
970 | --- a/a | |
957 | +++ b/a |
|
971 | +++ b/a | |
958 | @@ -1,3 +1,3 @@ |
|
972 | @@ -1,3 +1,3 @@ | |
959 | a |
|
973 | a | |
960 | -m1 |
|
974 | -m1 | |
961 | -m2 |
|
975 | -m2 | |
962 | +6 |
|
976 | +6 | |
963 | +a1 |
|
977 | +a1 | |
964 | diff --git a/x/y b/x/y |
|
978 | diff --git a/x/y b/x/y | |
965 | deleted file mode 100644 |
|
979 | deleted file mode 100644 | |
966 | --- a/x/y |
|
980 | --- a/x/y | |
967 | +++ /dev/null |
|
981 | +++ /dev/null | |
968 | @@ -1,1 +0,0 @@ |
|
982 | @@ -1,1 +0,0 @@ | |
969 | -y1 |
|
983 | -y1 | |
970 |
|
984 | |||
971 | - root to parent: --rev 0 --rev . |
|
985 | - root to parent: --rev 0 --rev . | |
972 | A b |
|
986 | A b | |
973 | a |
|
987 | a | |
974 | R a |
|
988 | R a | |
975 |
|
989 | |||
976 | diff --git a/a b/b |
|
990 | diff --git a/a b/b | |
977 | rename from a |
|
991 | rename from a | |
978 | rename to b |
|
992 | rename to b | |
979 | --- a/a |
|
993 | --- a/a | |
980 | +++ b/b |
|
994 | +++ b/b | |
981 | @@ -1,1 +1,3 @@ |
|
995 | @@ -1,1 +1,3 @@ | |
982 | a |
|
996 | a | |
983 | +6 |
|
997 | +6 | |
984 | +a1 |
|
998 | +a1 | |
985 |
|
999 | |||
986 | - parent to root: --rev . --rev 0 |
|
1000 | - parent to root: --rev . --rev 0 | |
987 | A a |
|
1001 | A a | |
988 | b |
|
1002 | b | |
989 | R b |
|
1003 | R b | |
990 |
|
1004 | |||
991 | diff --git a/b b/a |
|
1005 | diff --git a/b b/a | |
992 | rename from b |
|
1006 | rename from b | |
993 | rename to a |
|
1007 | rename to a | |
994 | --- a/b |
|
1008 | --- a/b | |
995 | +++ b/a |
|
1009 | +++ b/a | |
996 | @@ -1,3 +1,1 @@ |
|
1010 | @@ -1,3 +1,1 @@ | |
997 | a |
|
1011 | a | |
998 | -6 |
|
1012 | -6 | |
999 | -a1 |
|
1013 | -a1 | |
1000 |
|
1014 | |||
1001 | - branch to parent: --rev 2 --rev . |
|
1015 | - branch to parent: --rev 2 --rev . | |
1002 | A b |
|
1016 | A b | |
1003 | a |
|
1017 | a | |
1004 | R a |
|
1018 | R a | |
1005 | R x/y |
|
1019 | R x/y | |
1006 |
|
1020 | |||
1007 | diff --git a/a b/b |
|
1021 | diff --git a/a b/b | |
1008 | rename from a |
|
1022 | rename from a | |
1009 | rename to b |
|
1023 | rename to b | |
1010 | --- a/a |
|
1024 | --- a/a | |
1011 | +++ b/b |
|
1025 | +++ b/b | |
1012 | @@ -1,3 +1,3 @@ |
|
1026 | @@ -1,3 +1,3 @@ | |
1013 | a |
|
1027 | a | |
1014 | -m1 |
|
1028 | -m1 | |
1015 | -m2 |
|
1029 | -m2 | |
1016 | +6 |
|
1030 | +6 | |
1017 | +a1 |
|
1031 | +a1 | |
1018 | diff --git a/x/y b/x/y |
|
1032 | diff --git a/x/y b/x/y | |
1019 | deleted file mode 100644 |
|
1033 | deleted file mode 100644 | |
1020 | --- a/x/y |
|
1034 | --- a/x/y | |
1021 | +++ /dev/null |
|
1035 | +++ /dev/null | |
1022 | @@ -1,1 +0,0 @@ |
|
1036 | @@ -1,1 +0,0 @@ | |
1023 | -y1 |
|
1037 | -y1 | |
1024 |
|
1038 | |||
1025 | - parent to branch: --rev . --rev 2 |
|
1039 | - parent to branch: --rev . --rev 2 | |
1026 | A a |
|
1040 | A a | |
1027 | b |
|
1041 | b | |
1028 | A x/y |
|
1042 | A x/y | |
1029 | R b |
|
1043 | R b | |
1030 |
|
1044 | |||
1031 | diff --git a/b b/a |
|
1045 | diff --git a/b b/a | |
1032 | rename from b |
|
1046 | rename from b | |
1033 | rename to a |
|
1047 | rename to a | |
1034 | --- a/b |
|
1048 | --- a/b | |
1035 | +++ b/a |
|
1049 | +++ b/a | |
1036 | @@ -1,3 +1,3 @@ |
|
1050 | @@ -1,3 +1,3 @@ | |
1037 | a |
|
1051 | a | |
1038 | -6 |
|
1052 | -6 | |
1039 | -a1 |
|
1053 | -a1 | |
1040 | +m1 |
|
1054 | +m1 | |
1041 | +m2 |
|
1055 | +m2 | |
1042 | diff --git a/x/y b/x/y |
|
1056 | diff --git a/x/y b/x/y | |
1043 | new file mode 100644 |
|
1057 | new file mode 100644 | |
1044 | --- /dev/null |
|
1058 | --- /dev/null | |
1045 | +++ b/x/y |
|
1059 | +++ b/x/y | |
1046 | @@ -0,0 +1,1 @@ |
|
1060 | @@ -0,0 +1,1 @@ | |
1047 | +y1 |
|
1061 | +y1 | |
1048 |
|
1062 | |||
1049 |
|
1063 | |||
|
1064 | updating working directory | |||
|
1065 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
1050 | created new head |
|
1066 | created new head | |
1051 | moving x/x to y/x |
|
1067 | moving x/x to y/x | |
1052 | ** directory move ** |
|
1068 | ** directory move ** | |
1053 | ** hg mv x y / add y/x x1 / add y/x x2 |
|
1069 | ** hg mv x y / add y/x x1 / add y/x x2 | |
1054 | - working to parent: |
|
1070 | - working to parent: | |
1055 | M y/x |
|
1071 | M y/x | |
1056 |
|
1072 | |||
1057 | diff --git a/y/x b/y/x |
|
1073 | diff --git a/y/x b/y/x | |
1058 | --- a/y/x |
|
1074 | --- a/y/x | |
1059 | +++ b/y/x |
|
1075 | +++ b/y/x | |
1060 | @@ -1,2 +1,3 @@ |
|
1076 | @@ -1,2 +1,3 @@ | |
1061 | x |
|
1077 | x | |
1062 | x1 |
|
1078 | x1 | |
1063 | +x2 |
|
1079 | +x2 | |
1064 |
|
1080 | |||
1065 | - working to root: --rev 0 |
|
1081 | - working to root: --rev 0 | |
1066 | M a |
|
1082 | M a | |
1067 | A y/x |
|
1083 | A y/x | |
1068 | x/x |
|
1084 | x/x | |
1069 | R x/x |
|
1085 | R x/x | |
1070 |
|
1086 | |||
1071 | diff --git a/a b/a |
|
1087 | diff --git a/a b/a | |
1072 | --- a/a |
|
1088 | --- a/a | |
1073 | +++ b/a |
|
1089 | +++ b/a | |
1074 | @@ -1,1 +1,2 @@ |
|
1090 | @@ -1,1 +1,2 @@ | |
1075 | a |
|
1091 | a | |
1076 | +7 |
|
1092 | +7 | |
1077 | diff --git a/x/x b/y/x |
|
1093 | diff --git a/x/x b/y/x | |
1078 | rename from x/x |
|
1094 | rename from x/x | |
1079 | rename to y/x |
|
1095 | rename to y/x | |
1080 | --- a/x/x |
|
1096 | --- a/x/x | |
1081 | +++ b/y/x |
|
1097 | +++ b/y/x | |
1082 | @@ -1,1 +1,3 @@ |
|
1098 | @@ -1,1 +1,3 @@ | |
1083 | x |
|
1099 | x | |
1084 | +x1 |
|
1100 | +x1 | |
1085 | +x2 |
|
1101 | +x2 | |
1086 |
|
1102 | |||
1087 | - working to branch: --rev 2 |
|
1103 | - working to branch: --rev 2 | |
1088 | M a |
|
1104 | M a | |
1089 | A y/x |
|
1105 | A y/x | |
1090 | x/x |
|
1106 | x/x | |
1091 | R x/x |
|
1107 | R x/x | |
1092 | R x/y |
|
1108 | R x/y | |
1093 |
|
1109 | |||
1094 | diff --git a/a b/a |
|
1110 | diff --git a/a b/a | |
1095 | --- a/a |
|
1111 | --- a/a | |
1096 | +++ b/a |
|
1112 | +++ b/a | |
1097 | @@ -1,3 +1,2 @@ |
|
1113 | @@ -1,3 +1,2 @@ | |
1098 | a |
|
1114 | a | |
1099 | -m1 |
|
1115 | -m1 | |
1100 | -m2 |
|
1116 | -m2 | |
1101 | +7 |
|
1117 | +7 | |
1102 | diff --git a/x/y b/x/y |
|
1118 | diff --git a/x/y b/x/y | |
1103 | deleted file mode 100644 |
|
1119 | deleted file mode 100644 | |
1104 | --- a/x/y |
|
1120 | --- a/x/y | |
1105 | +++ /dev/null |
|
1121 | +++ /dev/null | |
1106 | @@ -1,1 +0,0 @@ |
|
1122 | @@ -1,1 +0,0 @@ | |
1107 | -y1 |
|
1123 | -y1 | |
1108 | diff --git a/x/x b/y/x |
|
1124 | diff --git a/x/x b/y/x | |
1109 | rename from x/x |
|
1125 | rename from x/x | |
1110 | rename to y/x |
|
1126 | rename to y/x | |
1111 | --- a/x/x |
|
1127 | --- a/x/x | |
1112 | +++ b/y/x |
|
1128 | +++ b/y/x | |
1113 | @@ -1,1 +1,3 @@ |
|
1129 | @@ -1,1 +1,3 @@ | |
1114 | x |
|
1130 | x | |
1115 | +x1 |
|
1131 | +x1 | |
1116 | +x2 |
|
1132 | +x2 | |
1117 |
|
1133 | |||
1118 | - root to parent: --rev 0 --rev . |
|
1134 | - root to parent: --rev 0 --rev . | |
1119 | M a |
|
1135 | M a | |
1120 | A y/x |
|
1136 | A y/x | |
1121 | x/x |
|
1137 | x/x | |
1122 | R x/x |
|
1138 | R x/x | |
1123 |
|
1139 | |||
1124 | diff --git a/a b/a |
|
1140 | diff --git a/a b/a | |
1125 | --- a/a |
|
1141 | --- a/a | |
1126 | +++ b/a |
|
1142 | +++ b/a | |
1127 | @@ -1,1 +1,2 @@ |
|
1143 | @@ -1,1 +1,2 @@ | |
1128 | a |
|
1144 | a | |
1129 | +7 |
|
1145 | +7 | |
1130 | diff --git a/x/x b/y/x |
|
1146 | diff --git a/x/x b/y/x | |
1131 | rename from x/x |
|
1147 | rename from x/x | |
1132 | rename to y/x |
|
1148 | rename to y/x | |
1133 | --- a/x/x |
|
1149 | --- a/x/x | |
1134 | +++ b/y/x |
|
1150 | +++ b/y/x | |
1135 | @@ -1,1 +1,2 @@ |
|
1151 | @@ -1,1 +1,2 @@ | |
1136 | x |
|
1152 | x | |
1137 | +x1 |
|
1153 | +x1 | |
1138 |
|
1154 | |||
1139 | - parent to root: --rev . --rev 0 |
|
1155 | - parent to root: --rev . --rev 0 | |
1140 | M a |
|
1156 | M a | |
1141 | A x/x |
|
1157 | A x/x | |
1142 | y/x |
|
1158 | y/x | |
1143 | R y/x |
|
1159 | R y/x | |
1144 |
|
1160 | |||
1145 | diff --git a/a b/a |
|
1161 | diff --git a/a b/a | |
1146 | --- a/a |
|
1162 | --- a/a | |
1147 | +++ b/a |
|
1163 | +++ b/a | |
1148 | @@ -1,2 +1,1 @@ |
|
1164 | @@ -1,2 +1,1 @@ | |
1149 | a |
|
1165 | a | |
1150 | -7 |
|
1166 | -7 | |
1151 | diff --git a/y/x b/x/x |
|
1167 | diff --git a/y/x b/x/x | |
1152 | rename from y/x |
|
1168 | rename from y/x | |
1153 | rename to x/x |
|
1169 | rename to x/x | |
1154 | --- a/y/x |
|
1170 | --- a/y/x | |
1155 | +++ b/x/x |
|
1171 | +++ b/x/x | |
1156 | @@ -1,2 +1,1 @@ |
|
1172 | @@ -1,2 +1,1 @@ | |
1157 | x |
|
1173 | x | |
1158 | -x1 |
|
1174 | -x1 | |
1159 |
|
1175 | |||
1160 | - branch to parent: --rev 2 --rev . |
|
1176 | - branch to parent: --rev 2 --rev . | |
1161 | M a |
|
1177 | M a | |
1162 | A y/x |
|
1178 | A y/x | |
1163 | x/x |
|
1179 | x/x | |
1164 | R x/x |
|
1180 | R x/x | |
1165 | R x/y |
|
1181 | R x/y | |
1166 |
|
1182 | |||
1167 | diff --git a/a b/a |
|
1183 | diff --git a/a b/a | |
1168 | --- a/a |
|
1184 | --- a/a | |
1169 | +++ b/a |
|
1185 | +++ b/a | |
1170 | @@ -1,3 +1,2 @@ |
|
1186 | @@ -1,3 +1,2 @@ | |
1171 | a |
|
1187 | a | |
1172 | -m1 |
|
1188 | -m1 | |
1173 | -m2 |
|
1189 | -m2 | |
1174 | +7 |
|
1190 | +7 | |
1175 | diff --git a/x/y b/x/y |
|
1191 | diff --git a/x/y b/x/y | |
1176 | deleted file mode 100644 |
|
1192 | deleted file mode 100644 | |
1177 | --- a/x/y |
|
1193 | --- a/x/y | |
1178 | +++ /dev/null |
|
1194 | +++ /dev/null | |
1179 | @@ -1,1 +0,0 @@ |
|
1195 | @@ -1,1 +0,0 @@ | |
1180 | -y1 |
|
1196 | -y1 | |
1181 | diff --git a/x/x b/y/x |
|
1197 | diff --git a/x/x b/y/x | |
1182 | rename from x/x |
|
1198 | rename from x/x | |
1183 | rename to y/x |
|
1199 | rename to y/x | |
1184 | --- a/x/x |
|
1200 | --- a/x/x | |
1185 | +++ b/y/x |
|
1201 | +++ b/y/x | |
1186 | @@ -1,1 +1,2 @@ |
|
1202 | @@ -1,1 +1,2 @@ | |
1187 | x |
|
1203 | x | |
1188 | +x1 |
|
1204 | +x1 | |
1189 |
|
1205 | |||
1190 | - parent to branch: --rev . --rev 2 |
|
1206 | - parent to branch: --rev . --rev 2 | |
1191 | M a |
|
1207 | M a | |
1192 | A x/x |
|
1208 | A x/x | |
1193 | y/x |
|
1209 | y/x | |
1194 | A x/y |
|
1210 | A x/y | |
1195 | R y/x |
|
1211 | R y/x | |
1196 |
|
1212 | |||
1197 | diff --git a/a b/a |
|
1213 | diff --git a/a b/a | |
1198 | --- a/a |
|
1214 | --- a/a | |
1199 | +++ b/a |
|
1215 | +++ b/a | |
1200 | @@ -1,2 +1,3 @@ |
|
1216 | @@ -1,2 +1,3 @@ | |
1201 | a |
|
1217 | a | |
1202 | -7 |
|
1218 | -7 | |
1203 | +m1 |
|
1219 | +m1 | |
1204 | +m2 |
|
1220 | +m2 | |
1205 | diff --git a/y/x b/x/x |
|
1221 | diff --git a/y/x b/x/x | |
1206 | rename from y/x |
|
1222 | rename from y/x | |
1207 | rename to x/x |
|
1223 | rename to x/x | |
1208 | --- a/y/x |
|
1224 | --- a/y/x | |
1209 | +++ b/x/x |
|
1225 | +++ b/x/x | |
1210 | @@ -1,2 +1,1 @@ |
|
1226 | @@ -1,2 +1,1 @@ | |
1211 | x |
|
1227 | x | |
1212 | -x1 |
|
1228 | -x1 | |
1213 | diff --git a/x/y b/x/y |
|
1229 | diff --git a/x/y b/x/y | |
1214 | new file mode 100644 |
|
1230 | new file mode 100644 | |
1215 | --- /dev/null |
|
1231 | --- /dev/null | |
1216 | +++ b/x/y |
|
1232 | +++ b/x/y | |
1217 | @@ -0,0 +1,1 @@ |
|
1233 | @@ -0,0 +1,1 @@ | |
1218 | +y1 |
|
1234 | +y1 | |
1219 |
|
1235 | |||
1220 |
|
1236 |
@@ -1,100 +1,112 b'' | |||||
1 | % file not managed |
|
1 | % file not managed | |
2 | ? foo |
|
2 | ? foo | |
3 | ./foo |
|
3 | ./foo | |
4 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
5 | % 00 state added, options none |
|
5 | % 00 state added, options none | |
6 | not removing bar: file has been marked for add (use -f to force removal) |
|
6 | not removing bar: file has been marked for add (use -f to force removal) | |
7 | A bar |
|
7 | A bar | |
8 | ./bar |
|
8 | ./bar | |
9 | ./foo |
|
9 | ./foo | |
10 |
0 files updated, 0 files merged, |
|
10 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | % 01 state clean, options none |
|
11 | % 01 state clean, options none | |
12 | R foo |
|
12 | R foo | |
|
13 | ? bar | |||
|
14 | ./bar | |||
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | % 02 state modified, options none |
|
16 | % 02 state modified, options none | |
15 | not removing foo: file is modified (use -f to force removal) |
|
17 | not removing foo: file is modified (use -f to force removal) | |
16 | M foo |
|
18 | M foo | |
|
19 | ? bar | |||
|
20 | ./bar | |||
17 | ./foo |
|
21 | ./foo | |
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 | % 03 state missing, options none |
|
23 | % 03 state missing, options none | |
20 | R foo |
|
24 | R foo | |
|
25 | ? bar | |||
|
26 | ./bar | |||
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | % 10 state added, options -f |
|
28 | % 10 state added, options -f | |
23 | ? bar |
|
29 | ? bar | |
24 | ./bar |
|
30 | ./bar | |
25 | ./foo |
|
31 | ./foo | |
26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 | % 11 state clean, options -f |
|
33 | % 11 state clean, options -f | |
28 | R foo |
|
34 | R foo | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
35 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | % 12 state modified, options -f |
|
36 | % 12 state modified, options -f | |
31 | R foo |
|
37 | R foo | |
32 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | % 13 state missing, options -f |
|
39 | % 13 state missing, options -f | |
34 | R foo |
|
40 | R foo | |
35 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
36 | % 20 state added, options -A |
|
42 | % 20 state added, options -A | |
37 | not removing bar: file still exists (use -f to force removal) |
|
43 | not removing bar: file still exists (use -f to force removal) | |
38 | A bar |
|
44 | A bar | |
39 | ./bar |
|
45 | ./bar | |
40 | ./foo |
|
46 | ./foo | |
41 |
0 files updated, 0 files merged, |
|
47 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | % 21 state clean, options -A |
|
48 | % 21 state clean, options -A | |
43 | not removing foo: file still exists (use -f to force removal) |
|
49 | not removing foo: file still exists (use -f to force removal) | |
|
50 | ? bar | |||
|
51 | ./bar | |||
44 | ./foo |
|
52 | ./foo | |
45 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | % 22 state modified, options -A |
|
54 | % 22 state modified, options -A | |
47 | not removing foo: file still exists (use -f to force removal) |
|
55 | not removing foo: file still exists (use -f to force removal) | |
48 | M foo |
|
56 | M foo | |
|
57 | ? bar | |||
|
58 | ./bar | |||
49 | ./foo |
|
59 | ./foo | |
50 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
60 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
51 | % 23 state missing, options -A |
|
61 | % 23 state missing, options -A | |
52 | R foo |
|
62 | R foo | |
|
63 | ? bar | |||
|
64 | ./bar | |||
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
54 | % 30 state added, options -Af |
|
66 | % 30 state added, options -Af | |
55 | ? bar |
|
67 | ? bar | |
56 | ./bar |
|
68 | ./bar | |
57 | ./foo |
|
69 | ./foo | |
58 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
59 | % 31 state clean, options -Af |
|
71 | % 31 state clean, options -Af | |
60 | R foo |
|
72 | R foo | |
61 | ./foo |
|
73 | ./foo | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | % 32 state modified, options -Af |
|
75 | % 32 state modified, options -Af | |
64 | R foo |
|
76 | R foo | |
65 | ./foo |
|
77 | ./foo | |
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | % 33 state missing, options -Af |
|
79 | % 33 state missing, options -Af | |
68 | R foo |
|
80 | R foo | |
69 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 | adding test/bar |
|
82 | adding test/bar | |
71 | adding test/foo |
|
83 | adding test/foo | |
72 | % dir, options none |
|
84 | % dir, options none | |
73 | removing test/bar |
|
85 | removing test/bar | |
74 | removing test/foo |
|
86 | removing test/foo | |
75 | R test/bar |
|
87 | R test/bar | |
76 | R test/foo |
|
88 | R test/foo | |
77 | ./foo |
|
89 | ./foo | |
78 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | % dir, options -f |
|
91 | % dir, options -f | |
80 | removing test/bar |
|
92 | removing test/bar | |
81 | removing test/foo |
|
93 | removing test/foo | |
82 | R test/bar |
|
94 | R test/bar | |
83 | R test/foo |
|
95 | R test/foo | |
84 | ./foo |
|
96 | ./foo | |
85 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
86 | % dir, options -A |
|
98 | % dir, options -A | |
87 | not removing test/foo: file still exists (use -f to force removal) |
|
99 | not removing test/foo: file still exists (use -f to force removal) | |
88 | removing test/bar |
|
100 | removing test/bar | |
89 | R test/bar |
|
101 | R test/bar | |
90 | ./foo |
|
102 | ./foo | |
91 | ./test/foo |
|
103 | ./test/foo | |
92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
93 | % dir, options -Af |
|
105 | % dir, options -Af | |
94 | removing test/bar |
|
106 | removing test/bar | |
95 | removing test/foo |
|
107 | removing test/foo | |
96 | R test/bar |
|
108 | R test/bar | |
97 | R test/foo |
|
109 | R test/foo | |
98 | ./foo |
|
110 | ./foo | |
99 | ./test/foo |
|
111 | ./test/foo | |
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -1,215 +1,241 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | mkdir d1 d1/d11 d2 |
|
4 | mkdir d1 d1/d11 d2 | |
5 | echo d1/a > d1/a |
|
5 | echo d1/a > d1/a | |
6 | echo d1/ba > d1/ba |
|
6 | echo d1/ba > d1/ba | |
7 | echo d1/a1 > d1/d11/a1 |
|
7 | echo d1/a1 > d1/d11/a1 | |
8 | echo d1/b > d1/b |
|
8 | echo d1/b > d1/b | |
9 | echo d2/b > d2/b |
|
9 | echo d2/b > d2/b | |
10 | hg add d1/a d1/b d1/ba d1/d11/a1 d2/b |
|
10 | hg add d1/a d1/b d1/ba d1/d11/a1 d2/b | |
11 | hg commit -m "1" -d "1000000 0" |
|
11 | hg commit -m "1" -d "1000000 0" | |
12 |
|
12 | |||
13 | echo "# rename a single file" |
|
13 | echo "# rename a single file" | |
14 | hg rename d1/d11/a1 d2/c |
|
14 | hg rename d1/d11/a1 d2/c | |
15 | hg status -C |
|
15 | hg status -C | |
16 | hg update -C |
|
16 | hg update -C | |
|
17 | rm d2/c | |||
17 |
|
18 | |||
18 | echo "# rename --after a single file" |
|
19 | echo "# rename --after a single file" | |
19 | mv d1/d11/a1 d2/c |
|
20 | mv d1/d11/a1 d2/c | |
20 | hg rename --after d1/d11/a1 d2/c |
|
21 | hg rename --after d1/d11/a1 d2/c | |
21 | hg status -C |
|
22 | hg status -C | |
22 | hg update -C |
|
23 | hg update -C | |
|
24 | rm d2/c | |||
23 |
|
25 | |||
24 | echo "# move a single file to an existing directory" |
|
26 | echo "# move a single file to an existing directory" | |
25 | hg rename d1/d11/a1 d2 |
|
27 | hg rename d1/d11/a1 d2 | |
26 | hg status -C |
|
28 | hg status -C | |
27 | hg update -C |
|
29 | hg update -C | |
|
30 | rm d2/a1 | |||
28 |
|
31 | |||
29 | echo "# move --after a single file to an existing directory" |
|
32 | echo "# move --after a single file to an existing directory" | |
30 | mv d1/d11/a1 d2 |
|
33 | mv d1/d11/a1 d2 | |
31 | hg rename --after d1/d11/a1 d2 |
|
34 | hg rename --after d1/d11/a1 d2 | |
32 | hg status -C |
|
35 | hg status -C | |
33 | hg update -C |
|
36 | hg update -C | |
|
37 | rm d2/a1 | |||
34 |
|
38 | |||
35 | echo "# rename a file using a relative path" |
|
39 | echo "# rename a file using a relative path" | |
36 | (cd d1/d11; hg rename ../../d2/b e) |
|
40 | (cd d1/d11; hg rename ../../d2/b e) | |
37 | hg status -C |
|
41 | hg status -C | |
38 | hg update -C |
|
42 | hg update -C | |
|
43 | rm d1/d11/e | |||
39 |
|
44 | |||
40 | echo "# rename --after a file using a relative path" |
|
45 | echo "# rename --after a file using a relative path" | |
41 | (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) |
|
46 | (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) | |
42 | hg status -C |
|
47 | hg status -C | |
43 | hg update -C |
|
48 | hg update -C | |
|
49 | rm d1/d11/e | |||
44 |
|
50 | |||
45 | echo "# rename directory d1 as d3" |
|
51 | echo "# rename directory d1 as d3" | |
46 | hg rename d1/ d3 |
|
52 | hg rename d1/ d3 | |
47 | hg status -C |
|
53 | hg status -C | |
48 | hg update -C |
|
54 | hg update -C | |
|
55 | rm -rf d3 | |||
49 |
|
56 | |||
50 | echo "# rename --after directory d1 as d3" |
|
57 | echo "# rename --after directory d1 as d3" | |
51 | mv d1 d3 |
|
58 | mv d1 d3 | |
52 | hg rename --after d1 d3 |
|
59 | hg rename --after d1 d3 | |
53 | hg status -C |
|
60 | hg status -C | |
54 | hg update -C |
|
61 | hg update -C | |
|
62 | rm -rf d3 | |||
55 |
|
63 | |||
56 | echo "# move a directory using a relative path" |
|
64 | echo "# move a directory using a relative path" | |
57 | (cd d2; mkdir d3; hg rename ../d1/d11 d3) |
|
65 | (cd d2; mkdir d3; hg rename ../d1/d11 d3) | |
58 | hg status -C |
|
66 | hg status -C | |
59 | hg update -C |
|
67 | hg update -C | |
|
68 | rm -rf d2/d3 | |||
60 |
|
69 | |||
61 | echo "# move --after a directory using a relative path" |
|
70 | echo "# move --after a directory using a relative path" | |
62 | (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) |
|
71 | (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) | |
63 | hg status -C |
|
72 | hg status -C | |
64 | hg update -C |
|
73 | hg update -C | |
|
74 | rm -rf d2/d3 | |||
65 |
|
75 | |||
66 | echo "# move directory d1/d11 to an existing directory d2 (removes empty d1)" |
|
76 | echo "# move directory d1/d11 to an existing directory d2 (removes empty d1)" | |
67 | hg rename d1/d11/ d2 |
|
77 | hg rename d1/d11/ d2 | |
68 | hg status -C |
|
78 | hg status -C | |
69 | hg update -C |
|
79 | hg update -C | |
|
80 | rm -rf d2/d11 | |||
70 |
|
81 | |||
71 | echo "# move directories d1 and d2 to a new directory d3" |
|
82 | echo "# move directories d1 and d2 to a new directory d3" | |
72 | mkdir d3 |
|
83 | mkdir d3 | |
73 | hg rename d1 d2 d3 |
|
84 | hg rename d1 d2 d3 | |
74 | hg status -C |
|
85 | hg status -C | |
75 | hg update -C |
|
86 | hg update -C | |
|
87 | rm -rf d3 | |||
76 |
|
88 | |||
77 | echo "# move --after directories d1 and d2 to a new directory d3" |
|
89 | echo "# move --after directories d1 and d2 to a new directory d3" | |
78 | mkdir d3 |
|
90 | mkdir d3 | |
79 | mv d1 d2 d3 |
|
91 | mv d1 d2 d3 | |
80 | hg rename --after d1 d2 d3 |
|
92 | hg rename --after d1 d2 d3 | |
81 | hg status -C |
|
93 | hg status -C | |
82 | hg update -C |
|
94 | hg update -C | |
|
95 | rm -rf d3 | |||
83 |
|
96 | |||
84 | echo "# move everything under directory d1 to existing directory d2, do not" |
|
97 | echo "# move everything under directory d1 to existing directory d2, do not" | |
85 | echo "# overwrite existing files (d2/b)" |
|
98 | echo "# overwrite existing files (d2/b)" | |
86 | hg rename d1/* d2 |
|
99 | hg rename d1/* d2 | |
87 | hg status -C |
|
100 | hg status -C | |
88 | diff d1/b d2/b |
|
101 | diff d1/b d2/b | |
89 | hg update -C |
|
102 | hg update -C | |
|
103 | rm d2/a d2/ba d2/d11/a1 | |||
90 |
|
104 | |||
91 | echo "# attempt to move one file into a non-existent directory" |
|
105 | echo "# attempt to move one file into a non-existent directory" | |
92 | hg rename d1/a dx/ |
|
106 | hg rename d1/a dx/ | |
93 | hg status -C |
|
107 | hg status -C | |
94 | hg update -C |
|
108 | hg update -C | |
95 |
|
109 | |||
96 | echo "# attempt to move potentially more than one file into a non-existent" |
|
110 | echo "# attempt to move potentially more than one file into a non-existent" | |
97 | echo "# directory" |
|
111 | echo "# directory" | |
98 | hg rename 'glob:d1/**' dx |
|
112 | hg rename 'glob:d1/**' dx | |
99 |
|
113 | |||
100 | echo "# move every file under d1 to d2/d21 (glob)" |
|
114 | echo "# move every file under d1 to d2/d21 (glob)" | |
101 | mkdir d2/d21 |
|
115 | mkdir d2/d21 | |
102 | hg rename 'glob:d1/**' d2/d21 |
|
116 | hg rename 'glob:d1/**' d2/d21 | |
103 | hg status -C |
|
117 | hg status -C | |
104 | hg update -C |
|
118 | hg update -C | |
|
119 | rm -rf d2/d21 | |||
105 |
|
120 | |||
106 | echo "# move --after some files under d1 to d2/d21 (glob)" |
|
121 | echo "# move --after some files under d1 to d2/d21 (glob)" | |
107 | mkdir d2/d21 |
|
122 | mkdir d2/d21 | |
108 | mv d1/a d1/d11/a1 d2/d21 |
|
123 | mv d1/a d1/d11/a1 d2/d21 | |
109 | hg rename --after 'glob:d1/**' d2/d21 |
|
124 | hg rename --after 'glob:d1/**' d2/d21 | |
110 | hg status -C |
|
125 | hg status -C | |
111 | hg update -C |
|
126 | hg update -C | |
|
127 | rm -rf d2/d21 | |||
112 |
|
128 | |||
113 | echo "# move every file under d1 starting with an 'a' to d2/d21 (regexp)" |
|
129 | echo "# move every file under d1 starting with an 'a' to d2/d21 (regexp)" | |
114 | mkdir d2/d21 |
|
130 | mkdir d2/d21 | |
115 | hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 |
|
131 | hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 | |
116 | hg status -C |
|
132 | hg status -C | |
117 | hg update -C |
|
133 | hg update -C | |
|
134 | rm -rf d2/d21 | |||
118 |
|
135 | |||
119 | echo "# attempt to overwrite an existing file" |
|
136 | echo "# attempt to overwrite an existing file" | |
120 | echo "ca" > d1/ca |
|
137 | echo "ca" > d1/ca | |
121 | hg rename d1/ba d1/ca |
|
138 | hg rename d1/ba d1/ca | |
122 | hg status -C |
|
139 | hg status -C | |
123 | hg update -C |
|
140 | hg update -C | |
124 |
|
141 | |||
125 | echo "# forced overwrite of an existing file" |
|
142 | echo "# forced overwrite of an existing file" | |
126 | echo "ca" > d1/ca |
|
143 | echo "ca" > d1/ca | |
127 | hg rename --force d1/ba d1/ca |
|
144 | hg rename --force d1/ba d1/ca | |
128 | hg status -C |
|
145 | hg status -C | |
129 | hg update -C |
|
146 | hg update -C | |
|
147 | rm d1/ca | |||
130 |
|
148 | |||
131 | echo "# replace a symlink with a file" |
|
149 | echo "# replace a symlink with a file" | |
132 | ln -s ba d1/ca |
|
150 | ln -s ba d1/ca | |
133 | hg rename --force d1/ba d1/ca |
|
151 | hg rename --force d1/ba d1/ca | |
134 | hg status -C |
|
152 | hg status -C | |
135 | hg update -C |
|
153 | hg update -C | |
|
154 | rm d1/ca | |||
136 |
|
155 | |||
137 | echo "# do not copy more than one source file to the same destination file" |
|
156 | echo "# do not copy more than one source file to the same destination file" | |
138 | mkdir d3 |
|
157 | mkdir d3 | |
139 | hg rename d1/* d2/* d3 |
|
158 | hg rename d1/* d2/* d3 | |
140 | hg status -C |
|
159 | hg status -C | |
141 | hg update -C |
|
160 | hg update -C | |
|
161 | rm -rf d3 | |||
142 |
|
162 | |||
143 | echo "# move a whole subtree with \"hg rename .\"" |
|
163 | echo "# move a whole subtree with \"hg rename .\"" | |
144 | mkdir d3 |
|
164 | mkdir d3 | |
145 | (cd d1; hg rename . ../d3) |
|
165 | (cd d1; hg rename . ../d3) | |
146 | hg status -C |
|
166 | hg status -C | |
147 | hg update -C |
|
167 | hg update -C | |
|
168 | rm -rf d3 | |||
148 |
|
169 | |||
149 | echo "# move a whole subtree with \"hg rename --after .\"" |
|
170 | echo "# move a whole subtree with \"hg rename --after .\"" | |
150 | mkdir d3 |
|
171 | mkdir d3 | |
151 | mv d1/* d3 |
|
172 | mv d1/* d3 | |
152 | (cd d1; hg rename --after . ../d3) |
|
173 | (cd d1; hg rename --after . ../d3) | |
153 | hg status -C |
|
174 | hg status -C | |
154 | hg update -C |
|
175 | hg update -C | |
|
176 | rm -rf d3 | |||
155 |
|
177 | |||
156 | echo "# move the parent tree with \"hg rename ..\"" |
|
178 | echo "# move the parent tree with \"hg rename ..\"" | |
157 | (cd d1/d11; hg rename .. ../../d3) |
|
179 | (cd d1/d11; hg rename .. ../../d3) | |
158 | hg status -C |
|
180 | hg status -C | |
159 | hg update -C |
|
181 | hg update -C | |
|
182 | rm -rf d3 | |||
160 |
|
183 | |||
161 | echo "# skip removed files" |
|
184 | echo "# skip removed files" | |
162 | hg remove d1/b |
|
185 | hg remove d1/b | |
163 | hg rename d1 d3 |
|
186 | hg rename d1 d3 | |
164 | hg status -C |
|
187 | hg status -C | |
165 | hg update -C |
|
188 | hg update -C | |
|
189 | rm -rf d3 | |||
166 |
|
190 | |||
167 | echo "# transitive rename" |
|
191 | echo "# transitive rename" | |
168 | hg rename d1/b d1/bb |
|
192 | hg rename d1/b d1/bb | |
169 | hg rename d1/bb d1/bc |
|
193 | hg rename d1/bb d1/bc | |
170 | hg status -C |
|
194 | hg status -C | |
171 | hg update -C |
|
195 | hg update -C | |
|
196 | rm d1/bc | |||
172 |
|
197 | |||
173 | echo "# transitive rename --after" |
|
198 | echo "# transitive rename --after" | |
174 | hg rename d1/b d1/bb |
|
199 | hg rename d1/b d1/bb | |
175 | mv d1/bb d1/bc |
|
200 | mv d1/bb d1/bc | |
176 | hg rename --after d1/bb d1/bc |
|
201 | hg rename --after d1/bb d1/bc | |
177 | hg status -C |
|
202 | hg status -C | |
178 | hg update -C |
|
203 | hg update -C | |
|
204 | rm d1/bc | |||
179 |
|
205 | |||
180 | echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" |
|
206 | echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" | |
181 | hg rename d1/b d1/bb |
|
207 | hg rename d1/b d1/bb | |
182 | echo "some stuff added to d1/bb" >> d1/bb |
|
208 | echo "some stuff added to d1/bb" >> d1/bb | |
183 | hg rename d1/bb d1/b |
|
209 | hg rename d1/bb d1/b | |
184 | hg status -C |
|
210 | hg status -C | |
185 | hg update -C |
|
211 | hg update -C | |
186 |
|
212 | |||
187 | echo "# check illegal path components" |
|
213 | echo "# check illegal path components" | |
188 |
|
214 | |||
189 | hg rename d1/d11/a1 .hg/foo |
|
215 | hg rename d1/d11/a1 .hg/foo | |
190 | hg status -C |
|
216 | hg status -C | |
191 | hg rename d1/d11/a1 ../foo |
|
217 | hg rename d1/d11/a1 ../foo | |
192 | hg status -C |
|
218 | hg status -C | |
193 |
|
219 | |||
194 | mv d1/d11/a1 .hg/foo |
|
220 | mv d1/d11/a1 .hg/foo | |
195 | hg rename --after d1/d11/a1 .hg/foo |
|
221 | hg rename --after d1/d11/a1 .hg/foo | |
196 | hg status -C |
|
222 | hg status -C | |
197 | hg update -C |
|
223 | hg update -C | |
198 | rm .hg/foo |
|
224 | rm .hg/foo | |
199 |
|
225 | |||
200 | hg rename d1/d11/a1 .hg |
|
226 | hg rename d1/d11/a1 .hg | |
201 | hg status -C |
|
227 | hg status -C | |
202 | hg rename d1/d11/a1 .. |
|
228 | hg rename d1/d11/a1 .. | |
203 | hg status -C |
|
229 | hg status -C | |
204 |
|
230 | |||
205 | mv d1/d11/a1 .hg |
|
231 | mv d1/d11/a1 .hg | |
206 | hg rename --after d1/d11/a1 .hg |
|
232 | hg rename --after d1/d11/a1 .hg | |
207 | hg status -C |
|
233 | hg status -C | |
208 | hg update -C |
|
234 | hg update -C | |
209 | rm .hg/a1 |
|
235 | rm .hg/a1 | |
210 |
|
236 | |||
211 | (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) |
|
237 | (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) | |
212 | hg status -C |
|
238 | hg status -C | |
213 | (cd d1/d11; hg rename ../../d2/b ../../../foo) |
|
239 | (cd d1/d11; hg rename ../../d2/b ../../../foo) | |
214 | hg status -C |
|
240 | hg status -C | |
215 |
|
241 |
@@ -1,315 +1,315 b'' | |||||
1 | # rename a single file |
|
1 | # rename a single file | |
2 | A d2/c |
|
2 | A d2/c | |
3 | d1/d11/a1 |
|
3 | d1/d11/a1 | |
4 | R d1/d11/a1 |
|
4 | R d1/d11/a1 | |
5 |
1 files updated, 0 files merged, |
|
5 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
6 | # rename --after a single file |
|
6 | # rename --after a single file | |
7 | A d2/c |
|
7 | A d2/c | |
8 | d1/d11/a1 |
|
8 | d1/d11/a1 | |
9 | R d1/d11/a1 |
|
9 | R d1/d11/a1 | |
10 |
1 files updated, 0 files merged, |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | # move a single file to an existing directory |
|
11 | # move a single file to an existing directory | |
12 | A d2/a1 |
|
12 | A d2/a1 | |
13 | d1/d11/a1 |
|
13 | d1/d11/a1 | |
14 | R d1/d11/a1 |
|
14 | R d1/d11/a1 | |
15 |
1 files updated, 0 files merged, |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | # move --after a single file to an existing directory |
|
16 | # move --after a single file to an existing directory | |
17 | A d2/a1 |
|
17 | A d2/a1 | |
18 | d1/d11/a1 |
|
18 | d1/d11/a1 | |
19 | R d1/d11/a1 |
|
19 | R d1/d11/a1 | |
20 |
1 files updated, 0 files merged, |
|
20 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 | # rename a file using a relative path |
|
21 | # rename a file using a relative path | |
22 | A d1/d11/e |
|
22 | A d1/d11/e | |
23 | d2/b |
|
23 | d2/b | |
24 | R d2/b |
|
24 | R d2/b | |
25 |
1 files updated, 0 files merged, |
|
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 | # rename --after a file using a relative path |
|
26 | # rename --after a file using a relative path | |
27 | A d1/d11/e |
|
27 | A d1/d11/e | |
28 | d2/b |
|
28 | d2/b | |
29 | R d2/b |
|
29 | R d2/b | |
30 |
1 files updated, 0 files merged, |
|
30 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
31 | # rename directory d1 as d3 |
|
31 | # rename directory d1 as d3 | |
32 | moving d1/a to d3/a |
|
32 | moving d1/a to d3/a | |
33 | moving d1/b to d3/b |
|
33 | moving d1/b to d3/b | |
34 | moving d1/ba to d3/ba |
|
34 | moving d1/ba to d3/ba | |
35 | moving d1/d11/a1 to d3/d11/a1 |
|
35 | moving d1/d11/a1 to d3/d11/a1 | |
36 | A d3/a |
|
36 | A d3/a | |
37 | d1/a |
|
37 | d1/a | |
38 | A d3/b |
|
38 | A d3/b | |
39 | d1/b |
|
39 | d1/b | |
40 | A d3/ba |
|
40 | A d3/ba | |
41 | d1/ba |
|
41 | d1/ba | |
42 | A d3/d11/a1 |
|
42 | A d3/d11/a1 | |
43 | d1/d11/a1 |
|
43 | d1/d11/a1 | |
44 | R d1/a |
|
44 | R d1/a | |
45 | R d1/b |
|
45 | R d1/b | |
46 | R d1/ba |
|
46 | R d1/ba | |
47 | R d1/d11/a1 |
|
47 | R d1/d11/a1 | |
48 |
4 files updated, 0 files merged, |
|
48 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
49 | # rename --after directory d1 as d3 |
|
49 | # rename --after directory d1 as d3 | |
50 | moving d1/a to d3/a |
|
50 | moving d1/a to d3/a | |
51 | moving d1/b to d3/b |
|
51 | moving d1/b to d3/b | |
52 | moving d1/ba to d3/ba |
|
52 | moving d1/ba to d3/ba | |
53 | moving d1/d11/a1 to d3/d11/a1 |
|
53 | moving d1/d11/a1 to d3/d11/a1 | |
54 | A d3/a |
|
54 | A d3/a | |
55 | d1/a |
|
55 | d1/a | |
56 | A d3/b |
|
56 | A d3/b | |
57 | d1/b |
|
57 | d1/b | |
58 | A d3/ba |
|
58 | A d3/ba | |
59 | d1/ba |
|
59 | d1/ba | |
60 | A d3/d11/a1 |
|
60 | A d3/d11/a1 | |
61 | d1/d11/a1 |
|
61 | d1/d11/a1 | |
62 | R d1/a |
|
62 | R d1/a | |
63 | R d1/b |
|
63 | R d1/b | |
64 | R d1/ba |
|
64 | R d1/ba | |
65 | R d1/d11/a1 |
|
65 | R d1/d11/a1 | |
66 |
4 files updated, 0 files merged, |
|
66 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | # move a directory using a relative path |
|
67 | # move a directory using a relative path | |
68 | moving ../d1/d11/a1 to d3/d11/a1 |
|
68 | moving ../d1/d11/a1 to d3/d11/a1 | |
69 | A d2/d3/d11/a1 |
|
69 | A d2/d3/d11/a1 | |
70 | d1/d11/a1 |
|
70 | d1/d11/a1 | |
71 | R d1/d11/a1 |
|
71 | R d1/d11/a1 | |
72 |
1 files updated, 0 files merged, |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | # move --after a directory using a relative path |
|
73 | # move --after a directory using a relative path | |
74 | moving ../d1/d11/a1 to d3/d11/a1 |
|
74 | moving ../d1/d11/a1 to d3/d11/a1 | |
75 | A d2/d3/d11/a1 |
|
75 | A d2/d3/d11/a1 | |
76 | d1/d11/a1 |
|
76 | d1/d11/a1 | |
77 | R d1/d11/a1 |
|
77 | R d1/d11/a1 | |
78 |
1 files updated, 0 files merged, |
|
78 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | # move directory d1/d11 to an existing directory d2 (removes empty d1) |
|
79 | # move directory d1/d11 to an existing directory d2 (removes empty d1) | |
80 | moving d1/d11/a1 to d2/d11/a1 |
|
80 | moving d1/d11/a1 to d2/d11/a1 | |
81 | A d2/d11/a1 |
|
81 | A d2/d11/a1 | |
82 | d1/d11/a1 |
|
82 | d1/d11/a1 | |
83 | R d1/d11/a1 |
|
83 | R d1/d11/a1 | |
84 |
1 files updated, 0 files merged, |
|
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | # move directories d1 and d2 to a new directory d3 |
|
85 | # move directories d1 and d2 to a new directory d3 | |
86 | moving d1/a to d3/d1/a |
|
86 | moving d1/a to d3/d1/a | |
87 | moving d1/b to d3/d1/b |
|
87 | moving d1/b to d3/d1/b | |
88 | moving d1/ba to d3/d1/ba |
|
88 | moving d1/ba to d3/d1/ba | |
89 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
89 | moving d1/d11/a1 to d3/d1/d11/a1 | |
90 | moving d2/b to d3/d2/b |
|
90 | moving d2/b to d3/d2/b | |
91 | A d3/d1/a |
|
91 | A d3/d1/a | |
92 | d1/a |
|
92 | d1/a | |
93 | A d3/d1/b |
|
93 | A d3/d1/b | |
94 | d1/b |
|
94 | d1/b | |
95 | A d3/d1/ba |
|
95 | A d3/d1/ba | |
96 | d1/ba |
|
96 | d1/ba | |
97 | A d3/d1/d11/a1 |
|
97 | A d3/d1/d11/a1 | |
98 | d1/d11/a1 |
|
98 | d1/d11/a1 | |
99 | A d3/d2/b |
|
99 | A d3/d2/b | |
100 | d2/b |
|
100 | d2/b | |
101 | R d1/a |
|
101 | R d1/a | |
102 | R d1/b |
|
102 | R d1/b | |
103 | R d1/ba |
|
103 | R d1/ba | |
104 | R d1/d11/a1 |
|
104 | R d1/d11/a1 | |
105 | R d2/b |
|
105 | R d2/b | |
106 |
5 files updated, 0 files merged, |
|
106 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 | # move --after directories d1 and d2 to a new directory d3 |
|
107 | # move --after directories d1 and d2 to a new directory d3 | |
108 | moving d1/a to d3/d1/a |
|
108 | moving d1/a to d3/d1/a | |
109 | moving d1/b to d3/d1/b |
|
109 | moving d1/b to d3/d1/b | |
110 | moving d1/ba to d3/d1/ba |
|
110 | moving d1/ba to d3/d1/ba | |
111 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
111 | moving d1/d11/a1 to d3/d1/d11/a1 | |
112 | moving d2/b to d3/d2/b |
|
112 | moving d2/b to d3/d2/b | |
113 | A d3/d1/a |
|
113 | A d3/d1/a | |
114 | d1/a |
|
114 | d1/a | |
115 | A d3/d1/b |
|
115 | A d3/d1/b | |
116 | d1/b |
|
116 | d1/b | |
117 | A d3/d1/ba |
|
117 | A d3/d1/ba | |
118 | d1/ba |
|
118 | d1/ba | |
119 | A d3/d1/d11/a1 |
|
119 | A d3/d1/d11/a1 | |
120 | d1/d11/a1 |
|
120 | d1/d11/a1 | |
121 | A d3/d2/b |
|
121 | A d3/d2/b | |
122 | d2/b |
|
122 | d2/b | |
123 | R d1/a |
|
123 | R d1/a | |
124 | R d1/b |
|
124 | R d1/b | |
125 | R d1/ba |
|
125 | R d1/ba | |
126 | R d1/d11/a1 |
|
126 | R d1/d11/a1 | |
127 | R d2/b |
|
127 | R d2/b | |
128 |
5 files updated, 0 files merged, |
|
128 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
129 | # move everything under directory d1 to existing directory d2, do not |
|
129 | # move everything under directory d1 to existing directory d2, do not | |
130 | # overwrite existing files (d2/b) |
|
130 | # overwrite existing files (d2/b) | |
131 | d2/b: not overwriting - file exists |
|
131 | d2/b: not overwriting - file exists | |
132 | moving d1/d11/a1 to d2/d11/a1 |
|
132 | moving d1/d11/a1 to d2/d11/a1 | |
133 | A d2/a |
|
133 | A d2/a | |
134 | d1/a |
|
134 | d1/a | |
135 | A d2/ba |
|
135 | A d2/ba | |
136 | d1/ba |
|
136 | d1/ba | |
137 | A d2/d11/a1 |
|
137 | A d2/d11/a1 | |
138 | d1/d11/a1 |
|
138 | d1/d11/a1 | |
139 | R d1/a |
|
139 | R d1/a | |
140 | R d1/ba |
|
140 | R d1/ba | |
141 | R d1/d11/a1 |
|
141 | R d1/d11/a1 | |
142 | 1c1 |
|
142 | 1c1 | |
143 | < d1/b |
|
143 | < d1/b | |
144 | --- |
|
144 | --- | |
145 | > d2/b |
|
145 | > d2/b | |
146 |
3 files updated, 0 files merged, |
|
146 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
147 | # attempt to move one file into a non-existent directory |
|
147 | # attempt to move one file into a non-existent directory | |
148 | abort: destination dx/ is not a directory |
|
148 | abort: destination dx/ is not a directory | |
149 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | # attempt to move potentially more than one file into a non-existent |
|
150 | # attempt to move potentially more than one file into a non-existent | |
151 | # directory |
|
151 | # directory | |
152 | abort: with multiple sources, destination must be an existing directory |
|
152 | abort: with multiple sources, destination must be an existing directory | |
153 | # move every file under d1 to d2/d21 (glob) |
|
153 | # move every file under d1 to d2/d21 (glob) | |
154 | moving d1/a to d2/d21/a |
|
154 | moving d1/a to d2/d21/a | |
155 | moving d1/b to d2/d21/b |
|
155 | moving d1/b to d2/d21/b | |
156 | moving d1/ba to d2/d21/ba |
|
156 | moving d1/ba to d2/d21/ba | |
157 | moving d1/d11/a1 to d2/d21/a1 |
|
157 | moving d1/d11/a1 to d2/d21/a1 | |
158 | A d2/d21/a |
|
158 | A d2/d21/a | |
159 | d1/a |
|
159 | d1/a | |
160 | A d2/d21/a1 |
|
160 | A d2/d21/a1 | |
161 | d1/d11/a1 |
|
161 | d1/d11/a1 | |
162 | A d2/d21/b |
|
162 | A d2/d21/b | |
163 | d1/b |
|
163 | d1/b | |
164 | A d2/d21/ba |
|
164 | A d2/d21/ba | |
165 | d1/ba |
|
165 | d1/ba | |
166 | R d1/a |
|
166 | R d1/a | |
167 | R d1/b |
|
167 | R d1/b | |
168 | R d1/ba |
|
168 | R d1/ba | |
169 | R d1/d11/a1 |
|
169 | R d1/d11/a1 | |
170 |
4 files updated, 0 files merged, |
|
170 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
171 | # move --after some files under d1 to d2/d21 (glob) |
|
171 | # move --after some files under d1 to d2/d21 (glob) | |
172 | moving d1/a to d2/d21/a |
|
172 | moving d1/a to d2/d21/a | |
173 | moving d1/d11/a1 to d2/d21/a1 |
|
173 | moving d1/d11/a1 to d2/d21/a1 | |
174 | A d2/d21/a |
|
174 | A d2/d21/a | |
175 | d1/a |
|
175 | d1/a | |
176 | A d2/d21/a1 |
|
176 | A d2/d21/a1 | |
177 | d1/d11/a1 |
|
177 | d1/d11/a1 | |
178 | R d1/a |
|
178 | R d1/a | |
179 | R d1/d11/a1 |
|
179 | R d1/d11/a1 | |
180 |
2 files updated, 0 files merged, |
|
180 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
181 | # move every file under d1 starting with an 'a' to d2/d21 (regexp) |
|
181 | # move every file under d1 starting with an 'a' to d2/d21 (regexp) | |
182 | moving d1/a to d2/d21/a |
|
182 | moving d1/a to d2/d21/a | |
183 | moving d1/d11/a1 to d2/d21/a1 |
|
183 | moving d1/d11/a1 to d2/d21/a1 | |
184 | A d2/d21/a |
|
184 | A d2/d21/a | |
185 | d1/a |
|
185 | d1/a | |
186 | A d2/d21/a1 |
|
186 | A d2/d21/a1 | |
187 | d1/d11/a1 |
|
187 | d1/d11/a1 | |
188 | R d1/a |
|
188 | R d1/a | |
189 | R d1/d11/a1 |
|
189 | R d1/d11/a1 | |
190 |
2 files updated, 0 files merged, |
|
190 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
191 | # attempt to overwrite an existing file |
|
191 | # attempt to overwrite an existing file | |
192 | d1/ca: not overwriting - file exists |
|
192 | d1/ca: not overwriting - file exists | |
193 | ? d1/ca |
|
193 | ? d1/ca | |
194 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
194 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
195 | # forced overwrite of an existing file |
|
195 | # forced overwrite of an existing file | |
196 | A d1/ca |
|
196 | A d1/ca | |
197 | d1/ba |
|
197 | d1/ba | |
198 | R d1/ba |
|
198 | R d1/ba | |
199 |
1 files updated, 0 files merged, |
|
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
200 | # replace a symlink with a file |
|
200 | # replace a symlink with a file | |
201 | A d1/ca |
|
201 | A d1/ca | |
202 | d1/ba |
|
202 | d1/ba | |
203 | R d1/ba |
|
203 | R d1/ba | |
204 |
1 files updated, 0 files merged, |
|
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 | # do not copy more than one source file to the same destination file |
|
205 | # do not copy more than one source file to the same destination file | |
206 | moving d1/d11/a1 to d3/d11/a1 |
|
206 | moving d1/d11/a1 to d3/d11/a1 | |
207 | d3/b: not overwriting - d2/b collides with d1/b |
|
207 | d3/b: not overwriting - d2/b collides with d1/b | |
208 | A d3/a |
|
208 | A d3/a | |
209 | d1/a |
|
209 | d1/a | |
210 | A d3/b |
|
210 | A d3/b | |
211 | d1/b |
|
211 | d1/b | |
212 | A d3/ba |
|
212 | A d3/ba | |
213 | d1/ba |
|
213 | d1/ba | |
214 | A d3/d11/a1 |
|
214 | A d3/d11/a1 | |
215 | d1/d11/a1 |
|
215 | d1/d11/a1 | |
216 | R d1/a |
|
216 | R d1/a | |
217 | R d1/b |
|
217 | R d1/b | |
218 | R d1/ba |
|
218 | R d1/ba | |
219 | R d1/d11/a1 |
|
219 | R d1/d11/a1 | |
220 |
4 files updated, 0 files merged, |
|
220 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 | # move a whole subtree with "hg rename ." |
|
221 | # move a whole subtree with "hg rename ." | |
222 | moving a to ../d3/d1/a |
|
222 | moving a to ../d3/d1/a | |
223 | moving b to ../d3/d1/b |
|
223 | moving b to ../d3/d1/b | |
224 | moving ba to ../d3/d1/ba |
|
224 | moving ba to ../d3/d1/ba | |
225 | moving d11/a1 to ../d3/d1/d11/a1 |
|
225 | moving d11/a1 to ../d3/d1/d11/a1 | |
226 | A d3/d1/a |
|
226 | A d3/d1/a | |
227 | d1/a |
|
227 | d1/a | |
228 | A d3/d1/b |
|
228 | A d3/d1/b | |
229 | d1/b |
|
229 | d1/b | |
230 | A d3/d1/ba |
|
230 | A d3/d1/ba | |
231 | d1/ba |
|
231 | d1/ba | |
232 | A d3/d1/d11/a1 |
|
232 | A d3/d1/d11/a1 | |
233 | d1/d11/a1 |
|
233 | d1/d11/a1 | |
234 | R d1/a |
|
234 | R d1/a | |
235 | R d1/b |
|
235 | R d1/b | |
236 | R d1/ba |
|
236 | R d1/ba | |
237 | R d1/d11/a1 |
|
237 | R d1/d11/a1 | |
238 |
4 files updated, 0 files merged, |
|
238 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
239 | # move a whole subtree with "hg rename --after ." |
|
239 | # move a whole subtree with "hg rename --after ." | |
240 | moving a to ../d3/a |
|
240 | moving a to ../d3/a | |
241 | moving b to ../d3/b |
|
241 | moving b to ../d3/b | |
242 | moving ba to ../d3/ba |
|
242 | moving ba to ../d3/ba | |
243 | moving d11/a1 to ../d3/d11/a1 |
|
243 | moving d11/a1 to ../d3/d11/a1 | |
244 | A d3/a |
|
244 | A d3/a | |
245 | d1/a |
|
245 | d1/a | |
246 | A d3/b |
|
246 | A d3/b | |
247 | d1/b |
|
247 | d1/b | |
248 | A d3/ba |
|
248 | A d3/ba | |
249 | d1/ba |
|
249 | d1/ba | |
250 | A d3/d11/a1 |
|
250 | A d3/d11/a1 | |
251 | d1/d11/a1 |
|
251 | d1/d11/a1 | |
252 | R d1/a |
|
252 | R d1/a | |
253 | R d1/b |
|
253 | R d1/b | |
254 | R d1/ba |
|
254 | R d1/ba | |
255 | R d1/d11/a1 |
|
255 | R d1/d11/a1 | |
256 |
4 files updated, 0 files merged, |
|
256 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | # move the parent tree with "hg rename .." |
|
257 | # move the parent tree with "hg rename .." | |
258 | moving ../a to ../../d3/a |
|
258 | moving ../a to ../../d3/a | |
259 | moving ../b to ../../d3/b |
|
259 | moving ../b to ../../d3/b | |
260 | moving ../ba to ../../d3/ba |
|
260 | moving ../ba to ../../d3/ba | |
261 | moving a1 to ../../d3/d11/a1 |
|
261 | moving a1 to ../../d3/d11/a1 | |
262 | A d3/a |
|
262 | A d3/a | |
263 | d1/a |
|
263 | d1/a | |
264 | A d3/b |
|
264 | A d3/b | |
265 | d1/b |
|
265 | d1/b | |
266 | A d3/ba |
|
266 | A d3/ba | |
267 | d1/ba |
|
267 | d1/ba | |
268 | A d3/d11/a1 |
|
268 | A d3/d11/a1 | |
269 | d1/d11/a1 |
|
269 | d1/d11/a1 | |
270 | R d1/a |
|
270 | R d1/a | |
271 | R d1/b |
|
271 | R d1/b | |
272 | R d1/ba |
|
272 | R d1/ba | |
273 | R d1/d11/a1 |
|
273 | R d1/d11/a1 | |
274 |
4 files updated, 0 files merged, |
|
274 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
275 | # skip removed files |
|
275 | # skip removed files | |
276 | moving d1/a to d3/a |
|
276 | moving d1/a to d3/a | |
277 | moving d1/ba to d3/ba |
|
277 | moving d1/ba to d3/ba | |
278 | moving d1/d11/a1 to d3/d11/a1 |
|
278 | moving d1/d11/a1 to d3/d11/a1 | |
279 | A d3/a |
|
279 | A d3/a | |
280 | d1/a |
|
280 | d1/a | |
281 | A d3/ba |
|
281 | A d3/ba | |
282 | d1/ba |
|
282 | d1/ba | |
283 | A d3/d11/a1 |
|
283 | A d3/d11/a1 | |
284 | d1/d11/a1 |
|
284 | d1/d11/a1 | |
285 | R d1/a |
|
285 | R d1/a | |
286 | R d1/b |
|
286 | R d1/b | |
287 | R d1/ba |
|
287 | R d1/ba | |
288 | R d1/d11/a1 |
|
288 | R d1/d11/a1 | |
289 |
4 files updated, 0 files merged, |
|
289 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
290 | # transitive rename |
|
290 | # transitive rename | |
291 | A d1/bc |
|
291 | A d1/bc | |
292 | d1/b |
|
292 | d1/b | |
293 | R d1/b |
|
293 | R d1/b | |
294 |
1 files updated, 0 files merged, |
|
294 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
295 | # transitive rename --after |
|
295 | # transitive rename --after | |
296 | A d1/bc |
|
296 | A d1/bc | |
297 | d1/b |
|
297 | d1/b | |
298 | R d1/b |
|
298 | R d1/b | |
299 |
1 files updated, 0 files merged, |
|
299 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
300 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) |
|
300 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) | |
301 | M d1/b |
|
301 | M d1/b | |
302 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
302 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
303 | # check illegal path components |
|
303 | # check illegal path components | |
304 | abort: path contains illegal component: .hg/foo |
|
304 | abort: path contains illegal component: .hg/foo | |
305 | abort: ../foo not under root |
|
305 | abort: ../foo not under root | |
306 | abort: path contains illegal component: .hg/foo |
|
306 | abort: path contains illegal component: .hg/foo | |
307 | ! d1/d11/a1 |
|
307 | ! d1/d11/a1 | |
308 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
308 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
309 | abort: path contains illegal component: .hg/a1 |
|
309 | abort: path contains illegal component: .hg/a1 | |
310 | abort: ../a1 not under root |
|
310 | abort: ../a1 not under root | |
311 | abort: path contains illegal component: .hg/a1 |
|
311 | abort: path contains illegal component: .hg/a1 | |
312 | ! d1/d11/a1 |
|
312 | ! d1/d11/a1 | |
313 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
313 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
314 | abort: path contains illegal component: .hg/foo |
|
314 | abort: path contains illegal component: .hg/foo | |
315 | abort: ../../../foo not under root |
|
315 | abort: ../../../foo not under root |
@@ -1,87 +1,87 b'' | |||||
1 | %% should show b unknown |
|
1 | %% should show b unknown | |
2 | ? b |
|
2 | ? b | |
3 | %% should show b unknown and c modified |
|
3 | %% should show b unknown and c modified | |
4 | M c |
|
4 | M c | |
5 | ? b |
|
5 | ? b | |
6 | %% should show b added and c modified |
|
6 | %% should show b added and c modified | |
7 | M c |
|
7 | M c | |
8 | A b |
|
8 | A b | |
9 | %% should show a removed, b added and c modified |
|
9 | %% should show a removed, b added and c modified | |
10 | M c |
|
10 | M c | |
11 | A b |
|
11 | A b | |
12 | R a |
|
12 | R a | |
13 | %% should show b added, copy saved, and c modified |
|
13 | %% should show b added, copy saved, and c modified | |
14 | M c |
|
14 | M c | |
15 | A b |
|
15 | A b | |
16 | %% should show b unknown, and c modified |
|
16 | %% should show b unknown, and c modified | |
17 | M c |
|
17 | M c | |
18 | ? b |
|
18 | ? b | |
19 | %% should show unknown: b |
|
19 | %% should show unknown: b | |
20 | ? b |
|
20 | ? b | |
21 | %% should show b added |
|
21 | %% should show b added | |
22 | A b |
|
22 | A b | |
23 | %% should show b deleted |
|
23 | %% should show b deleted | |
24 | ! b |
|
24 | ! b | |
25 | forgetting b |
|
25 | forgetting b | |
26 | %% should not find b |
|
26 | %% should not find b | |
27 | b: No such file or directory |
|
27 | b: No such file or directory | |
28 | %% should show a c e |
|
28 | %% should show a c e | |
29 | a |
|
29 | a | |
30 | c |
|
30 | c | |
31 | e |
|
31 | e | |
32 | %% should verbosely save backup to e.orig |
|
32 | %% should verbosely save backup to e.orig | |
33 | saving current version of e as e.orig |
|
33 | saving current version of e as e.orig | |
34 | reverting e |
|
34 | reverting e | |
35 | %% should say no changes needed |
|
35 | %% should say no changes needed | |
36 | no changes needed to a |
|
36 | no changes needed to a | |
37 | %% should say file not managed |
|
37 | %% should say file not managed | |
38 | file not managed: q |
|
38 | file not managed: q | |
39 | %% should say file not found |
|
39 | %% should say file not found | |
40 | notfound: No such file in rev 095eacd0c0d7 |
|
40 | notfound: No such file in rev 095eacd0c0d7 | |
41 | A z |
|
41 | A z | |
42 | ? e.orig |
|
42 | ? e.orig | |
43 | %% should add a, remove d, forget z |
|
43 | %% should add a, remove d, forget z | |
44 | adding a |
|
44 | adding a | |
45 | removing d |
|
45 | removing d | |
46 | forgetting z |
|
46 | forgetting z | |
47 | %% should forget a, undelete d |
|
47 | %% should forget a, undelete d | |
48 | forgetting a |
|
48 | forgetting a | |
49 | undeleting d |
|
49 | undeleting d | |
50 | %% should silently add a |
|
50 | %% should silently add a | |
51 | A a |
|
51 | A a | |
52 | R d |
|
52 | R d | |
53 | %% should silently keep d removed |
|
53 | %% should silently keep d removed | |
54 | R d |
|
54 | R d | |
55 |
1 files updated, 0 files merged, |
|
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 | reverting c |
|
56 | reverting c | |
57 | %% should print non-executable |
|
57 | %% should print non-executable | |
58 | non-executable |
|
58 | non-executable | |
59 | reverting c |
|
59 | reverting c | |
60 | %% should print executable |
|
60 | %% should print executable | |
61 | executable |
|
61 | executable | |
62 | %% issue 241 |
|
62 | %% issue 241 | |
63 | adding a |
|
63 | adding a | |
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 | % should fail - no arguments |
|
65 | % should fail - no arguments | |
66 | abort: no files or directories specified; use --all to revert the whole repo |
|
66 | abort: no files or directories specified; use --all to revert the whole repo | |
67 | % should succeed |
|
67 | % should succeed | |
68 | reverting a |
|
68 | reverting a | |
69 | %% issue332 |
|
69 | %% issue332 | |
70 | adding b/b |
|
70 | adding b/b | |
71 | created new head |
|
71 | created new head | |
72 | reverting b/b |
|
72 | reverting b/b | |
73 | forgetting newdir/newfile |
|
73 | forgetting newdir/newfile | |
74 | reverting b/b |
|
74 | reverting b/b | |
75 | % reverting a rename target should revert the source |
|
75 | % reverting a rename target should revert the source | |
76 | ? newa |
|
76 | ? newa | |
77 | %% 4 ignored files (we will add/commit everything) |
|
77 | %% 4 ignored files (we will add/commit everything) | |
78 | I ignored |
|
78 | I ignored | |
79 | I ignoreddir/file |
|
79 | I ignoreddir/file | |
80 | I ignoreddir/removed |
|
80 | I ignoreddir/removed | |
81 | I removed |
|
81 | I removed | |
82 | %% should revert ignored* and undelete *removed |
|
82 | %% should revert ignored* and undelete *removed | |
83 | reverting ignored |
|
83 | reverting ignored | |
84 | reverting ignoreddir/file |
|
84 | reverting ignoreddir/file | |
85 | undeleting ignoreddir/removed |
|
85 | undeleting ignoreddir/removed | |
86 | undeleting removed |
|
86 | undeleting removed | |
87 | %% should silently revert the named files |
|
87 | %% should silently revert the named files |
@@ -1,31 +1,31 b'' | |||||
1 | abort: file dangling not tracked! |
|
1 | abort: file dangling not tracked! | |
2 | changeset: 0:cabd88b706fc |
|
2 | changeset: 0:cabd88b706fc | |
3 | tag: tip |
|
3 | tag: tip | |
4 | user: test |
|
4 | user: test | |
5 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
5 | date: Thu Jan 01 00:00:00 1970 +0000 | |
6 | files: dangling |
|
6 | files: dangling | |
7 | description: |
|
7 | description: | |
8 | add symlink |
|
8 | add symlink | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | 2564acbe54bbbedfbf608479340b359f04597f80 644 @ dangling |
|
11 | 2564acbe54bbbedfbf608479340b359f04597f80 644 @ dangling | |
12 | % rev 0: |
|
12 | % rev 0: | |
13 | dangling -> nothing |
|
13 | dangling -> nothing | |
14 | % rev 1: |
|
14 | % rev 1: | |
15 | dangling -> void |
|
15 | dangling -> void | |
16 | % modifying link |
|
16 | % modifying link | |
17 | dangling -> empty |
|
17 | dangling -> empty | |
18 | % reverting to rev 0: |
|
18 | % reverting to rev 0: | |
19 | reverting dangling |
|
19 | reverting dangling | |
20 | dangling -> nothing |
|
20 | dangling -> nothing | |
21 | % backups: |
|
21 | % backups: | |
22 | dangling.orig -> empty |
|
22 | dangling.orig -> empty | |
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | % copies |
|
24 | % copies | |
25 | copying dangling to dangling2 |
|
25 | copying dangling to dangling2 | |
26 | A dangling2 |
|
26 | A dangling2 | |
27 | dangling |
|
27 | dangling | |
28 | dangling -> void |
|
28 | dangling -> void | |
29 | dangling2 -> void |
|
29 | dangling2 -> void | |
30 | % issue995 |
|
30 | % issue995 | |
31 |
0 files updated, 0 files merged, |
|
31 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -1,135 +1,136 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | cat <<EOF >> $HGRCPATH |
|
3 | cat <<EOF >> $HGRCPATH | |
4 | [extensions] |
|
4 | [extensions] | |
5 | transplant= |
|
5 | transplant= | |
6 | EOF |
|
6 | EOF | |
7 |
|
7 | |||
8 | hg init t |
|
8 | hg init t | |
9 | cd t |
|
9 | cd t | |
10 | echo r1 > r1 |
|
10 | echo r1 > r1 | |
11 | hg ci -Amr1 -d'0 0' |
|
11 | hg ci -Amr1 -d'0 0' | |
12 | echo r2 > r2 |
|
12 | echo r2 > r2 | |
13 | hg ci -Amr2 -d'1 0' |
|
13 | hg ci -Amr2 -d'1 0' | |
14 | hg up 0 |
|
14 | hg up 0 | |
15 |
|
15 | |||
16 | echo b1 > b1 |
|
16 | echo b1 > b1 | |
17 | hg ci -Amb1 -d '0 0' |
|
17 | hg ci -Amb1 -d '0 0' | |
18 | echo b2 > b2 |
|
18 | echo b2 > b2 | |
19 | hg ci -Amb2 -d '1 0' |
|
19 | hg ci -Amb2 -d '1 0' | |
20 | echo b3 > b3 |
|
20 | echo b3 > b3 | |
21 | hg ci -Amb3 -d '2 0' |
|
21 | hg ci -Amb3 -d '2 0' | |
22 |
|
22 | |||
23 | hg log --template '{rev} {parents} {desc}\n' |
|
23 | hg log --template '{rev} {parents} {desc}\n' | |
24 |
|
24 | |||
25 | hg clone . ../rebase |
|
25 | hg clone . ../rebase | |
26 | cd ../rebase |
|
26 | cd ../rebase | |
27 |
|
27 | |||
28 | hg up -C 1 |
|
28 | hg up -C 1 | |
29 | echo '% rebase b onto r1' |
|
29 | echo '% rebase b onto r1' | |
30 | hg transplant -a -b tip |
|
30 | hg transplant -a -b tip | |
31 | hg log --template '{rev} {parents} {desc}\n' |
|
31 | hg log --template '{rev} {parents} {desc}\n' | |
32 |
|
32 | |||
33 | hg clone ../t ../prune |
|
33 | hg clone ../t ../prune | |
34 | cd ../prune |
|
34 | cd ../prune | |
35 |
|
35 | |||
36 | hg up -C 1 |
|
36 | hg up -C 1 | |
37 | echo '% rebase b onto r1, skipping b2' |
|
37 | echo '% rebase b onto r1, skipping b2' | |
38 | hg transplant -a -b tip -p 3 |
|
38 | hg transplant -a -b tip -p 3 | |
39 | hg log --template '{rev} {parents} {desc}\n' |
|
39 | hg log --template '{rev} {parents} {desc}\n' | |
40 |
|
40 | |||
41 | echo '% remote transplant' |
|
41 | echo '% remote transplant' | |
42 | hg clone -r 1 ../t ../remote |
|
42 | hg clone -r 1 ../t ../remote | |
43 | cd ../remote |
|
43 | cd ../remote | |
44 | hg transplant --log -s ../t 2 4 |
|
44 | hg transplant --log -s ../t 2 4 | |
45 | hg log --template '{rev} {parents} {desc}\n' |
|
45 | hg log --template '{rev} {parents} {desc}\n' | |
46 |
|
46 | |||
47 | echo '% skip previous transplants' |
|
47 | echo '% skip previous transplants' | |
48 | hg transplant -s ../t -a -b 4 |
|
48 | hg transplant -s ../t -a -b 4 | |
49 | hg log --template '{rev} {parents} {desc}\n' |
|
49 | hg log --template '{rev} {parents} {desc}\n' | |
50 |
|
50 | |||
51 | echo '% skip local changes transplanted to the source' |
|
51 | echo '% skip local changes transplanted to the source' | |
52 | echo b4 > b4 |
|
52 | echo b4 > b4 | |
53 | hg ci -Amb4 -d '3 0' |
|
53 | hg ci -Amb4 -d '3 0' | |
54 | hg clone ../t ../pullback |
|
54 | hg clone ../t ../pullback | |
55 | cd ../pullback |
|
55 | cd ../pullback | |
56 | hg transplant -s ../remote -a -b tip |
|
56 | hg transplant -s ../remote -a -b tip | |
57 |
|
57 | |||
58 | echo '% remote transplant with pull' |
|
58 | echo '% remote transplant with pull' | |
59 | hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid |
|
59 | hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid | |
60 | cat ../t.pid >> $DAEMON_PIDS |
|
60 | cat ../t.pid >> $DAEMON_PIDS | |
61 |
|
61 | |||
62 | hg clone -r 0 ../t ../rp |
|
62 | hg clone -r 0 ../t ../rp | |
63 | cd ../rp |
|
63 | cd ../rp | |
64 | hg transplant -s http://localhost:$HGPORT/ 2 4 |
|
64 | hg transplant -s http://localhost:$HGPORT/ 2 4 | |
65 | hg log --template '{rev} {parents} {desc}\n' |
|
65 | hg log --template '{rev} {parents} {desc}\n' | |
66 |
|
66 | |||
67 | echo '% transplant --continue' |
|
67 | echo '% transplant --continue' | |
68 | hg init ../tc |
|
68 | hg init ../tc | |
69 | cd ../tc |
|
69 | cd ../tc | |
70 | cat <<EOF > foo |
|
70 | cat <<EOF > foo | |
71 | foo |
|
71 | foo | |
72 | bar |
|
72 | bar | |
73 | baz |
|
73 | baz | |
74 | EOF |
|
74 | EOF | |
75 | echo toremove > toremove |
|
75 | echo toremove > toremove | |
76 | hg ci -Amfoo |
|
76 | hg ci -Amfoo | |
77 | cat <<EOF > foo |
|
77 | cat <<EOF > foo | |
78 | foo2 |
|
78 | foo2 | |
79 | bar2 |
|
79 | bar2 | |
80 | baz2 |
|
80 | baz2 | |
81 | EOF |
|
81 | EOF | |
82 | rm toremove |
|
82 | rm toremove | |
83 | echo added > added |
|
83 | echo added > added | |
84 | hg ci -Amfoo2 |
|
84 | hg ci -Amfoo2 | |
85 | echo bar > bar |
|
85 | echo bar > bar | |
86 | hg ci -Ambar |
|
86 | hg ci -Ambar | |
87 | echo bar2 >> bar |
|
87 | echo bar2 >> bar | |
88 | hg ci -mbar2 |
|
88 | hg ci -mbar2 | |
89 | hg up 0 |
|
89 | hg up 0 | |
90 | echo foobar > foo |
|
90 | echo foobar > foo | |
91 | hg ci -mfoobar |
|
91 | hg ci -mfoobar | |
92 | hg transplant 1:3 |
|
92 | hg transplant 1:3 | |
93 | # transplant -c shouldn't use an old changeset |
|
93 | # transplant -c shouldn't use an old changeset | |
94 | hg up -C |
|
94 | hg up -C | |
|
95 | rm added | |||
95 | hg transplant 1 |
|
96 | hg transplant 1 | |
96 | hg transplant --continue |
|
97 | hg transplant --continue | |
97 | hg transplant 1:3 |
|
98 | hg transplant 1:3 | |
98 | hg locate |
|
99 | hg locate | |
99 | cd .. |
|
100 | cd .. | |
100 |
|
101 | |||
101 | # Test transplant --merge (issue 1111) |
|
102 | # Test transplant --merge (issue 1111) | |
102 | echo % test transplant merge |
|
103 | echo % test transplant merge | |
103 | hg init t1111 |
|
104 | hg init t1111 | |
104 | cd t1111 |
|
105 | cd t1111 | |
105 | echo a > a |
|
106 | echo a > a | |
106 | hg ci -Am adda |
|
107 | hg ci -Am adda | |
107 | echo b >> a |
|
108 | echo b >> a | |
108 | hg ci -m appendb |
|
109 | hg ci -m appendb | |
109 | echo c >> a |
|
110 | echo c >> a | |
110 | hg ci -m appendc |
|
111 | hg ci -m appendc | |
111 | hg up -C 0 |
|
112 | hg up -C 0 | |
112 | echo d >> a |
|
113 | echo d >> a | |
113 | hg ci -m appendd |
|
114 | hg ci -m appendd | |
114 | echo % tranplant |
|
115 | echo % tranplant | |
115 | hg transplant -m 1 |
|
116 | hg transplant -m 1 | |
116 | cd .. |
|
117 | cd .. | |
117 |
|
118 | |||
118 | echo '% test transplant into empty repository' |
|
119 | echo '% test transplant into empty repository' | |
119 | hg init empty |
|
120 | hg init empty | |
120 | cd empty |
|
121 | cd empty | |
121 | hg transplant -s ../t -b tip -a |
|
122 | hg transplant -s ../t -b tip -a | |
122 | cd .. |
|
123 | cd .. | |
123 |
|
124 | |||
124 | echo '% test filter' |
|
125 | echo '% test filter' | |
125 | hg init filter |
|
126 | hg init filter | |
126 | cd filter |
|
127 | cd filter | |
127 | cat <<'EOF' >test-filter |
|
128 | cat <<'EOF' >test-filter | |
128 | #!/bin/sh |
|
129 | #!/bin/sh | |
129 | sed 's/r1/r2/' $1 > $1.new |
|
130 | sed 's/r1/r2/' $1 > $1.new | |
130 | mv $1.new $1 |
|
131 | mv $1.new $1 | |
131 | EOF |
|
132 | EOF | |
132 | chmod +x test-filter |
|
133 | chmod +x test-filter | |
133 | hg transplant -s ../t -b tip -a --filter ./test-filter |\ |
|
134 | hg transplant -s ../t -b tip -a --filter ./test-filter |\ | |
134 | sed 's/filtering.*/filtering/g' |
|
135 | sed 's/filtering.*/filtering/g' | |
135 | hg log --template '{rev} {parents} {desc}\n' |
|
136 | hg log --template '{rev} {parents} {desc}\n' |
@@ -1,161 +1,161 b'' | |||||
1 | adding r1 |
|
1 | adding r1 | |
2 | adding r2 |
|
2 | adding r2 | |
3 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
3 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
4 | adding b1 |
|
4 | adding b1 | |
5 | created new head |
|
5 | created new head | |
6 | adding b2 |
|
6 | adding b2 | |
7 | adding b3 |
|
7 | adding b3 | |
8 | 4 b3 |
|
8 | 4 b3 | |
9 | 3 b2 |
|
9 | 3 b2 | |
10 | 2 0:17ab29e464c6 b1 |
|
10 | 2 0:17ab29e464c6 b1 | |
11 | 1 r2 |
|
11 | 1 r2 | |
12 | 0 r1 |
|
12 | 0 r1 | |
13 | updating working directory |
|
13 | updating working directory | |
14 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
16 | % rebase b onto r1 |
|
16 | % rebase b onto r1 | |
17 | applying 37a1297eb21b |
|
17 | applying 37a1297eb21b | |
18 | 37a1297eb21b transplanted to e234d668f844 |
|
18 | 37a1297eb21b transplanted to e234d668f844 | |
19 | applying 722f4667af76 |
|
19 | applying 722f4667af76 | |
20 | 722f4667af76 transplanted to 539f377d78df |
|
20 | 722f4667af76 transplanted to 539f377d78df | |
21 | applying a53251cdf717 |
|
21 | applying a53251cdf717 | |
22 | a53251cdf717 transplanted to ffd6818a3975 |
|
22 | a53251cdf717 transplanted to ffd6818a3975 | |
23 | 7 b3 |
|
23 | 7 b3 | |
24 | 6 b2 |
|
24 | 6 b2 | |
25 | 5 1:d11e3596cc1a b1 |
|
25 | 5 1:d11e3596cc1a b1 | |
26 | 4 b3 |
|
26 | 4 b3 | |
27 | 3 b2 |
|
27 | 3 b2 | |
28 | 2 0:17ab29e464c6 b1 |
|
28 | 2 0:17ab29e464c6 b1 | |
29 | 1 r2 |
|
29 | 1 r2 | |
30 | 0 r1 |
|
30 | 0 r1 | |
31 | updating working directory |
|
31 | updating working directory | |
32 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
34 | % rebase b onto r1, skipping b2 |
|
34 | % rebase b onto r1, skipping b2 | |
35 | applying 37a1297eb21b |
|
35 | applying 37a1297eb21b | |
36 | 37a1297eb21b transplanted to e234d668f844 |
|
36 | 37a1297eb21b transplanted to e234d668f844 | |
37 | applying a53251cdf717 |
|
37 | applying a53251cdf717 | |
38 | a53251cdf717 transplanted to 7275fda4d04f |
|
38 | a53251cdf717 transplanted to 7275fda4d04f | |
39 | 6 b3 |
|
39 | 6 b3 | |
40 | 5 1:d11e3596cc1a b1 |
|
40 | 5 1:d11e3596cc1a b1 | |
41 | 4 b3 |
|
41 | 4 b3 | |
42 | 3 b2 |
|
42 | 3 b2 | |
43 | 2 0:17ab29e464c6 b1 |
|
43 | 2 0:17ab29e464c6 b1 | |
44 | 1 r2 |
|
44 | 1 r2 | |
45 | 0 r1 |
|
45 | 0 r1 | |
46 | % remote transplant |
|
46 | % remote transplant | |
47 | requesting all changes |
|
47 | requesting all changes | |
48 | adding changesets |
|
48 | adding changesets | |
49 | adding manifests |
|
49 | adding manifests | |
50 | adding file changes |
|
50 | adding file changes | |
51 | added 2 changesets with 2 changes to 2 files |
|
51 | added 2 changesets with 2 changes to 2 files | |
52 | updating working directory |
|
52 | updating working directory | |
53 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
54 | searching for changes |
|
54 | searching for changes | |
55 | applying 37a1297eb21b |
|
55 | applying 37a1297eb21b | |
56 | 37a1297eb21b transplanted to c19cf0ccb069 |
|
56 | 37a1297eb21b transplanted to c19cf0ccb069 | |
57 | applying a53251cdf717 |
|
57 | applying a53251cdf717 | |
58 | a53251cdf717 transplanted to f7fe5bf98525 |
|
58 | a53251cdf717 transplanted to f7fe5bf98525 | |
59 | 3 b3 |
|
59 | 3 b3 | |
60 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
60 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
61 | 2 b1 |
|
61 | 2 b1 | |
62 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
62 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
63 | 1 r2 |
|
63 | 1 r2 | |
64 | 0 r1 |
|
64 | 0 r1 | |
65 | % skip previous transplants |
|
65 | % skip previous transplants | |
66 | searching for changes |
|
66 | searching for changes | |
67 | applying 722f4667af76 |
|
67 | applying 722f4667af76 | |
68 | 722f4667af76 transplanted to 47156cd86c0b |
|
68 | 722f4667af76 transplanted to 47156cd86c0b | |
69 | 4 b2 |
|
69 | 4 b2 | |
70 | 3 b3 |
|
70 | 3 b3 | |
71 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
71 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
72 | 2 b1 |
|
72 | 2 b1 | |
73 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
73 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
74 | 1 r2 |
|
74 | 1 r2 | |
75 | 0 r1 |
|
75 | 0 r1 | |
76 | % skip local changes transplanted to the source |
|
76 | % skip local changes transplanted to the source | |
77 | adding b4 |
|
77 | adding b4 | |
78 | updating working directory |
|
78 | updating working directory | |
79 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 | searching for changes |
|
80 | searching for changes | |
81 | applying 4333daefcb15 |
|
81 | applying 4333daefcb15 | |
82 | 4333daefcb15 transplanted to 5f42c04e07cc |
|
82 | 4333daefcb15 transplanted to 5f42c04e07cc | |
83 | % remote transplant with pull |
|
83 | % remote transplant with pull | |
84 | requesting all changes |
|
84 | requesting all changes | |
85 | adding changesets |
|
85 | adding changesets | |
86 | adding manifests |
|
86 | adding manifests | |
87 | adding file changes |
|
87 | adding file changes | |
88 | added 1 changesets with 1 changes to 1 files |
|
88 | added 1 changesets with 1 changes to 1 files | |
89 | updating working directory |
|
89 | updating working directory | |
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | searching for changes |
|
91 | searching for changes | |
92 | searching for changes |
|
92 | searching for changes | |
93 | adding changesets |
|
93 | adding changesets | |
94 | adding manifests |
|
94 | adding manifests | |
95 | adding file changes |
|
95 | adding file changes | |
96 | added 1 changesets with 1 changes to 1 files |
|
96 | added 1 changesets with 1 changes to 1 files | |
97 | applying a53251cdf717 |
|
97 | applying a53251cdf717 | |
98 | a53251cdf717 transplanted to 8d9279348abb |
|
98 | a53251cdf717 transplanted to 8d9279348abb | |
99 | 2 b3 |
|
99 | 2 b3 | |
100 | 1 b1 |
|
100 | 1 b1 | |
101 | 0 r1 |
|
101 | 0 r1 | |
102 | % transplant --continue |
|
102 | % transplant --continue | |
103 | adding foo |
|
103 | adding foo | |
104 | adding toremove |
|
104 | adding toremove | |
105 | adding added |
|
105 | adding added | |
106 | removing toremove |
|
106 | removing toremove | |
107 | adding bar |
|
107 | adding bar | |
108 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
108 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
109 | created new head |
|
109 | created new head | |
110 | applying a1e30dd1b8e7 |
|
110 | applying a1e30dd1b8e7 | |
111 | patching file foo |
|
111 | patching file foo | |
112 | Hunk #1 FAILED at 0 |
|
112 | Hunk #1 FAILED at 0 | |
113 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
113 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
114 | patch failed to apply |
|
114 | patch failed to apply | |
115 | abort: Fix up the merge and run hg transplant --continue |
|
115 | abort: Fix up the merge and run hg transplant --continue | |
116 |
1 files updated, 0 files merged, |
|
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 | applying a1e30dd1b8e7 |
|
117 | applying a1e30dd1b8e7 | |
118 | patching file foo |
|
118 | patching file foo | |
119 | Hunk #1 FAILED at 0 |
|
119 | Hunk #1 FAILED at 0 | |
120 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
120 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
121 | patch failed to apply |
|
121 | patch failed to apply | |
122 | abort: Fix up the merge and run hg transplant --continue |
|
122 | abort: Fix up the merge and run hg transplant --continue | |
123 | a1e30dd1b8e7 transplanted as f1563cf27039 |
|
123 | a1e30dd1b8e7 transplanted as f1563cf27039 | |
124 | skipping already applied revision 1:a1e30dd1b8e7 |
|
124 | skipping already applied revision 1:a1e30dd1b8e7 | |
125 | applying 1739ac5f6139 |
|
125 | applying 1739ac5f6139 | |
126 | 1739ac5f6139 transplanted to d649c221319f |
|
126 | 1739ac5f6139 transplanted to d649c221319f | |
127 | applying 0282d5fbbe02 |
|
127 | applying 0282d5fbbe02 | |
128 | 0282d5fbbe02 transplanted to 77418277ccb3 |
|
128 | 0282d5fbbe02 transplanted to 77418277ccb3 | |
129 | added |
|
129 | added | |
130 | bar |
|
130 | bar | |
131 | foo |
|
131 | foo | |
132 | % test transplant merge |
|
132 | % test transplant merge | |
133 | adding a |
|
133 | adding a | |
134 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
134 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
135 | created new head |
|
135 | created new head | |
136 | % tranplant |
|
136 | % tranplant | |
137 | applying 42dc4432fd35 |
|
137 | applying 42dc4432fd35 | |
138 | 1:42dc4432fd35 merged at a9f4acbac129 |
|
138 | 1:42dc4432fd35 merged at a9f4acbac129 | |
139 | % test transplant into empty repository |
|
139 | % test transplant into empty repository | |
140 | requesting all changes |
|
140 | requesting all changes | |
141 | adding changesets |
|
141 | adding changesets | |
142 | adding manifests |
|
142 | adding manifests | |
143 | adding file changes |
|
143 | adding file changes | |
144 | added 4 changesets with 4 changes to 4 files |
|
144 | added 4 changesets with 4 changes to 4 files | |
145 | % test filter |
|
145 | % test filter | |
146 | filtering |
|
146 | filtering | |
147 | applying 17ab29e464c6 |
|
147 | applying 17ab29e464c6 | |
148 | 17ab29e464c6 transplanted to e9ffc54ea104 |
|
148 | 17ab29e464c6 transplanted to e9ffc54ea104 | |
149 | filtering |
|
149 | filtering | |
150 | applying 37a1297eb21b |
|
150 | applying 37a1297eb21b | |
151 | 37a1297eb21b transplanted to 348b36d0b6a5 |
|
151 | 37a1297eb21b transplanted to 348b36d0b6a5 | |
152 | filtering |
|
152 | filtering | |
153 | applying 722f4667af76 |
|
153 | applying 722f4667af76 | |
154 | 722f4667af76 transplanted to 0aa6979afb95 |
|
154 | 722f4667af76 transplanted to 0aa6979afb95 | |
155 | filtering |
|
155 | filtering | |
156 | applying a53251cdf717 |
|
156 | applying a53251cdf717 | |
157 | a53251cdf717 transplanted to 14f8512272b5 |
|
157 | a53251cdf717 transplanted to 14f8512272b5 | |
158 | 3 b3 |
|
158 | 3 b3 | |
159 | 2 b2 |
|
159 | 2 b2 | |
160 | 1 b1 |
|
160 | 1 b1 | |
161 | 0 r2 |
|
161 | 0 r2 |
General Comments 0
You need to be logged in to leave comments.
Login now