Show More
@@ -1,1013 +1,1015 b'' | |||||
1 | # filemerge.py - file-level merge handling for Mercurial |
|
1 | # filemerge.py - file-level merge handling for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006, 2007, 2008 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006, 2007, 2008 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 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import contextlib |
|
10 | import contextlib | |
11 | import os |
|
11 | import os | |
12 | import re |
|
12 | import re | |
13 | import shutil |
|
13 | import shutil | |
14 |
|
14 | |||
15 | from .i18n import _ |
|
15 | from .i18n import _ | |
16 | from .node import nullid, short |
|
16 | from .node import nullid, short | |
17 |
|
17 | |||
18 | from . import ( |
|
18 | from . import ( | |
19 | encoding, |
|
19 | encoding, | |
20 | error, |
|
20 | error, | |
21 | formatter, |
|
21 | formatter, | |
22 | match, |
|
22 | match, | |
23 | pycompat, |
|
23 | pycompat, | |
24 | registrar, |
|
24 | registrar, | |
25 | scmutil, |
|
25 | scmutil, | |
26 | simplemerge, |
|
26 | simplemerge, | |
27 | tagmerge, |
|
27 | tagmerge, | |
28 | templatekw, |
|
28 | templatekw, | |
29 | templater, |
|
29 | templater, | |
30 | util, |
|
30 | util, | |
31 | ) |
|
31 | ) | |
32 |
|
32 | |||
33 | from .utils import ( |
|
33 | from .utils import ( | |
34 | procutil, |
|
34 | procutil, | |
35 | stringutil, |
|
35 | stringutil, | |
36 | ) |
|
36 | ) | |
37 |
|
37 | |||
38 | def _toolstr(ui, tool, part, *args): |
|
38 | def _toolstr(ui, tool, part, *args): | |
39 | return ui.config("merge-tools", tool + "." + part, *args) |
|
39 | return ui.config("merge-tools", tool + "." + part, *args) | |
40 |
|
40 | |||
41 | def _toolbool(ui, tool, part,*args): |
|
41 | def _toolbool(ui, tool, part,*args): | |
42 | return ui.configbool("merge-tools", tool + "." + part, *args) |
|
42 | return ui.configbool("merge-tools", tool + "." + part, *args) | |
43 |
|
43 | |||
44 | def _toollist(ui, tool, part): |
|
44 | def _toollist(ui, tool, part): | |
45 | return ui.configlist("merge-tools", tool + "." + part) |
|
45 | return ui.configlist("merge-tools", tool + "." + part) | |
46 |
|
46 | |||
47 | internals = {} |
|
47 | internals = {} | |
48 | # Merge tools to document. |
|
48 | # Merge tools to document. | |
49 | internalsdoc = {} |
|
49 | internalsdoc = {} | |
50 |
|
50 | |||
51 | internaltool = registrar.internalmerge() |
|
51 | internaltool = registrar.internalmerge() | |
52 |
|
52 | |||
53 | # internal tool merge types |
|
53 | # internal tool merge types | |
54 | nomerge = internaltool.nomerge |
|
54 | nomerge = internaltool.nomerge | |
55 | mergeonly = internaltool.mergeonly # just the full merge, no premerge |
|
55 | mergeonly = internaltool.mergeonly # just the full merge, no premerge | |
56 | fullmerge = internaltool.fullmerge # both premerge and merge |
|
56 | fullmerge = internaltool.fullmerge # both premerge and merge | |
57 |
|
57 | |||
58 | _localchangedotherdeletedmsg = _( |
|
58 | _localchangedotherdeletedmsg = _( | |
59 | "local%(l)s changed %(fd)s which other%(o)s deleted\n" |
|
59 | "file %(fd)s was deleted in local%(l)s but was modified in other%(o)s.\n" | |
|
60 | "What do you want to do?\n" | |||
60 | "use (c)hanged version, (d)elete, or leave (u)nresolved?" |
|
61 | "use (c)hanged version, (d)elete, or leave (u)nresolved?" | |
61 | "$$ &Changed $$ &Delete $$ &Unresolved") |
|
62 | "$$ &Changed $$ &Delete $$ &Unresolved") | |
62 |
|
63 | |||
63 | _otherchangedlocaldeletedmsg = _( |
|
64 | _otherchangedlocaldeletedmsg = _( | |
64 | "other%(o)s changed %(fd)s which local%(l)s deleted\n" |
|
65 | "file %(fd)s was deleted in other%(o)s but was modified in local%(l)s.\n" | |
|
66 | "What do you want to do?\n" | |||
65 | "use (c)hanged version, leave (d)eleted, or " |
|
67 | "use (c)hanged version, leave (d)eleted, or " | |
66 | "leave (u)nresolved?" |
|
68 | "leave (u)nresolved?" | |
67 | "$$ &Changed $$ &Deleted $$ &Unresolved") |
|
69 | "$$ &Changed $$ &Deleted $$ &Unresolved") | |
68 |
|
70 | |||
69 | class absentfilectx(object): |
|
71 | class absentfilectx(object): | |
70 | """Represents a file that's ostensibly in a context but is actually not |
|
72 | """Represents a file that's ostensibly in a context but is actually not | |
71 | present in it. |
|
73 | present in it. | |
72 |
|
74 | |||
73 | This is here because it's very specific to the filemerge code for now -- |
|
75 | This is here because it's very specific to the filemerge code for now -- | |
74 | other code is likely going to break with the values this returns.""" |
|
76 | other code is likely going to break with the values this returns.""" | |
75 | def __init__(self, ctx, f): |
|
77 | def __init__(self, ctx, f): | |
76 | self._ctx = ctx |
|
78 | self._ctx = ctx | |
77 | self._f = f |
|
79 | self._f = f | |
78 |
|
80 | |||
79 | def path(self): |
|
81 | def path(self): | |
80 | return self._f |
|
82 | return self._f | |
81 |
|
83 | |||
82 | def size(self): |
|
84 | def size(self): | |
83 | return None |
|
85 | return None | |
84 |
|
86 | |||
85 | def data(self): |
|
87 | def data(self): | |
86 | return None |
|
88 | return None | |
87 |
|
89 | |||
88 | def filenode(self): |
|
90 | def filenode(self): | |
89 | return nullid |
|
91 | return nullid | |
90 |
|
92 | |||
91 | _customcmp = True |
|
93 | _customcmp = True | |
92 | def cmp(self, fctx): |
|
94 | def cmp(self, fctx): | |
93 | """compare with other file context |
|
95 | """compare with other file context | |
94 |
|
96 | |||
95 | returns True if different from fctx. |
|
97 | returns True if different from fctx. | |
96 | """ |
|
98 | """ | |
97 | return not (fctx.isabsent() and |
|
99 | return not (fctx.isabsent() and | |
98 | fctx.ctx() == self.ctx() and |
|
100 | fctx.ctx() == self.ctx() and | |
99 | fctx.path() == self.path()) |
|
101 | fctx.path() == self.path()) | |
100 |
|
102 | |||
101 | def flags(self): |
|
103 | def flags(self): | |
102 | return '' |
|
104 | return '' | |
103 |
|
105 | |||
104 | def changectx(self): |
|
106 | def changectx(self): | |
105 | return self._ctx |
|
107 | return self._ctx | |
106 |
|
108 | |||
107 | def isbinary(self): |
|
109 | def isbinary(self): | |
108 | return False |
|
110 | return False | |
109 |
|
111 | |||
110 | def isabsent(self): |
|
112 | def isabsent(self): | |
111 | return True |
|
113 | return True | |
112 |
|
114 | |||
113 | def _findtool(ui, tool): |
|
115 | def _findtool(ui, tool): | |
114 | if tool in internals: |
|
116 | if tool in internals: | |
115 | return tool |
|
117 | return tool | |
116 | cmd = _toolstr(ui, tool, "executable", tool) |
|
118 | cmd = _toolstr(ui, tool, "executable", tool) | |
117 | if cmd.startswith('python:'): |
|
119 | if cmd.startswith('python:'): | |
118 | return cmd |
|
120 | return cmd | |
119 | return findexternaltool(ui, tool) |
|
121 | return findexternaltool(ui, tool) | |
120 |
|
122 | |||
121 | def _quotetoolpath(cmd): |
|
123 | def _quotetoolpath(cmd): | |
122 | if cmd.startswith('python:'): |
|
124 | if cmd.startswith('python:'): | |
123 | return cmd |
|
125 | return cmd | |
124 | return procutil.shellquote(cmd) |
|
126 | return procutil.shellquote(cmd) | |
125 |
|
127 | |||
126 | def findexternaltool(ui, tool): |
|
128 | def findexternaltool(ui, tool): | |
127 | for kn in ("regkey", "regkeyalt"): |
|
129 | for kn in ("regkey", "regkeyalt"): | |
128 | k = _toolstr(ui, tool, kn) |
|
130 | k = _toolstr(ui, tool, kn) | |
129 | if not k: |
|
131 | if not k: | |
130 | continue |
|
132 | continue | |
131 | p = util.lookupreg(k, _toolstr(ui, tool, "regname")) |
|
133 | p = util.lookupreg(k, _toolstr(ui, tool, "regname")) | |
132 | if p: |
|
134 | if p: | |
133 | p = procutil.findexe(p + _toolstr(ui, tool, "regappend", "")) |
|
135 | p = procutil.findexe(p + _toolstr(ui, tool, "regappend", "")) | |
134 | if p: |
|
136 | if p: | |
135 | return p |
|
137 | return p | |
136 | exe = _toolstr(ui, tool, "executable", tool) |
|
138 | exe = _toolstr(ui, tool, "executable", tool) | |
137 | return procutil.findexe(util.expandpath(exe)) |
|
139 | return procutil.findexe(util.expandpath(exe)) | |
138 |
|
140 | |||
139 | def _picktool(repo, ui, path, binary, symlink, changedelete): |
|
141 | def _picktool(repo, ui, path, binary, symlink, changedelete): | |
140 | strictcheck = ui.configbool('merge', 'strict-capability-check') |
|
142 | strictcheck = ui.configbool('merge', 'strict-capability-check') | |
141 |
|
143 | |||
142 | def hascapability(tool, capability, strict=False): |
|
144 | def hascapability(tool, capability, strict=False): | |
143 | if tool in internals: |
|
145 | if tool in internals: | |
144 | return strict and internals[tool].capabilities.get(capability) |
|
146 | return strict and internals[tool].capabilities.get(capability) | |
145 | return _toolbool(ui, tool, capability) |
|
147 | return _toolbool(ui, tool, capability) | |
146 |
|
148 | |||
147 | def supportscd(tool): |
|
149 | def supportscd(tool): | |
148 | return tool in internals and internals[tool].mergetype == nomerge |
|
150 | return tool in internals and internals[tool].mergetype == nomerge | |
149 |
|
151 | |||
150 | def check(tool, pat, symlink, binary, changedelete): |
|
152 | def check(tool, pat, symlink, binary, changedelete): | |
151 | tmsg = tool |
|
153 | tmsg = tool | |
152 | if pat: |
|
154 | if pat: | |
153 | tmsg = _("%s (for pattern %s)") % (tool, pat) |
|
155 | tmsg = _("%s (for pattern %s)") % (tool, pat) | |
154 | if not _findtool(ui, tool): |
|
156 | if not _findtool(ui, tool): | |
155 | if pat: # explicitly requested tool deserves a warning |
|
157 | if pat: # explicitly requested tool deserves a warning | |
156 | ui.warn(_("couldn't find merge tool %s\n") % tmsg) |
|
158 | ui.warn(_("couldn't find merge tool %s\n") % tmsg) | |
157 | else: # configured but non-existing tools are more silent |
|
159 | else: # configured but non-existing tools are more silent | |
158 | ui.note(_("couldn't find merge tool %s\n") % tmsg) |
|
160 | ui.note(_("couldn't find merge tool %s\n") % tmsg) | |
159 | elif symlink and not hascapability(tool, "symlink", strictcheck): |
|
161 | elif symlink and not hascapability(tool, "symlink", strictcheck): | |
160 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) |
|
162 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) | |
161 | elif binary and not hascapability(tool, "binary", strictcheck): |
|
163 | elif binary and not hascapability(tool, "binary", strictcheck): | |
162 | ui.warn(_("tool %s can't handle binary\n") % tmsg) |
|
164 | ui.warn(_("tool %s can't handle binary\n") % tmsg) | |
163 | elif changedelete and not supportscd(tool): |
|
165 | elif changedelete and not supportscd(tool): | |
164 | # the nomerge tools are the only tools that support change/delete |
|
166 | # the nomerge tools are the only tools that support change/delete | |
165 | # conflicts |
|
167 | # conflicts | |
166 | pass |
|
168 | pass | |
167 | elif not procutil.gui() and _toolbool(ui, tool, "gui"): |
|
169 | elif not procutil.gui() and _toolbool(ui, tool, "gui"): | |
168 | ui.warn(_("tool %s requires a GUI\n") % tmsg) |
|
170 | ui.warn(_("tool %s requires a GUI\n") % tmsg) | |
169 | else: |
|
171 | else: | |
170 | return True |
|
172 | return True | |
171 | return False |
|
173 | return False | |
172 |
|
174 | |||
173 | # internal config: ui.forcemerge |
|
175 | # internal config: ui.forcemerge | |
174 | # forcemerge comes from command line arguments, highest priority |
|
176 | # forcemerge comes from command line arguments, highest priority | |
175 | force = ui.config('ui', 'forcemerge') |
|
177 | force = ui.config('ui', 'forcemerge') | |
176 | if force: |
|
178 | if force: | |
177 | toolpath = _findtool(ui, force) |
|
179 | toolpath = _findtool(ui, force) | |
178 | if changedelete and not supportscd(toolpath): |
|
180 | if changedelete and not supportscd(toolpath): | |
179 | return ":prompt", None |
|
181 | return ":prompt", None | |
180 | else: |
|
182 | else: | |
181 | if toolpath: |
|
183 | if toolpath: | |
182 | return (force, _quotetoolpath(toolpath)) |
|
184 | return (force, _quotetoolpath(toolpath)) | |
183 | else: |
|
185 | else: | |
184 | # mimic HGMERGE if given tool not found |
|
186 | # mimic HGMERGE if given tool not found | |
185 | return (force, force) |
|
187 | return (force, force) | |
186 |
|
188 | |||
187 | # HGMERGE takes next precedence |
|
189 | # HGMERGE takes next precedence | |
188 | hgmerge = encoding.environ.get("HGMERGE") |
|
190 | hgmerge = encoding.environ.get("HGMERGE") | |
189 | if hgmerge: |
|
191 | if hgmerge: | |
190 | if changedelete and not supportscd(hgmerge): |
|
192 | if changedelete and not supportscd(hgmerge): | |
191 | return ":prompt", None |
|
193 | return ":prompt", None | |
192 | else: |
|
194 | else: | |
193 | return (hgmerge, hgmerge) |
|
195 | return (hgmerge, hgmerge) | |
194 |
|
196 | |||
195 | # then patterns |
|
197 | # then patterns | |
196 |
|
198 | |||
197 | # whether binary capability should be checked strictly |
|
199 | # whether binary capability should be checked strictly | |
198 | binarycap = binary and strictcheck |
|
200 | binarycap = binary and strictcheck | |
199 |
|
201 | |||
200 | for pat, tool in ui.configitems("merge-patterns"): |
|
202 | for pat, tool in ui.configitems("merge-patterns"): | |
201 | mf = match.match(repo.root, '', [pat]) |
|
203 | mf = match.match(repo.root, '', [pat]) | |
202 | if mf(path) and check(tool, pat, symlink, binarycap, changedelete): |
|
204 | if mf(path) and check(tool, pat, symlink, binarycap, changedelete): | |
203 | if binary and not hascapability(tool, "binary", strict=True): |
|
205 | if binary and not hascapability(tool, "binary", strict=True): | |
204 | ui.warn(_("warning: check merge-patterns configurations," |
|
206 | ui.warn(_("warning: check merge-patterns configurations," | |
205 | " if %r for binary file %r is unintentional\n" |
|
207 | " if %r for binary file %r is unintentional\n" | |
206 | "(see 'hg help merge-tools'" |
|
208 | "(see 'hg help merge-tools'" | |
207 | " for binary files capability)\n") |
|
209 | " for binary files capability)\n") | |
208 | % (pycompat.bytestr(tool), pycompat.bytestr(path))) |
|
210 | % (pycompat.bytestr(tool), pycompat.bytestr(path))) | |
209 | toolpath = _findtool(ui, tool) |
|
211 | toolpath = _findtool(ui, tool) | |
210 | return (tool, _quotetoolpath(toolpath)) |
|
212 | return (tool, _quotetoolpath(toolpath)) | |
211 |
|
213 | |||
212 | # then merge tools |
|
214 | # then merge tools | |
213 | tools = {} |
|
215 | tools = {} | |
214 | disabled = set() |
|
216 | disabled = set() | |
215 | for k, v in ui.configitems("merge-tools"): |
|
217 | for k, v in ui.configitems("merge-tools"): | |
216 | t = k.split('.')[0] |
|
218 | t = k.split('.')[0] | |
217 | if t not in tools: |
|
219 | if t not in tools: | |
218 | tools[t] = int(_toolstr(ui, t, "priority")) |
|
220 | tools[t] = int(_toolstr(ui, t, "priority")) | |
219 | if _toolbool(ui, t, "disabled"): |
|
221 | if _toolbool(ui, t, "disabled"): | |
220 | disabled.add(t) |
|
222 | disabled.add(t) | |
221 | names = tools.keys() |
|
223 | names = tools.keys() | |
222 | tools = sorted([(-p, tool) for tool, p in tools.items() |
|
224 | tools = sorted([(-p, tool) for tool, p in tools.items() | |
223 | if tool not in disabled]) |
|
225 | if tool not in disabled]) | |
224 | uimerge = ui.config("ui", "merge") |
|
226 | uimerge = ui.config("ui", "merge") | |
225 | if uimerge: |
|
227 | if uimerge: | |
226 | # external tools defined in uimerge won't be able to handle |
|
228 | # external tools defined in uimerge won't be able to handle | |
227 | # change/delete conflicts |
|
229 | # change/delete conflicts | |
228 | if check(uimerge, path, symlink, binary, changedelete): |
|
230 | if check(uimerge, path, symlink, binary, changedelete): | |
229 | if uimerge not in names and not changedelete: |
|
231 | if uimerge not in names and not changedelete: | |
230 | return (uimerge, uimerge) |
|
232 | return (uimerge, uimerge) | |
231 | tools.insert(0, (None, uimerge)) # highest priority |
|
233 | tools.insert(0, (None, uimerge)) # highest priority | |
232 | tools.append((None, "hgmerge")) # the old default, if found |
|
234 | tools.append((None, "hgmerge")) # the old default, if found | |
233 | for p, t in tools: |
|
235 | for p, t in tools: | |
234 | if check(t, None, symlink, binary, changedelete): |
|
236 | if check(t, None, symlink, binary, changedelete): | |
235 | toolpath = _findtool(ui, t) |
|
237 | toolpath = _findtool(ui, t) | |
236 | return (t, _quotetoolpath(toolpath)) |
|
238 | return (t, _quotetoolpath(toolpath)) | |
237 |
|
239 | |||
238 | # internal merge or prompt as last resort |
|
240 | # internal merge or prompt as last resort | |
239 | if symlink or binary or changedelete: |
|
241 | if symlink or binary or changedelete: | |
240 | if not changedelete and len(tools): |
|
242 | if not changedelete and len(tools): | |
241 | # any tool is rejected by capability for symlink or binary |
|
243 | # any tool is rejected by capability for symlink or binary | |
242 | ui.warn(_("no tool found to merge %s\n") % path) |
|
244 | ui.warn(_("no tool found to merge %s\n") % path) | |
243 | return ":prompt", None |
|
245 | return ":prompt", None | |
244 | return ":merge", None |
|
246 | return ":merge", None | |
245 |
|
247 | |||
246 | def _eoltype(data): |
|
248 | def _eoltype(data): | |
247 | "Guess the EOL type of a file" |
|
249 | "Guess the EOL type of a file" | |
248 | if '\0' in data: # binary |
|
250 | if '\0' in data: # binary | |
249 | return None |
|
251 | return None | |
250 | if '\r\n' in data: # Windows |
|
252 | if '\r\n' in data: # Windows | |
251 | return '\r\n' |
|
253 | return '\r\n' | |
252 | if '\r' in data: # Old Mac |
|
254 | if '\r' in data: # Old Mac | |
253 | return '\r' |
|
255 | return '\r' | |
254 | if '\n' in data: # UNIX |
|
256 | if '\n' in data: # UNIX | |
255 | return '\n' |
|
257 | return '\n' | |
256 | return None # unknown |
|
258 | return None # unknown | |
257 |
|
259 | |||
258 | def _matcheol(file, back): |
|
260 | def _matcheol(file, back): | |
259 | "Convert EOL markers in a file to match origfile" |
|
261 | "Convert EOL markers in a file to match origfile" | |
260 | tostyle = _eoltype(back.data()) # No repo.wread filters? |
|
262 | tostyle = _eoltype(back.data()) # No repo.wread filters? | |
261 | if tostyle: |
|
263 | if tostyle: | |
262 | data = util.readfile(file) |
|
264 | data = util.readfile(file) | |
263 | style = _eoltype(data) |
|
265 | style = _eoltype(data) | |
264 | if style: |
|
266 | if style: | |
265 | newdata = data.replace(style, tostyle) |
|
267 | newdata = data.replace(style, tostyle) | |
266 | if newdata != data: |
|
268 | if newdata != data: | |
267 | util.writefile(file, newdata) |
|
269 | util.writefile(file, newdata) | |
268 |
|
270 | |||
269 | @internaltool('prompt', nomerge) |
|
271 | @internaltool('prompt', nomerge) | |
270 | def _iprompt(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
272 | def _iprompt(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
271 | """Asks the user which of the local `p1()` or the other `p2()` version to |
|
273 | """Asks the user which of the local `p1()` or the other `p2()` version to | |
272 | keep as the merged version.""" |
|
274 | keep as the merged version.""" | |
273 | ui = repo.ui |
|
275 | ui = repo.ui | |
274 | fd = fcd.path() |
|
276 | fd = fcd.path() | |
275 |
|
277 | |||
276 | # Avoid prompting during an in-memory merge since it doesn't support merge |
|
278 | # Avoid prompting during an in-memory merge since it doesn't support merge | |
277 | # conflicts. |
|
279 | # conflicts. | |
278 | if fcd.changectx().isinmemory(): |
|
280 | if fcd.changectx().isinmemory(): | |
279 | raise error.InMemoryMergeConflictsError('in-memory merge does not ' |
|
281 | raise error.InMemoryMergeConflictsError('in-memory merge does not ' | |
280 | 'support file conflicts') |
|
282 | 'support file conflicts') | |
281 |
|
283 | |||
282 | prompts = partextras(labels) |
|
284 | prompts = partextras(labels) | |
283 | prompts['fd'] = fd |
|
285 | prompts['fd'] = fd | |
284 | try: |
|
286 | try: | |
285 | if fco.isabsent(): |
|
287 | if fco.isabsent(): | |
286 | index = ui.promptchoice( |
|
288 | index = ui.promptchoice( | |
287 | _localchangedotherdeletedmsg % prompts, 2) |
|
289 | _localchangedotherdeletedmsg % prompts, 2) | |
288 | choice = ['local', 'other', 'unresolved'][index] |
|
290 | choice = ['local', 'other', 'unresolved'][index] | |
289 | elif fcd.isabsent(): |
|
291 | elif fcd.isabsent(): | |
290 | index = ui.promptchoice( |
|
292 | index = ui.promptchoice( | |
291 | _otherchangedlocaldeletedmsg % prompts, 2) |
|
293 | _otherchangedlocaldeletedmsg % prompts, 2) | |
292 | choice = ['other', 'local', 'unresolved'][index] |
|
294 | choice = ['other', 'local', 'unresolved'][index] | |
293 | else: |
|
295 | else: | |
294 | index = ui.promptchoice( |
|
296 | index = ui.promptchoice( | |
295 | _("keep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved" |
|
297 | _("keep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved" | |
296 | " for %(fd)s?" |
|
298 | " for %(fd)s?" | |
297 | "$$ &Local $$ &Other $$ &Unresolved") % prompts, 2) |
|
299 | "$$ &Local $$ &Other $$ &Unresolved") % prompts, 2) | |
298 | choice = ['local', 'other', 'unresolved'][index] |
|
300 | choice = ['local', 'other', 'unresolved'][index] | |
299 |
|
301 | |||
300 | if choice == 'other': |
|
302 | if choice == 'other': | |
301 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
303 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf, | |
302 | labels) |
|
304 | labels) | |
303 | elif choice == 'local': |
|
305 | elif choice == 'local': | |
304 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
306 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, | |
305 | labels) |
|
307 | labels) | |
306 | elif choice == 'unresolved': |
|
308 | elif choice == 'unresolved': | |
307 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
309 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, | |
308 | labels) |
|
310 | labels) | |
309 | except error.ResponseExpected: |
|
311 | except error.ResponseExpected: | |
310 | ui.write("\n") |
|
312 | ui.write("\n") | |
311 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
313 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, | |
312 | labels) |
|
314 | labels) | |
313 |
|
315 | |||
314 | @internaltool('local', nomerge) |
|
316 | @internaltool('local', nomerge) | |
315 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
317 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
316 | """Uses the local `p1()` version of files as the merged version.""" |
|
318 | """Uses the local `p1()` version of files as the merged version.""" | |
317 | return 0, fcd.isabsent() |
|
319 | return 0, fcd.isabsent() | |
318 |
|
320 | |||
319 | @internaltool('other', nomerge) |
|
321 | @internaltool('other', nomerge) | |
320 | def _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
322 | def _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
321 | """Uses the other `p2()` version of files as the merged version.""" |
|
323 | """Uses the other `p2()` version of files as the merged version.""" | |
322 | if fco.isabsent(): |
|
324 | if fco.isabsent(): | |
323 | # local changed, remote deleted -- 'deleted' picked |
|
325 | # local changed, remote deleted -- 'deleted' picked | |
324 | _underlyingfctxifabsent(fcd).remove() |
|
326 | _underlyingfctxifabsent(fcd).remove() | |
325 | deleted = True |
|
327 | deleted = True | |
326 | else: |
|
328 | else: | |
327 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) |
|
329 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
328 | deleted = False |
|
330 | deleted = False | |
329 | return 0, deleted |
|
331 | return 0, deleted | |
330 |
|
332 | |||
331 | @internaltool('fail', nomerge) |
|
333 | @internaltool('fail', nomerge) | |
332 | def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
334 | def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
333 | """ |
|
335 | """ | |
334 | Rather than attempting to merge files that were modified on both |
|
336 | Rather than attempting to merge files that were modified on both | |
335 | branches, it marks them as unresolved. The resolve command must be |
|
337 | branches, it marks them as unresolved. The resolve command must be | |
336 | used to resolve these conflicts.""" |
|
338 | used to resolve these conflicts.""" | |
337 | # for change/delete conflicts write out the changed version, then fail |
|
339 | # for change/delete conflicts write out the changed version, then fail | |
338 | if fcd.isabsent(): |
|
340 | if fcd.isabsent(): | |
339 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) |
|
341 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
340 | return 1, False |
|
342 | return 1, False | |
341 |
|
343 | |||
342 | def _underlyingfctxifabsent(filectx): |
|
344 | def _underlyingfctxifabsent(filectx): | |
343 | """Sometimes when resolving, our fcd is actually an absentfilectx, but |
|
345 | """Sometimes when resolving, our fcd is actually an absentfilectx, but | |
344 | we want to write to it (to do the resolve). This helper returns the |
|
346 | we want to write to it (to do the resolve). This helper returns the | |
345 | underyling workingfilectx in that case. |
|
347 | underyling workingfilectx in that case. | |
346 | """ |
|
348 | """ | |
347 | if filectx.isabsent(): |
|
349 | if filectx.isabsent(): | |
348 | return filectx.changectx()[filectx.path()] |
|
350 | return filectx.changectx()[filectx.path()] | |
349 | else: |
|
351 | else: | |
350 | return filectx |
|
352 | return filectx | |
351 |
|
353 | |||
352 | def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): |
|
354 | def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): | |
353 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
355 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
354 | if symlink or fcd.isabsent() or fco.isabsent(): |
|
356 | if symlink or fcd.isabsent() or fco.isabsent(): | |
355 | return 1 |
|
357 | return 1 | |
356 | unused, unused, unused, back = files |
|
358 | unused, unused, unused, back = files | |
357 |
|
359 | |||
358 | ui = repo.ui |
|
360 | ui = repo.ui | |
359 |
|
361 | |||
360 | validkeep = ['keep', 'keep-merge3'] |
|
362 | validkeep = ['keep', 'keep-merge3'] | |
361 |
|
363 | |||
362 | # do we attempt to simplemerge first? |
|
364 | # do we attempt to simplemerge first? | |
363 | try: |
|
365 | try: | |
364 | premerge = _toolbool(ui, tool, "premerge", not binary) |
|
366 | premerge = _toolbool(ui, tool, "premerge", not binary) | |
365 | except error.ConfigError: |
|
367 | except error.ConfigError: | |
366 | premerge = _toolstr(ui, tool, "premerge", "").lower() |
|
368 | premerge = _toolstr(ui, tool, "premerge", "").lower() | |
367 | if premerge not in validkeep: |
|
369 | if premerge not in validkeep: | |
368 | _valid = ', '.join(["'" + v + "'" for v in validkeep]) |
|
370 | _valid = ', '.join(["'" + v + "'" for v in validkeep]) | |
369 | raise error.ConfigError(_("%s.premerge not valid " |
|
371 | raise error.ConfigError(_("%s.premerge not valid " | |
370 | "('%s' is neither boolean nor %s)") % |
|
372 | "('%s' is neither boolean nor %s)") % | |
371 | (tool, premerge, _valid)) |
|
373 | (tool, premerge, _valid)) | |
372 |
|
374 | |||
373 | if premerge: |
|
375 | if premerge: | |
374 | if premerge == 'keep-merge3': |
|
376 | if premerge == 'keep-merge3': | |
375 | if not labels: |
|
377 | if not labels: | |
376 | labels = _defaultconflictlabels |
|
378 | labels = _defaultconflictlabels | |
377 | if len(labels) < 3: |
|
379 | if len(labels) < 3: | |
378 | labels.append('base') |
|
380 | labels.append('base') | |
379 | r = simplemerge.simplemerge(ui, fcd, fca, fco, quiet=True, label=labels) |
|
381 | r = simplemerge.simplemerge(ui, fcd, fca, fco, quiet=True, label=labels) | |
380 | if not r: |
|
382 | if not r: | |
381 | ui.debug(" premerge successful\n") |
|
383 | ui.debug(" premerge successful\n") | |
382 | return 0 |
|
384 | return 0 | |
383 | if premerge not in validkeep: |
|
385 | if premerge not in validkeep: | |
384 | # restore from backup and try again |
|
386 | # restore from backup and try again | |
385 | _restorebackup(fcd, back) |
|
387 | _restorebackup(fcd, back) | |
386 | return 1 # continue merging |
|
388 | return 1 # continue merging | |
387 |
|
389 | |||
388 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): |
|
390 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): | |
389 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
391 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
390 | if symlink: |
|
392 | if symlink: | |
391 | repo.ui.warn(_('warning: internal %s cannot merge symlinks ' |
|
393 | repo.ui.warn(_('warning: internal %s cannot merge symlinks ' | |
392 | 'for %s\n') % (tool, fcd.path())) |
|
394 | 'for %s\n') % (tool, fcd.path())) | |
393 | return False |
|
395 | return False | |
394 | if fcd.isabsent() or fco.isabsent(): |
|
396 | if fcd.isabsent() or fco.isabsent(): | |
395 | repo.ui.warn(_('warning: internal %s cannot merge change/delete ' |
|
397 | repo.ui.warn(_('warning: internal %s cannot merge change/delete ' | |
396 | 'conflict for %s\n') % (tool, fcd.path())) |
|
398 | 'conflict for %s\n') % (tool, fcd.path())) | |
397 | return False |
|
399 | return False | |
398 | return True |
|
400 | return True | |
399 |
|
401 | |||
400 | def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): |
|
402 | def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): | |
401 | """ |
|
403 | """ | |
402 | Uses the internal non-interactive simple merge algorithm for merging |
|
404 | Uses the internal non-interactive simple merge algorithm for merging | |
403 | files. It will fail if there are any conflicts and leave markers in |
|
405 | files. It will fail if there are any conflicts and leave markers in | |
404 | the partially merged file. Markers will have two sections, one for each side |
|
406 | the partially merged file. Markers will have two sections, one for each side | |
405 | of merge, unless mode equals 'union' which suppresses the markers.""" |
|
407 | of merge, unless mode equals 'union' which suppresses the markers.""" | |
406 | ui = repo.ui |
|
408 | ui = repo.ui | |
407 |
|
409 | |||
408 | r = simplemerge.simplemerge(ui, fcd, fca, fco, label=labels, mode=mode) |
|
410 | r = simplemerge.simplemerge(ui, fcd, fca, fco, label=labels, mode=mode) | |
409 | return True, r, False |
|
411 | return True, r, False | |
410 |
|
412 | |||
411 | @internaltool('union', fullmerge, |
|
413 | @internaltool('union', fullmerge, | |
412 | _("warning: conflicts while merging %s! " |
|
414 | _("warning: conflicts while merging %s! " | |
413 | "(edit, then use 'hg resolve --mark')\n"), |
|
415 | "(edit, then use 'hg resolve --mark')\n"), | |
414 | precheck=_mergecheck) |
|
416 | precheck=_mergecheck) | |
415 | def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
417 | def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
416 | """ |
|
418 | """ | |
417 | Uses the internal non-interactive simple merge algorithm for merging |
|
419 | Uses the internal non-interactive simple merge algorithm for merging | |
418 | files. It will use both left and right sides for conflict regions. |
|
420 | files. It will use both left and right sides for conflict regions. | |
419 | No markers are inserted.""" |
|
421 | No markers are inserted.""" | |
420 | return _merge(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
422 | return _merge(repo, mynode, orig, fcd, fco, fca, toolconf, | |
421 | files, labels, 'union') |
|
423 | files, labels, 'union') | |
422 |
|
424 | |||
423 | @internaltool('merge', fullmerge, |
|
425 | @internaltool('merge', fullmerge, | |
424 | _("warning: conflicts while merging %s! " |
|
426 | _("warning: conflicts while merging %s! " | |
425 | "(edit, then use 'hg resolve --mark')\n"), |
|
427 | "(edit, then use 'hg resolve --mark')\n"), | |
426 | precheck=_mergecheck) |
|
428 | precheck=_mergecheck) | |
427 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
429 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
428 | """ |
|
430 | """ | |
429 | Uses the internal non-interactive simple merge algorithm for merging |
|
431 | Uses the internal non-interactive simple merge algorithm for merging | |
430 | files. It will fail if there are any conflicts and leave markers in |
|
432 | files. It will fail if there are any conflicts and leave markers in | |
431 | the partially merged file. Markers will have two sections, one for each side |
|
433 | the partially merged file. Markers will have two sections, one for each side | |
432 | of merge.""" |
|
434 | of merge.""" | |
433 | return _merge(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
435 | return _merge(repo, mynode, orig, fcd, fco, fca, toolconf, | |
434 | files, labels, 'merge') |
|
436 | files, labels, 'merge') | |
435 |
|
437 | |||
436 | @internaltool('merge3', fullmerge, |
|
438 | @internaltool('merge3', fullmerge, | |
437 | _("warning: conflicts while merging %s! " |
|
439 | _("warning: conflicts while merging %s! " | |
438 | "(edit, then use 'hg resolve --mark')\n"), |
|
440 | "(edit, then use 'hg resolve --mark')\n"), | |
439 | precheck=_mergecheck) |
|
441 | precheck=_mergecheck) | |
440 | def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
442 | def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
441 | """ |
|
443 | """ | |
442 | Uses the internal non-interactive simple merge algorithm for merging |
|
444 | Uses the internal non-interactive simple merge algorithm for merging | |
443 | files. It will fail if there are any conflicts and leave markers in |
|
445 | files. It will fail if there are any conflicts and leave markers in | |
444 | the partially merged file. Marker will have three sections, one from each |
|
446 | the partially merged file. Marker will have three sections, one from each | |
445 | side of the merge and one for the base content.""" |
|
447 | side of the merge and one for the base content.""" | |
446 | if not labels: |
|
448 | if not labels: | |
447 | labels = _defaultconflictlabels |
|
449 | labels = _defaultconflictlabels | |
448 | if len(labels) < 3: |
|
450 | if len(labels) < 3: | |
449 | labels.append('base') |
|
451 | labels.append('base') | |
450 | return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) |
|
452 | return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) | |
451 |
|
453 | |||
452 | def _imergeauto(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
454 | def _imergeauto(repo, mynode, orig, fcd, fco, fca, toolconf, files, | |
453 | labels=None, localorother=None): |
|
455 | labels=None, localorother=None): | |
454 | """ |
|
456 | """ | |
455 | Generic driver for _imergelocal and _imergeother |
|
457 | Generic driver for _imergelocal and _imergeother | |
456 | """ |
|
458 | """ | |
457 | assert localorother is not None |
|
459 | assert localorother is not None | |
458 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
460 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
459 | r = simplemerge.simplemerge(repo.ui, fcd, fca, fco, label=labels, |
|
461 | r = simplemerge.simplemerge(repo.ui, fcd, fca, fco, label=labels, | |
460 | localorother=localorother) |
|
462 | localorother=localorother) | |
461 | return True, r |
|
463 | return True, r | |
462 |
|
464 | |||
463 | @internaltool('merge-local', mergeonly, precheck=_mergecheck) |
|
465 | @internaltool('merge-local', mergeonly, precheck=_mergecheck) | |
464 | def _imergelocal(*args, **kwargs): |
|
466 | def _imergelocal(*args, **kwargs): | |
465 | """ |
|
467 | """ | |
466 | Like :merge, but resolve all conflicts non-interactively in favor |
|
468 | Like :merge, but resolve all conflicts non-interactively in favor | |
467 | of the local `p1()` changes.""" |
|
469 | of the local `p1()` changes.""" | |
468 | success, status = _imergeauto(localorother='local', *args, **kwargs) |
|
470 | success, status = _imergeauto(localorother='local', *args, **kwargs) | |
469 | return success, status, False |
|
471 | return success, status, False | |
470 |
|
472 | |||
471 | @internaltool('merge-other', mergeonly, precheck=_mergecheck) |
|
473 | @internaltool('merge-other', mergeonly, precheck=_mergecheck) | |
472 | def _imergeother(*args, **kwargs): |
|
474 | def _imergeother(*args, **kwargs): | |
473 | """ |
|
475 | """ | |
474 | Like :merge, but resolve all conflicts non-interactively in favor |
|
476 | Like :merge, but resolve all conflicts non-interactively in favor | |
475 | of the other `p2()` changes.""" |
|
477 | of the other `p2()` changes.""" | |
476 | success, status = _imergeauto(localorother='other', *args, **kwargs) |
|
478 | success, status = _imergeauto(localorother='other', *args, **kwargs) | |
477 | return success, status, False |
|
479 | return success, status, False | |
478 |
|
480 | |||
479 | @internaltool('tagmerge', mergeonly, |
|
481 | @internaltool('tagmerge', mergeonly, | |
480 | _("automatic tag merging of %s failed! " |
|
482 | _("automatic tag merging of %s failed! " | |
481 | "(use 'hg resolve --tool :merge' or another merge " |
|
483 | "(use 'hg resolve --tool :merge' or another merge " | |
482 | "tool of your choice)\n")) |
|
484 | "tool of your choice)\n")) | |
483 | def _itagmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
485 | def _itagmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
484 | """ |
|
486 | """ | |
485 | Uses the internal tag merge algorithm (experimental). |
|
487 | Uses the internal tag merge algorithm (experimental). | |
486 | """ |
|
488 | """ | |
487 | success, status = tagmerge.merge(repo, fcd, fco, fca) |
|
489 | success, status = tagmerge.merge(repo, fcd, fco, fca) | |
488 | return success, status, False |
|
490 | return success, status, False | |
489 |
|
491 | |||
490 | @internaltool('dump', fullmerge, binary=True, symlink=True) |
|
492 | @internaltool('dump', fullmerge, binary=True, symlink=True) | |
491 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
493 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
492 | """ |
|
494 | """ | |
493 | Creates three versions of the files to merge, containing the |
|
495 | Creates three versions of the files to merge, containing the | |
494 | contents of local, other and base. These files can then be used to |
|
496 | contents of local, other and base. These files can then be used to | |
495 | perform a merge manually. If the file to be merged is named |
|
497 | perform a merge manually. If the file to be merged is named | |
496 | ``a.txt``, these files will accordingly be named ``a.txt.local``, |
|
498 | ``a.txt``, these files will accordingly be named ``a.txt.local``, | |
497 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
|
499 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the | |
498 | same directory as ``a.txt``. |
|
500 | same directory as ``a.txt``. | |
499 |
|
501 | |||
500 | This implies premerge. Therefore, files aren't dumped, if premerge |
|
502 | This implies premerge. Therefore, files aren't dumped, if premerge | |
501 | runs successfully. Use :forcedump to forcibly write files out. |
|
503 | runs successfully. Use :forcedump to forcibly write files out. | |
502 | """ |
|
504 | """ | |
503 | a = _workingpath(repo, fcd) |
|
505 | a = _workingpath(repo, fcd) | |
504 | fd = fcd.path() |
|
506 | fd = fcd.path() | |
505 |
|
507 | |||
506 | from . import context |
|
508 | from . import context | |
507 | if isinstance(fcd, context.overlayworkingfilectx): |
|
509 | if isinstance(fcd, context.overlayworkingfilectx): | |
508 | raise error.InMemoryMergeConflictsError('in-memory merge does not ' |
|
510 | raise error.InMemoryMergeConflictsError('in-memory merge does not ' | |
509 | 'support the :dump tool.') |
|
511 | 'support the :dump tool.') | |
510 |
|
512 | |||
511 | util.writefile(a + ".local", fcd.decodeddata()) |
|
513 | util.writefile(a + ".local", fcd.decodeddata()) | |
512 | repo.wwrite(fd + ".other", fco.data(), fco.flags()) |
|
514 | repo.wwrite(fd + ".other", fco.data(), fco.flags()) | |
513 | repo.wwrite(fd + ".base", fca.data(), fca.flags()) |
|
515 | repo.wwrite(fd + ".base", fca.data(), fca.flags()) | |
514 | return False, 1, False |
|
516 | return False, 1, False | |
515 |
|
517 | |||
516 | @internaltool('forcedump', mergeonly, binary=True, symlink=True) |
|
518 | @internaltool('forcedump', mergeonly, binary=True, symlink=True) | |
517 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
519 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, | |
518 | labels=None): |
|
520 | labels=None): | |
519 | """ |
|
521 | """ | |
520 | Creates three versions of the files as same as :dump, but omits premerge. |
|
522 | Creates three versions of the files as same as :dump, but omits premerge. | |
521 | """ |
|
523 | """ | |
522 | return _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
524 | return _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, | |
523 | labels=labels) |
|
525 | labels=labels) | |
524 |
|
526 | |||
525 | def _xmergeimm(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
527 | def _xmergeimm(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
526 | # In-memory merge simply raises an exception on all external merge tools, |
|
528 | # In-memory merge simply raises an exception on all external merge tools, | |
527 | # for now. |
|
529 | # for now. | |
528 | # |
|
530 | # | |
529 | # It would be possible to run most tools with temporary files, but this |
|
531 | # It would be possible to run most tools with temporary files, but this | |
530 | # raises the question of what to do if the user only partially resolves the |
|
532 | # raises the question of what to do if the user only partially resolves the | |
531 | # file -- we can't leave a merge state. (Copy to somewhere in the .hg/ |
|
533 | # file -- we can't leave a merge state. (Copy to somewhere in the .hg/ | |
532 | # directory and tell the user how to get it is my best idea, but it's |
|
534 | # directory and tell the user how to get it is my best idea, but it's | |
533 | # clunky.) |
|
535 | # clunky.) | |
534 | raise error.InMemoryMergeConflictsError('in-memory merge does not support ' |
|
536 | raise error.InMemoryMergeConflictsError('in-memory merge does not support ' | |
535 | 'external merge tools') |
|
537 | 'external merge tools') | |
536 |
|
538 | |||
537 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
539 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
538 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
540 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
539 | if fcd.isabsent() or fco.isabsent(): |
|
541 | if fcd.isabsent() or fco.isabsent(): | |
540 | repo.ui.warn(_('warning: %s cannot merge change/delete conflict ' |
|
542 | repo.ui.warn(_('warning: %s cannot merge change/delete conflict ' | |
541 | 'for %s\n') % (tool, fcd.path())) |
|
543 | 'for %s\n') % (tool, fcd.path())) | |
542 | return False, 1, None |
|
544 | return False, 1, None | |
543 | unused, unused, unused, back = files |
|
545 | unused, unused, unused, back = files | |
544 | localpath = _workingpath(repo, fcd) |
|
546 | localpath = _workingpath(repo, fcd) | |
545 | args = _toolstr(repo.ui, tool, "args") |
|
547 | args = _toolstr(repo.ui, tool, "args") | |
546 |
|
548 | |||
547 | with _maketempfiles(repo, fco, fca, repo.wvfs.join(back.path()), |
|
549 | with _maketempfiles(repo, fco, fca, repo.wvfs.join(back.path()), | |
548 | "$output" in args) as temppaths: |
|
550 | "$output" in args) as temppaths: | |
549 | basepath, otherpath, localoutputpath = temppaths |
|
551 | basepath, otherpath, localoutputpath = temppaths | |
550 | outpath = "" |
|
552 | outpath = "" | |
551 | mylabel, otherlabel = labels[:2] |
|
553 | mylabel, otherlabel = labels[:2] | |
552 | if len(labels) >= 3: |
|
554 | if len(labels) >= 3: | |
553 | baselabel = labels[2] |
|
555 | baselabel = labels[2] | |
554 | else: |
|
556 | else: | |
555 | baselabel = 'base' |
|
557 | baselabel = 'base' | |
556 | env = {'HG_FILE': fcd.path(), |
|
558 | env = {'HG_FILE': fcd.path(), | |
557 | 'HG_MY_NODE': short(mynode), |
|
559 | 'HG_MY_NODE': short(mynode), | |
558 | 'HG_OTHER_NODE': short(fco.changectx().node()), |
|
560 | 'HG_OTHER_NODE': short(fco.changectx().node()), | |
559 | 'HG_BASE_NODE': short(fca.changectx().node()), |
|
561 | 'HG_BASE_NODE': short(fca.changectx().node()), | |
560 | 'HG_MY_ISLINK': 'l' in fcd.flags(), |
|
562 | 'HG_MY_ISLINK': 'l' in fcd.flags(), | |
561 | 'HG_OTHER_ISLINK': 'l' in fco.flags(), |
|
563 | 'HG_OTHER_ISLINK': 'l' in fco.flags(), | |
562 | 'HG_BASE_ISLINK': 'l' in fca.flags(), |
|
564 | 'HG_BASE_ISLINK': 'l' in fca.flags(), | |
563 | 'HG_MY_LABEL': mylabel, |
|
565 | 'HG_MY_LABEL': mylabel, | |
564 | 'HG_OTHER_LABEL': otherlabel, |
|
566 | 'HG_OTHER_LABEL': otherlabel, | |
565 | 'HG_BASE_LABEL': baselabel, |
|
567 | 'HG_BASE_LABEL': baselabel, | |
566 | } |
|
568 | } | |
567 | ui = repo.ui |
|
569 | ui = repo.ui | |
568 |
|
570 | |||
569 | if "$output" in args: |
|
571 | if "$output" in args: | |
570 | # read input from backup, write to original |
|
572 | # read input from backup, write to original | |
571 | outpath = localpath |
|
573 | outpath = localpath | |
572 | localpath = localoutputpath |
|
574 | localpath = localoutputpath | |
573 | replace = {'local': localpath, 'base': basepath, 'other': otherpath, |
|
575 | replace = {'local': localpath, 'base': basepath, 'other': otherpath, | |
574 | 'output': outpath, 'labellocal': mylabel, |
|
576 | 'output': outpath, 'labellocal': mylabel, | |
575 | 'labelother': otherlabel, 'labelbase': baselabel} |
|
577 | 'labelother': otherlabel, 'labelbase': baselabel} | |
576 | args = util.interpolate( |
|
578 | args = util.interpolate( | |
577 | br'\$', replace, args, |
|
579 | br'\$', replace, args, | |
578 | lambda s: procutil.shellquote(util.localpath(s))) |
|
580 | lambda s: procutil.shellquote(util.localpath(s))) | |
579 | if _toolbool(ui, tool, "gui"): |
|
581 | if _toolbool(ui, tool, "gui"): | |
580 | repo.ui.status(_('running merge tool %s for file %s\n') % |
|
582 | repo.ui.status(_('running merge tool %s for file %s\n') % | |
581 | (tool, fcd.path())) |
|
583 | (tool, fcd.path())) | |
582 | if scriptfn is None: |
|
584 | if scriptfn is None: | |
583 | cmd = toolpath + ' ' + args |
|
585 | cmd = toolpath + ' ' + args | |
584 | repo.ui.debug('launching merge tool: %s\n' % cmd) |
|
586 | repo.ui.debug('launching merge tool: %s\n' % cmd) | |
585 | r = ui.system(cmd, cwd=repo.root, environ=env, |
|
587 | r = ui.system(cmd, cwd=repo.root, environ=env, | |
586 | blockedtag='mergetool') |
|
588 | blockedtag='mergetool') | |
587 | else: |
|
589 | else: | |
588 | repo.ui.debug('launching python merge script: %s:%s\n' % |
|
590 | repo.ui.debug('launching python merge script: %s:%s\n' % | |
589 | (toolpath, scriptfn)) |
|
591 | (toolpath, scriptfn)) | |
590 | r = 0 |
|
592 | r = 0 | |
591 | try: |
|
593 | try: | |
592 | # avoid cycle cmdutil->merge->filemerge->extensions->cmdutil |
|
594 | # avoid cycle cmdutil->merge->filemerge->extensions->cmdutil | |
593 | from . import extensions |
|
595 | from . import extensions | |
594 | mod = extensions.loadpath(toolpath, 'hgmerge.%s' % tool) |
|
596 | mod = extensions.loadpath(toolpath, 'hgmerge.%s' % tool) | |
595 | except Exception: |
|
597 | except Exception: | |
596 | raise error.Abort(_("loading python merge script failed: %s") % |
|
598 | raise error.Abort(_("loading python merge script failed: %s") % | |
597 | toolpath) |
|
599 | toolpath) | |
598 | mergefn = getattr(mod, scriptfn, None) |
|
600 | mergefn = getattr(mod, scriptfn, None) | |
599 | if mergefn is None: |
|
601 | if mergefn is None: | |
600 | raise error.Abort(_("%s does not have function: %s") % |
|
602 | raise error.Abort(_("%s does not have function: %s") % | |
601 | (toolpath, scriptfn)) |
|
603 | (toolpath, scriptfn)) | |
602 | argslist = procutil.shellsplit(args) |
|
604 | argslist = procutil.shellsplit(args) | |
603 | # avoid cycle cmdutil->merge->filemerge->hook->extensions->cmdutil |
|
605 | # avoid cycle cmdutil->merge->filemerge->hook->extensions->cmdutil | |
604 | from . import hook |
|
606 | from . import hook | |
605 | ret, raised = hook.pythonhook(ui, repo, "merge", toolpath, |
|
607 | ret, raised = hook.pythonhook(ui, repo, "merge", toolpath, | |
606 | mergefn, {'args': argslist}, True) |
|
608 | mergefn, {'args': argslist}, True) | |
607 | if raised: |
|
609 | if raised: | |
608 | r = 1 |
|
610 | r = 1 | |
609 | repo.ui.debug('merge tool returned: %d\n' % r) |
|
611 | repo.ui.debug('merge tool returned: %d\n' % r) | |
610 | return True, r, False |
|
612 | return True, r, False | |
611 |
|
613 | |||
612 | def _formatconflictmarker(ctx, template, label, pad): |
|
614 | def _formatconflictmarker(ctx, template, label, pad): | |
613 | """Applies the given template to the ctx, prefixed by the label. |
|
615 | """Applies the given template to the ctx, prefixed by the label. | |
614 |
|
616 | |||
615 | Pad is the minimum width of the label prefix, so that multiple markers |
|
617 | Pad is the minimum width of the label prefix, so that multiple markers | |
616 | can have aligned templated parts. |
|
618 | can have aligned templated parts. | |
617 | """ |
|
619 | """ | |
618 | if ctx.node() is None: |
|
620 | if ctx.node() is None: | |
619 | ctx = ctx.p1() |
|
621 | ctx = ctx.p1() | |
620 |
|
622 | |||
621 | props = {'ctx': ctx} |
|
623 | props = {'ctx': ctx} | |
622 | templateresult = template.renderdefault(props) |
|
624 | templateresult = template.renderdefault(props) | |
623 |
|
625 | |||
624 | label = ('%s:' % label).ljust(pad + 1) |
|
626 | label = ('%s:' % label).ljust(pad + 1) | |
625 | mark = '%s %s' % (label, templateresult) |
|
627 | mark = '%s %s' % (label, templateresult) | |
626 |
|
628 | |||
627 | if mark: |
|
629 | if mark: | |
628 | mark = mark.splitlines()[0] # split for safety |
|
630 | mark = mark.splitlines()[0] # split for safety | |
629 |
|
631 | |||
630 | # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') |
|
632 | # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') | |
631 | return stringutil.ellipsis(mark, 80 - 8) |
|
633 | return stringutil.ellipsis(mark, 80 - 8) | |
632 |
|
634 | |||
633 | _defaultconflictlabels = ['local', 'other'] |
|
635 | _defaultconflictlabels = ['local', 'other'] | |
634 |
|
636 | |||
635 | def _formatlabels(repo, fcd, fco, fca, labels, tool=None): |
|
637 | def _formatlabels(repo, fcd, fco, fca, labels, tool=None): | |
636 | """Formats the given labels using the conflict marker template. |
|
638 | """Formats the given labels using the conflict marker template. | |
637 |
|
639 | |||
638 | Returns a list of formatted labels. |
|
640 | Returns a list of formatted labels. | |
639 | """ |
|
641 | """ | |
640 | cd = fcd.changectx() |
|
642 | cd = fcd.changectx() | |
641 | co = fco.changectx() |
|
643 | co = fco.changectx() | |
642 | ca = fca.changectx() |
|
644 | ca = fca.changectx() | |
643 |
|
645 | |||
644 | ui = repo.ui |
|
646 | ui = repo.ui | |
645 | template = ui.config('ui', 'mergemarkertemplate') |
|
647 | template = ui.config('ui', 'mergemarkertemplate') | |
646 | if tool is not None: |
|
648 | if tool is not None: | |
647 | template = _toolstr(ui, tool, 'mergemarkertemplate', template) |
|
649 | template = _toolstr(ui, tool, 'mergemarkertemplate', template) | |
648 | template = templater.unquotestring(template) |
|
650 | template = templater.unquotestring(template) | |
649 | tres = formatter.templateresources(ui, repo) |
|
651 | tres = formatter.templateresources(ui, repo) | |
650 | tmpl = formatter.maketemplater(ui, template, defaults=templatekw.keywords, |
|
652 | tmpl = formatter.maketemplater(ui, template, defaults=templatekw.keywords, | |
651 | resources=tres) |
|
653 | resources=tres) | |
652 |
|
654 | |||
653 | pad = max(len(l) for l in labels) |
|
655 | pad = max(len(l) for l in labels) | |
654 |
|
656 | |||
655 | newlabels = [_formatconflictmarker(cd, tmpl, labels[0], pad), |
|
657 | newlabels = [_formatconflictmarker(cd, tmpl, labels[0], pad), | |
656 | _formatconflictmarker(co, tmpl, labels[1], pad)] |
|
658 | _formatconflictmarker(co, tmpl, labels[1], pad)] | |
657 | if len(labels) > 2: |
|
659 | if len(labels) > 2: | |
658 | newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) |
|
660 | newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) | |
659 | return newlabels |
|
661 | return newlabels | |
660 |
|
662 | |||
661 | def partextras(labels): |
|
663 | def partextras(labels): | |
662 | """Return a dictionary of extra labels for use in prompts to the user |
|
664 | """Return a dictionary of extra labels for use in prompts to the user | |
663 |
|
665 | |||
664 | Intended use is in strings of the form "(l)ocal%(l)s". |
|
666 | Intended use is in strings of the form "(l)ocal%(l)s". | |
665 | """ |
|
667 | """ | |
666 | if labels is None: |
|
668 | if labels is None: | |
667 | return { |
|
669 | return { | |
668 | "l": "", |
|
670 | "l": "", | |
669 | "o": "", |
|
671 | "o": "", | |
670 | } |
|
672 | } | |
671 |
|
673 | |||
672 | return { |
|
674 | return { | |
673 | "l": " [%s]" % labels[0], |
|
675 | "l": " [%s]" % labels[0], | |
674 | "o": " [%s]" % labels[1], |
|
676 | "o": " [%s]" % labels[1], | |
675 | } |
|
677 | } | |
676 |
|
678 | |||
677 | def _restorebackup(fcd, back): |
|
679 | def _restorebackup(fcd, back): | |
678 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use |
|
680 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use | |
679 | # util.copy here instead. |
|
681 | # util.copy here instead. | |
680 | fcd.write(back.data(), fcd.flags()) |
|
682 | fcd.write(back.data(), fcd.flags()) | |
681 |
|
683 | |||
682 | def _makebackup(repo, ui, wctx, fcd, premerge): |
|
684 | def _makebackup(repo, ui, wctx, fcd, premerge): | |
683 | """Makes and returns a filectx-like object for ``fcd``'s backup file. |
|
685 | """Makes and returns a filectx-like object for ``fcd``'s backup file. | |
684 |
|
686 | |||
685 | In addition to preserving the user's pre-existing modifications to `fcd` |
|
687 | In addition to preserving the user's pre-existing modifications to `fcd` | |
686 | (if any), the backup is used to undo certain premerges, confirm whether a |
|
688 | (if any), the backup is used to undo certain premerges, confirm whether a | |
687 | merge changed anything, and determine what line endings the new file should |
|
689 | merge changed anything, and determine what line endings the new file should | |
688 | have. |
|
690 | have. | |
689 |
|
691 | |||
690 | Backups only need to be written once (right before the premerge) since their |
|
692 | Backups only need to be written once (right before the premerge) since their | |
691 | content doesn't change afterwards. |
|
693 | content doesn't change afterwards. | |
692 | """ |
|
694 | """ | |
693 | if fcd.isabsent(): |
|
695 | if fcd.isabsent(): | |
694 | return None |
|
696 | return None | |
695 | # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset -> |
|
697 | # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset -> | |
696 | # merge -> filemerge). (I suspect the fileset import is the weakest link) |
|
698 | # merge -> filemerge). (I suspect the fileset import is the weakest link) | |
697 | from . import context |
|
699 | from . import context | |
698 | a = _workingpath(repo, fcd) |
|
700 | a = _workingpath(repo, fcd) | |
699 | back = scmutil.origpath(ui, repo, a) |
|
701 | back = scmutil.origpath(ui, repo, a) | |
700 | inworkingdir = (back.startswith(repo.wvfs.base) and not |
|
702 | inworkingdir = (back.startswith(repo.wvfs.base) and not | |
701 | back.startswith(repo.vfs.base)) |
|
703 | back.startswith(repo.vfs.base)) | |
702 | if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: |
|
704 | if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: | |
703 | # If the backup file is to be in the working directory, and we're |
|
705 | # If the backup file is to be in the working directory, and we're | |
704 | # merging in-memory, we must redirect the backup to the memory context |
|
706 | # merging in-memory, we must redirect the backup to the memory context | |
705 | # so we don't disturb the working directory. |
|
707 | # so we don't disturb the working directory. | |
706 | relpath = back[len(repo.wvfs.base) + 1:] |
|
708 | relpath = back[len(repo.wvfs.base) + 1:] | |
707 | if premerge: |
|
709 | if premerge: | |
708 | wctx[relpath].write(fcd.data(), fcd.flags()) |
|
710 | wctx[relpath].write(fcd.data(), fcd.flags()) | |
709 | return wctx[relpath] |
|
711 | return wctx[relpath] | |
710 | else: |
|
712 | else: | |
711 | if premerge: |
|
713 | if premerge: | |
712 | # Otherwise, write to wherever path the user specified the backups |
|
714 | # Otherwise, write to wherever path the user specified the backups | |
713 | # should go. We still need to switch based on whether the source is |
|
715 | # should go. We still need to switch based on whether the source is | |
714 | # in-memory so we can use the fast path of ``util.copy`` if both are |
|
716 | # in-memory so we can use the fast path of ``util.copy`` if both are | |
715 | # on disk. |
|
717 | # on disk. | |
716 | if isinstance(fcd, context.overlayworkingfilectx): |
|
718 | if isinstance(fcd, context.overlayworkingfilectx): | |
717 | util.writefile(back, fcd.data()) |
|
719 | util.writefile(back, fcd.data()) | |
718 | else: |
|
720 | else: | |
719 | util.copyfile(a, back) |
|
721 | util.copyfile(a, back) | |
720 | # A arbitraryfilectx is returned, so we can run the same functions on |
|
722 | # A arbitraryfilectx is returned, so we can run the same functions on | |
721 | # the backup context regardless of where it lives. |
|
723 | # the backup context regardless of where it lives. | |
722 | return context.arbitraryfilectx(back, repo=repo) |
|
724 | return context.arbitraryfilectx(back, repo=repo) | |
723 |
|
725 | |||
724 | @contextlib.contextmanager |
|
726 | @contextlib.contextmanager | |
725 | def _maketempfiles(repo, fco, fca, localpath, uselocalpath): |
|
727 | def _maketempfiles(repo, fco, fca, localpath, uselocalpath): | |
726 | """Writes out `fco` and `fca` as temporary files, and (if uselocalpath) |
|
728 | """Writes out `fco` and `fca` as temporary files, and (if uselocalpath) | |
727 | copies `localpath` to another temporary file, so an external merge tool may |
|
729 | copies `localpath` to another temporary file, so an external merge tool may | |
728 | use them. |
|
730 | use them. | |
729 | """ |
|
731 | """ | |
730 | tmproot = None |
|
732 | tmproot = None | |
731 | tmprootprefix = repo.ui.config('experimental', 'mergetempdirprefix') |
|
733 | tmprootprefix = repo.ui.config('experimental', 'mergetempdirprefix') | |
732 | if tmprootprefix: |
|
734 | if tmprootprefix: | |
733 | tmproot = pycompat.mkdtemp(prefix=tmprootprefix) |
|
735 | tmproot = pycompat.mkdtemp(prefix=tmprootprefix) | |
734 |
|
736 | |||
735 | def maketempfrompath(prefix, path): |
|
737 | def maketempfrompath(prefix, path): | |
736 | fullbase, ext = os.path.splitext(path) |
|
738 | fullbase, ext = os.path.splitext(path) | |
737 | pre = "%s~%s" % (os.path.basename(fullbase), prefix) |
|
739 | pre = "%s~%s" % (os.path.basename(fullbase), prefix) | |
738 | if tmproot: |
|
740 | if tmproot: | |
739 | name = os.path.join(tmproot, pre) |
|
741 | name = os.path.join(tmproot, pre) | |
740 | if ext: |
|
742 | if ext: | |
741 | name += ext |
|
743 | name += ext | |
742 | f = open(name, r"wb") |
|
744 | f = open(name, r"wb") | |
743 | else: |
|
745 | else: | |
744 | fd, name = pycompat.mkstemp(prefix=pre + '.', suffix=ext) |
|
746 | fd, name = pycompat.mkstemp(prefix=pre + '.', suffix=ext) | |
745 | f = os.fdopen(fd, r"wb") |
|
747 | f = os.fdopen(fd, r"wb") | |
746 | return f, name |
|
748 | return f, name | |
747 |
|
749 | |||
748 | def tempfromcontext(prefix, ctx): |
|
750 | def tempfromcontext(prefix, ctx): | |
749 | f, name = maketempfrompath(prefix, ctx.path()) |
|
751 | f, name = maketempfrompath(prefix, ctx.path()) | |
750 | data = repo.wwritedata(ctx.path(), ctx.data()) |
|
752 | data = repo.wwritedata(ctx.path(), ctx.data()) | |
751 | f.write(data) |
|
753 | f.write(data) | |
752 | f.close() |
|
754 | f.close() | |
753 | return name |
|
755 | return name | |
754 |
|
756 | |||
755 | b = tempfromcontext("base", fca) |
|
757 | b = tempfromcontext("base", fca) | |
756 | c = tempfromcontext("other", fco) |
|
758 | c = tempfromcontext("other", fco) | |
757 | d = localpath |
|
759 | d = localpath | |
758 | if uselocalpath: |
|
760 | if uselocalpath: | |
759 | # We start off with this being the backup filename, so remove the .orig |
|
761 | # We start off with this being the backup filename, so remove the .orig | |
760 | # to make syntax-highlighting more likely. |
|
762 | # to make syntax-highlighting more likely. | |
761 | if d.endswith('.orig'): |
|
763 | if d.endswith('.orig'): | |
762 | d, _ = os.path.splitext(d) |
|
764 | d, _ = os.path.splitext(d) | |
763 | f, d = maketempfrompath("local", d) |
|
765 | f, d = maketempfrompath("local", d) | |
764 | with open(localpath, 'rb') as src: |
|
766 | with open(localpath, 'rb') as src: | |
765 | f.write(src.read()) |
|
767 | f.write(src.read()) | |
766 | f.close() |
|
768 | f.close() | |
767 |
|
769 | |||
768 | try: |
|
770 | try: | |
769 | yield b, c, d |
|
771 | yield b, c, d | |
770 | finally: |
|
772 | finally: | |
771 | if tmproot: |
|
773 | if tmproot: | |
772 | shutil.rmtree(tmproot) |
|
774 | shutil.rmtree(tmproot) | |
773 | else: |
|
775 | else: | |
774 | util.unlink(b) |
|
776 | util.unlink(b) | |
775 | util.unlink(c) |
|
777 | util.unlink(c) | |
776 | # if not uselocalpath, d is the 'orig'/backup file which we |
|
778 | # if not uselocalpath, d is the 'orig'/backup file which we | |
777 | # shouldn't delete. |
|
779 | # shouldn't delete. | |
778 | if d and uselocalpath: |
|
780 | if d and uselocalpath: | |
779 | util.unlink(d) |
|
781 | util.unlink(d) | |
780 |
|
782 | |||
781 | def _filemerge(premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
783 | def _filemerge(premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
782 | """perform a 3-way merge in the working directory |
|
784 | """perform a 3-way merge in the working directory | |
783 |
|
785 | |||
784 | premerge = whether this is a premerge |
|
786 | premerge = whether this is a premerge | |
785 | mynode = parent node before merge |
|
787 | mynode = parent node before merge | |
786 | orig = original local filename before merge |
|
788 | orig = original local filename before merge | |
787 | fco = other file context |
|
789 | fco = other file context | |
788 | fca = ancestor file context |
|
790 | fca = ancestor file context | |
789 | fcd = local file context for current/destination file |
|
791 | fcd = local file context for current/destination file | |
790 |
|
792 | |||
791 | Returns whether the merge is complete, the return value of the merge, and |
|
793 | Returns whether the merge is complete, the return value of the merge, and | |
792 | a boolean indicating whether the file was deleted from disk.""" |
|
794 | a boolean indicating whether the file was deleted from disk.""" | |
793 |
|
795 | |||
794 | if not fco.cmp(fcd): # files identical? |
|
796 | if not fco.cmp(fcd): # files identical? | |
795 | return True, None, False |
|
797 | return True, None, False | |
796 |
|
798 | |||
797 | ui = repo.ui |
|
799 | ui = repo.ui | |
798 | fd = fcd.path() |
|
800 | fd = fcd.path() | |
799 | binary = fcd.isbinary() or fco.isbinary() or fca.isbinary() |
|
801 | binary = fcd.isbinary() or fco.isbinary() or fca.isbinary() | |
800 | symlink = 'l' in fcd.flags() + fco.flags() |
|
802 | symlink = 'l' in fcd.flags() + fco.flags() | |
801 | changedelete = fcd.isabsent() or fco.isabsent() |
|
803 | changedelete = fcd.isabsent() or fco.isabsent() | |
802 | tool, toolpath = _picktool(repo, ui, fd, binary, symlink, changedelete) |
|
804 | tool, toolpath = _picktool(repo, ui, fd, binary, symlink, changedelete) | |
803 | scriptfn = None |
|
805 | scriptfn = None | |
804 | if tool in internals and tool.startswith('internal:'): |
|
806 | if tool in internals and tool.startswith('internal:'): | |
805 | # normalize to new-style names (':merge' etc) |
|
807 | # normalize to new-style names (':merge' etc) | |
806 | tool = tool[len('internal'):] |
|
808 | tool = tool[len('internal'):] | |
807 | if toolpath and toolpath.startswith('python:'): |
|
809 | if toolpath and toolpath.startswith('python:'): | |
808 | invalidsyntax = False |
|
810 | invalidsyntax = False | |
809 | if toolpath.count(':') >= 2: |
|
811 | if toolpath.count(':') >= 2: | |
810 | script, scriptfn = toolpath[7:].rsplit(':', 1) |
|
812 | script, scriptfn = toolpath[7:].rsplit(':', 1) | |
811 | if not scriptfn: |
|
813 | if not scriptfn: | |
812 | invalidsyntax = True |
|
814 | invalidsyntax = True | |
813 | # missing :callable can lead to spliting on windows drive letter |
|
815 | # missing :callable can lead to spliting on windows drive letter | |
814 | if '\\' in scriptfn or '/' in scriptfn: |
|
816 | if '\\' in scriptfn or '/' in scriptfn: | |
815 | invalidsyntax = True |
|
817 | invalidsyntax = True | |
816 | else: |
|
818 | else: | |
817 | invalidsyntax = True |
|
819 | invalidsyntax = True | |
818 | if invalidsyntax: |
|
820 | if invalidsyntax: | |
819 | raise error.Abort(_("invalid 'python:' syntax: %s") % toolpath) |
|
821 | raise error.Abort(_("invalid 'python:' syntax: %s") % toolpath) | |
820 | toolpath = script |
|
822 | toolpath = script | |
821 | ui.debug("picked tool '%s' for %s (binary %s symlink %s changedelete %s)\n" |
|
823 | ui.debug("picked tool '%s' for %s (binary %s symlink %s changedelete %s)\n" | |
822 | % (tool, fd, pycompat.bytestr(binary), pycompat.bytestr(symlink), |
|
824 | % (tool, fd, pycompat.bytestr(binary), pycompat.bytestr(symlink), | |
823 | pycompat.bytestr(changedelete))) |
|
825 | pycompat.bytestr(changedelete))) | |
824 |
|
826 | |||
825 | if tool in internals: |
|
827 | if tool in internals: | |
826 | func = internals[tool] |
|
828 | func = internals[tool] | |
827 | mergetype = func.mergetype |
|
829 | mergetype = func.mergetype | |
828 | onfailure = func.onfailure |
|
830 | onfailure = func.onfailure | |
829 | precheck = func.precheck |
|
831 | precheck = func.precheck | |
830 | isexternal = False |
|
832 | isexternal = False | |
831 | else: |
|
833 | else: | |
832 | if wctx.isinmemory(): |
|
834 | if wctx.isinmemory(): | |
833 | func = _xmergeimm |
|
835 | func = _xmergeimm | |
834 | else: |
|
836 | else: | |
835 | func = _xmerge |
|
837 | func = _xmerge | |
836 | mergetype = fullmerge |
|
838 | mergetype = fullmerge | |
837 | onfailure = _("merging %s failed!\n") |
|
839 | onfailure = _("merging %s failed!\n") | |
838 | precheck = None |
|
840 | precheck = None | |
839 | isexternal = True |
|
841 | isexternal = True | |
840 |
|
842 | |||
841 | toolconf = tool, toolpath, binary, symlink, scriptfn |
|
843 | toolconf = tool, toolpath, binary, symlink, scriptfn | |
842 |
|
844 | |||
843 | if mergetype == nomerge: |
|
845 | if mergetype == nomerge: | |
844 | r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
846 | r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
845 | return True, r, deleted |
|
847 | return True, r, deleted | |
846 |
|
848 | |||
847 | if premerge: |
|
849 | if premerge: | |
848 | if orig != fco.path(): |
|
850 | if orig != fco.path(): | |
849 | ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) |
|
851 | ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) | |
850 | else: |
|
852 | else: | |
851 | ui.status(_("merging %s\n") % fd) |
|
853 | ui.status(_("merging %s\n") % fd) | |
852 |
|
854 | |||
853 | ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) |
|
855 | ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) | |
854 |
|
856 | |||
855 | if precheck and not precheck(repo, mynode, orig, fcd, fco, fca, |
|
857 | if precheck and not precheck(repo, mynode, orig, fcd, fco, fca, | |
856 | toolconf): |
|
858 | toolconf): | |
857 | if onfailure: |
|
859 | if onfailure: | |
858 | if wctx.isinmemory(): |
|
860 | if wctx.isinmemory(): | |
859 | raise error.InMemoryMergeConflictsError('in-memory merge does ' |
|
861 | raise error.InMemoryMergeConflictsError('in-memory merge does ' | |
860 | 'not support merge ' |
|
862 | 'not support merge ' | |
861 | 'conflicts') |
|
863 | 'conflicts') | |
862 | ui.warn(onfailure % fd) |
|
864 | ui.warn(onfailure % fd) | |
863 | return True, 1, False |
|
865 | return True, 1, False | |
864 |
|
866 | |||
865 | back = _makebackup(repo, ui, wctx, fcd, premerge) |
|
867 | back = _makebackup(repo, ui, wctx, fcd, premerge) | |
866 | files = (None, None, None, back) |
|
868 | files = (None, None, None, back) | |
867 | r = 1 |
|
869 | r = 1 | |
868 | try: |
|
870 | try: | |
869 | internalmarkerstyle = ui.config('ui', 'mergemarkers') |
|
871 | internalmarkerstyle = ui.config('ui', 'mergemarkers') | |
870 | if isexternal: |
|
872 | if isexternal: | |
871 | markerstyle = _toolstr(ui, tool, 'mergemarkers') |
|
873 | markerstyle = _toolstr(ui, tool, 'mergemarkers') | |
872 | else: |
|
874 | else: | |
873 | markerstyle = internalmarkerstyle |
|
875 | markerstyle = internalmarkerstyle | |
874 |
|
876 | |||
875 | if not labels: |
|
877 | if not labels: | |
876 | labels = _defaultconflictlabels |
|
878 | labels = _defaultconflictlabels | |
877 | formattedlabels = labels |
|
879 | formattedlabels = labels | |
878 | if markerstyle != 'basic': |
|
880 | if markerstyle != 'basic': | |
879 | formattedlabels = _formatlabels(repo, fcd, fco, fca, labels, |
|
881 | formattedlabels = _formatlabels(repo, fcd, fco, fca, labels, | |
880 | tool=tool) |
|
882 | tool=tool) | |
881 |
|
883 | |||
882 | if premerge and mergetype == fullmerge: |
|
884 | if premerge and mergetype == fullmerge: | |
883 | # conflict markers generated by premerge will use 'detailed' |
|
885 | # conflict markers generated by premerge will use 'detailed' | |
884 | # settings if either ui.mergemarkers or the tool's mergemarkers |
|
886 | # settings if either ui.mergemarkers or the tool's mergemarkers | |
885 | # setting is 'detailed'. This way tools can have basic labels in |
|
887 | # setting is 'detailed'. This way tools can have basic labels in | |
886 | # space-constrained areas of the UI, but still get full information |
|
888 | # space-constrained areas of the UI, but still get full information | |
887 | # in conflict markers if premerge is 'keep' or 'keep-merge3'. |
|
889 | # in conflict markers if premerge is 'keep' or 'keep-merge3'. | |
888 | premergelabels = labels |
|
890 | premergelabels = labels | |
889 | labeltool = None |
|
891 | labeltool = None | |
890 | if markerstyle != 'basic': |
|
892 | if markerstyle != 'basic': | |
891 | # respect 'tool's mergemarkertemplate (which defaults to |
|
893 | # respect 'tool's mergemarkertemplate (which defaults to | |
892 | # ui.mergemarkertemplate) |
|
894 | # ui.mergemarkertemplate) | |
893 | labeltool = tool |
|
895 | labeltool = tool | |
894 | if internalmarkerstyle != 'basic' or markerstyle != 'basic': |
|
896 | if internalmarkerstyle != 'basic' or markerstyle != 'basic': | |
895 | premergelabels = _formatlabels(repo, fcd, fco, fca, |
|
897 | premergelabels = _formatlabels(repo, fcd, fco, fca, | |
896 | premergelabels, tool=labeltool) |
|
898 | premergelabels, tool=labeltool) | |
897 |
|
899 | |||
898 | r = _premerge(repo, fcd, fco, fca, toolconf, files, |
|
900 | r = _premerge(repo, fcd, fco, fca, toolconf, files, | |
899 | labels=premergelabels) |
|
901 | labels=premergelabels) | |
900 | # complete if premerge successful (r is 0) |
|
902 | # complete if premerge successful (r is 0) | |
901 | return not r, r, False |
|
903 | return not r, r, False | |
902 |
|
904 | |||
903 | needcheck, r, deleted = func(repo, mynode, orig, fcd, fco, fca, |
|
905 | needcheck, r, deleted = func(repo, mynode, orig, fcd, fco, fca, | |
904 | toolconf, files, labels=formattedlabels) |
|
906 | toolconf, files, labels=formattedlabels) | |
905 |
|
907 | |||
906 | if needcheck: |
|
908 | if needcheck: | |
907 | r = _check(repo, r, ui, tool, fcd, files) |
|
909 | r = _check(repo, r, ui, tool, fcd, files) | |
908 |
|
910 | |||
909 | if r: |
|
911 | if r: | |
910 | if onfailure: |
|
912 | if onfailure: | |
911 | if wctx.isinmemory(): |
|
913 | if wctx.isinmemory(): | |
912 | raise error.InMemoryMergeConflictsError('in-memory merge ' |
|
914 | raise error.InMemoryMergeConflictsError('in-memory merge ' | |
913 | 'does not support ' |
|
915 | 'does not support ' | |
914 | 'merge conflicts') |
|
916 | 'merge conflicts') | |
915 | ui.warn(onfailure % fd) |
|
917 | ui.warn(onfailure % fd) | |
916 | _onfilemergefailure(ui) |
|
918 | _onfilemergefailure(ui) | |
917 |
|
919 | |||
918 | return True, r, deleted |
|
920 | return True, r, deleted | |
919 | finally: |
|
921 | finally: | |
920 | if not r and back is not None: |
|
922 | if not r and back is not None: | |
921 | back.remove() |
|
923 | back.remove() | |
922 |
|
924 | |||
923 | def _haltmerge(): |
|
925 | def _haltmerge(): | |
924 | msg = _('merge halted after failed merge (see hg resolve)') |
|
926 | msg = _('merge halted after failed merge (see hg resolve)') | |
925 | raise error.InterventionRequired(msg) |
|
927 | raise error.InterventionRequired(msg) | |
926 |
|
928 | |||
927 | def _onfilemergefailure(ui): |
|
929 | def _onfilemergefailure(ui): | |
928 | action = ui.config('merge', 'on-failure') |
|
930 | action = ui.config('merge', 'on-failure') | |
929 | if action == 'prompt': |
|
931 | if action == 'prompt': | |
930 | msg = _('continue merge operation (yn)?' '$$ &Yes $$ &No') |
|
932 | msg = _('continue merge operation (yn)?' '$$ &Yes $$ &No') | |
931 | if ui.promptchoice(msg, 0) == 1: |
|
933 | if ui.promptchoice(msg, 0) == 1: | |
932 | _haltmerge() |
|
934 | _haltmerge() | |
933 | if action == 'halt': |
|
935 | if action == 'halt': | |
934 | _haltmerge() |
|
936 | _haltmerge() | |
935 | # default action is 'continue', in which case we neither prompt nor halt |
|
937 | # default action is 'continue', in which case we neither prompt nor halt | |
936 |
|
938 | |||
937 | def hasconflictmarkers(data): |
|
939 | def hasconflictmarkers(data): | |
938 | return bool(re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", data, |
|
940 | return bool(re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", data, | |
939 | re.MULTILINE)) |
|
941 | re.MULTILINE)) | |
940 |
|
942 | |||
941 | def _check(repo, r, ui, tool, fcd, files): |
|
943 | def _check(repo, r, ui, tool, fcd, files): | |
942 | fd = fcd.path() |
|
944 | fd = fcd.path() | |
943 | unused, unused, unused, back = files |
|
945 | unused, unused, unused, back = files | |
944 |
|
946 | |||
945 | if not r and (_toolbool(ui, tool, "checkconflicts") or |
|
947 | if not r and (_toolbool(ui, tool, "checkconflicts") or | |
946 | 'conflicts' in _toollist(ui, tool, "check")): |
|
948 | 'conflicts' in _toollist(ui, tool, "check")): | |
947 | if hasconflictmarkers(fcd.data()): |
|
949 | if hasconflictmarkers(fcd.data()): | |
948 | r = 1 |
|
950 | r = 1 | |
949 |
|
951 | |||
950 | checked = False |
|
952 | checked = False | |
951 | if 'prompt' in _toollist(ui, tool, "check"): |
|
953 | if 'prompt' in _toollist(ui, tool, "check"): | |
952 | checked = True |
|
954 | checked = True | |
953 | if ui.promptchoice(_("was merge of '%s' successful (yn)?" |
|
955 | if ui.promptchoice(_("was merge of '%s' successful (yn)?" | |
954 | "$$ &Yes $$ &No") % fd, 1): |
|
956 | "$$ &Yes $$ &No") % fd, 1): | |
955 | r = 1 |
|
957 | r = 1 | |
956 |
|
958 | |||
957 | if not r and not checked and (_toolbool(ui, tool, "checkchanged") or |
|
959 | if not r and not checked and (_toolbool(ui, tool, "checkchanged") or | |
958 | 'changed' in |
|
960 | 'changed' in | |
959 | _toollist(ui, tool, "check")): |
|
961 | _toollist(ui, tool, "check")): | |
960 | if back is not None and not fcd.cmp(back): |
|
962 | if back is not None and not fcd.cmp(back): | |
961 | if ui.promptchoice(_(" output file %s appears unchanged\n" |
|
963 | if ui.promptchoice(_(" output file %s appears unchanged\n" | |
962 | "was merge successful (yn)?" |
|
964 | "was merge successful (yn)?" | |
963 | "$$ &Yes $$ &No") % fd, 1): |
|
965 | "$$ &Yes $$ &No") % fd, 1): | |
964 | r = 1 |
|
966 | r = 1 | |
965 |
|
967 | |||
966 | if back is not None and _toolbool(ui, tool, "fixeol"): |
|
968 | if back is not None and _toolbool(ui, tool, "fixeol"): | |
967 | _matcheol(_workingpath(repo, fcd), back) |
|
969 | _matcheol(_workingpath(repo, fcd), back) | |
968 |
|
970 | |||
969 | return r |
|
971 | return r | |
970 |
|
972 | |||
971 | def _workingpath(repo, ctx): |
|
973 | def _workingpath(repo, ctx): | |
972 | return repo.wjoin(ctx.path()) |
|
974 | return repo.wjoin(ctx.path()) | |
973 |
|
975 | |||
974 | def premerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
976 | def premerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
975 | return _filemerge(True, repo, wctx, mynode, orig, fcd, fco, fca, |
|
977 | return _filemerge(True, repo, wctx, mynode, orig, fcd, fco, fca, | |
976 | labels=labels) |
|
978 | labels=labels) | |
977 |
|
979 | |||
978 | def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
980 | def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
979 | return _filemerge(False, repo, wctx, mynode, orig, fcd, fco, fca, |
|
981 | return _filemerge(False, repo, wctx, mynode, orig, fcd, fco, fca, | |
980 | labels=labels) |
|
982 | labels=labels) | |
981 |
|
983 | |||
982 | def loadinternalmerge(ui, extname, registrarobj): |
|
984 | def loadinternalmerge(ui, extname, registrarobj): | |
983 | """Load internal merge tool from specified registrarobj |
|
985 | """Load internal merge tool from specified registrarobj | |
984 | """ |
|
986 | """ | |
985 | for name, func in registrarobj._table.iteritems(): |
|
987 | for name, func in registrarobj._table.iteritems(): | |
986 | fullname = ':' + name |
|
988 | fullname = ':' + name | |
987 | internals[fullname] = func |
|
989 | internals[fullname] = func | |
988 | internals['internal:' + name] = func |
|
990 | internals['internal:' + name] = func | |
989 | internalsdoc[fullname] = func |
|
991 | internalsdoc[fullname] = func | |
990 |
|
992 | |||
991 | capabilities = sorted([k for k, v in func.capabilities.items() if v]) |
|
993 | capabilities = sorted([k for k, v in func.capabilities.items() if v]) | |
992 | if capabilities: |
|
994 | if capabilities: | |
993 | capdesc = " (actual capabilities: %s)" % ', '.join(capabilities) |
|
995 | capdesc = " (actual capabilities: %s)" % ', '.join(capabilities) | |
994 | func.__doc__ = (func.__doc__ + |
|
996 | func.__doc__ = (func.__doc__ + | |
995 | pycompat.sysstr("\n\n%s" % capdesc)) |
|
997 | pycompat.sysstr("\n\n%s" % capdesc)) | |
996 |
|
998 | |||
997 | # to put i18n comments into hg.pot for automatically generated texts |
|
999 | # to put i18n comments into hg.pot for automatically generated texts | |
998 |
|
1000 | |||
999 | # i18n: "binary" and "symlik" are keywords |
|
1001 | # i18n: "binary" and "symlik" are keywords | |
1000 | # i18n: this text is added automatically |
|
1002 | # i18n: this text is added automatically | |
1001 | _(" (actual capabilities: binary, symlink)") |
|
1003 | _(" (actual capabilities: binary, symlink)") | |
1002 | # i18n: "binary" is keyword |
|
1004 | # i18n: "binary" is keyword | |
1003 | # i18n: this text is added automatically |
|
1005 | # i18n: this text is added automatically | |
1004 | _(" (actual capabilities: binary)") |
|
1006 | _(" (actual capabilities: binary)") | |
1005 | # i18n: "symlink" is keyword |
|
1007 | # i18n: "symlink" is keyword | |
1006 | # i18n: this text is added automatically |
|
1008 | # i18n: this text is added automatically | |
1007 | _(" (actual capabilities: symlink)") |
|
1009 | _(" (actual capabilities: symlink)") | |
1008 |
|
1010 | |||
1009 | # load built-in merge tools explicitly to setup internalsdoc |
|
1011 | # load built-in merge tools explicitly to setup internalsdoc | |
1010 | loadinternalmerge(None, None, internaltool) |
|
1012 | loadinternalmerge(None, None, internaltool) | |
1011 |
|
1013 | |||
1012 | # tell hggettext to extract docstrings from these functions: |
|
1014 | # tell hggettext to extract docstrings from these functions: | |
1013 | i18nfunctions = internals.values() |
|
1015 | i18nfunctions = internals.values() |
@@ -1,1283 +1,1284 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | Setup: |
|
3 | Setup: | |
4 |
|
4 | |||
5 | $ echo a >> a |
|
5 | $ echo a >> a | |
6 | $ hg ci -Am 'base' |
|
6 | $ hg ci -Am 'base' | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | Refuse to amend public csets: |
|
9 | Refuse to amend public csets: | |
10 |
|
10 | |||
11 | $ hg phase -r . -p |
|
11 | $ hg phase -r . -p | |
12 | $ hg ci --amend |
|
12 | $ hg ci --amend | |
13 | abort: cannot amend public changesets |
|
13 | abort: cannot amend public changesets | |
14 | (see 'hg help phases' for details) |
|
14 | (see 'hg help phases' for details) | |
15 | [255] |
|
15 | [255] | |
16 | $ hg phase -r . -f -d |
|
16 | $ hg phase -r . -f -d | |
17 |
|
17 | |||
18 | $ echo a >> a |
|
18 | $ echo a >> a | |
19 | $ hg ci -Am 'base1' |
|
19 | $ hg ci -Am 'base1' | |
20 |
|
20 | |||
21 | Nothing to amend: |
|
21 | Nothing to amend: | |
22 |
|
22 | |||
23 | $ hg ci --amend -m 'base1' |
|
23 | $ hg ci --amend -m 'base1' | |
24 | nothing changed |
|
24 | nothing changed | |
25 | [1] |
|
25 | [1] | |
26 |
|
26 | |||
27 | $ cat >> $HGRCPATH <<EOF |
|
27 | $ cat >> $HGRCPATH <<EOF | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" |
|
29 | > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" | |
30 | > EOF |
|
30 | > EOF | |
31 |
|
31 | |||
32 | Amending changeset with changes in working dir: |
|
32 | Amending changeset with changes in working dir: | |
33 | (and check that --message does not trigger an editor) |
|
33 | (and check that --message does not trigger an editor) | |
34 |
|
34 | |||
35 | $ echo a >> a |
|
35 | $ echo a >> a | |
36 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' |
|
36 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' | |
37 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 |
|
37 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 | |
38 | 43f1ba15f28a tip |
|
38 | 43f1ba15f28a tip | |
39 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-5ab4f721-amend.hg |
|
39 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-5ab4f721-amend.hg | |
40 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH |
|
40 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |
41 | $ hg diff -c . |
|
41 | $ hg diff -c . | |
42 | diff -r ad120869acf0 -r 43f1ba15f28a a |
|
42 | diff -r ad120869acf0 -r 43f1ba15f28a a | |
43 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
43 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
44 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
44 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
45 | @@ -1,1 +1,3 @@ |
|
45 | @@ -1,1 +1,3 @@ | |
46 | a |
|
46 | a | |
47 | +a |
|
47 | +a | |
48 | +a |
|
48 | +a | |
49 | $ hg log |
|
49 | $ hg log | |
50 | changeset: 1:43f1ba15f28a |
|
50 | changeset: 1:43f1ba15f28a | |
51 | tag: tip |
|
51 | tag: tip | |
52 | user: test |
|
52 | user: test | |
53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: amend base1 |
|
54 | summary: amend base1 | |
55 |
|
55 | |||
56 | changeset: 0:ad120869acf0 |
|
56 | changeset: 0:ad120869acf0 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: base |
|
59 | summary: base | |
60 |
|
60 | |||
61 |
|
61 | |||
62 | Check proper abort for empty message |
|
62 | Check proper abort for empty message | |
63 |
|
63 | |||
64 | $ cat > editor.sh << '__EOF__' |
|
64 | $ cat > editor.sh << '__EOF__' | |
65 | > #!/bin/sh |
|
65 | > #!/bin/sh | |
66 | > echo "" > "$1" |
|
66 | > echo "" > "$1" | |
67 | > __EOF__ |
|
67 | > __EOF__ | |
68 |
|
68 | |||
69 | Update the existing file to ensure that the dirstate is not in pending state |
|
69 | Update the existing file to ensure that the dirstate is not in pending state | |
70 | (where the status of some files in the working copy is not known yet). This in |
|
70 | (where the status of some files in the working copy is not known yet). This in | |
71 | turn ensures that when the transaction is aborted due to an empty message during |
|
71 | turn ensures that when the transaction is aborted due to an empty message during | |
72 | the amend, there should be no rollback. |
|
72 | the amend, there should be no rollback. | |
73 | $ echo a >> a |
|
73 | $ echo a >> a | |
74 |
|
74 | |||
75 | $ echo b > b |
|
75 | $ echo b > b | |
76 | $ hg add b |
|
76 | $ hg add b | |
77 | $ hg summary |
|
77 | $ hg summary | |
78 | parent: 1:43f1ba15f28a tip |
|
78 | parent: 1:43f1ba15f28a tip | |
79 | amend base1 |
|
79 | amend base1 | |
80 | branch: default |
|
80 | branch: default | |
81 | commit: 1 modified, 1 added, 1 unknown |
|
81 | commit: 1 modified, 1 added, 1 unknown | |
82 | update: (current) |
|
82 | update: (current) | |
83 | phases: 2 draft |
|
83 | phases: 2 draft | |
84 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
84 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
85 | abort: empty commit message |
|
85 | abort: empty commit message | |
86 | [255] |
|
86 | [255] | |
87 | $ hg summary |
|
87 | $ hg summary | |
88 | parent: 1:43f1ba15f28a tip |
|
88 | parent: 1:43f1ba15f28a tip | |
89 | amend base1 |
|
89 | amend base1 | |
90 | branch: default |
|
90 | branch: default | |
91 | commit: 1 modified, 1 added, 1 unknown |
|
91 | commit: 1 modified, 1 added, 1 unknown | |
92 | update: (current) |
|
92 | update: (current) | |
93 | phases: 2 draft |
|
93 | phases: 2 draft | |
94 |
|
94 | |||
95 | Add new file along with modified existing file: |
|
95 | Add new file along with modified existing file: | |
96 | $ hg ci --amend -m 'amend base1 new file' |
|
96 | $ hg ci --amend -m 'amend base1 new file' | |
97 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-007467c2-amend.hg |
|
97 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-007467c2-amend.hg | |
98 |
|
98 | |||
99 | Remove file that was added in amended commit: |
|
99 | Remove file that was added in amended commit: | |
100 | (and test logfile option) |
|
100 | (and test logfile option) | |
101 | (and test that logfile option do not trigger an editor) |
|
101 | (and test that logfile option do not trigger an editor) | |
102 |
|
102 | |||
103 | $ hg rm b |
|
103 | $ hg rm b | |
104 | $ echo 'amend base1 remove new file' > ../logfile |
|
104 | $ echo 'amend base1 remove new file' > ../logfile | |
105 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile |
|
105 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile | |
106 | saved backup bundle to $TESTTMP/.hg/strip-backup/c16295aaf401-1ada9901-amend.hg |
|
106 | saved backup bundle to $TESTTMP/.hg/strip-backup/c16295aaf401-1ada9901-amend.hg | |
107 |
|
107 | |||
108 | $ hg cat b |
|
108 | $ hg cat b | |
109 | b: no such file in rev 47343646fa3d |
|
109 | b: no such file in rev 47343646fa3d | |
110 | [1] |
|
110 | [1] | |
111 |
|
111 | |||
112 | No changes, just a different message: |
|
112 | No changes, just a different message: | |
113 |
|
113 | |||
114 | $ hg ci -v --amend -m 'no changes, new message' |
|
114 | $ hg ci -v --amend -m 'no changes, new message' | |
115 | amending changeset 47343646fa3d |
|
115 | amending changeset 47343646fa3d | |
116 | copying changeset 47343646fa3d to ad120869acf0 |
|
116 | copying changeset 47343646fa3d to ad120869acf0 | |
117 | committing files: |
|
117 | committing files: | |
118 | a |
|
118 | a | |
119 | committing manifest |
|
119 | committing manifest | |
120 | committing changelog |
|
120 | committing changelog | |
121 | 1 changesets found |
|
121 | 1 changesets found | |
122 | uncompressed size of bundle content: |
|
122 | uncompressed size of bundle content: | |
123 | 254 (changelog) |
|
123 | 254 (changelog) | |
124 | 163 (manifests) |
|
124 | 163 (manifests) | |
125 | 131 a |
|
125 | 131 a | |
126 | saved backup bundle to $TESTTMP/.hg/strip-backup/47343646fa3d-c2758885-amend.hg |
|
126 | saved backup bundle to $TESTTMP/.hg/strip-backup/47343646fa3d-c2758885-amend.hg | |
127 | 1 changesets found |
|
127 | 1 changesets found | |
128 | uncompressed size of bundle content: |
|
128 | uncompressed size of bundle content: | |
129 | 250 (changelog) |
|
129 | 250 (changelog) | |
130 | 163 (manifests) |
|
130 | 163 (manifests) | |
131 | 131 a |
|
131 | 131 a | |
132 | adding branch |
|
132 | adding branch | |
133 | adding changesets |
|
133 | adding changesets | |
134 | adding manifests |
|
134 | adding manifests | |
135 | adding file changes |
|
135 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
136 | added 1 changesets with 1 changes to 1 files | |
137 | committed changeset 1:401431e913a1 |
|
137 | committed changeset 1:401431e913a1 | |
138 | $ hg diff -c . |
|
138 | $ hg diff -c . | |
139 | diff -r ad120869acf0 -r 401431e913a1 a |
|
139 | diff -r ad120869acf0 -r 401431e913a1 a | |
140 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
140 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
141 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
141 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
142 | @@ -1,1 +1,4 @@ |
|
142 | @@ -1,1 +1,4 @@ | |
143 | a |
|
143 | a | |
144 | +a |
|
144 | +a | |
145 | +a |
|
145 | +a | |
146 | +a |
|
146 | +a | |
147 | $ hg log |
|
147 | $ hg log | |
148 | changeset: 1:401431e913a1 |
|
148 | changeset: 1:401431e913a1 | |
149 | tag: tip |
|
149 | tag: tip | |
150 | user: test |
|
150 | user: test | |
151 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 | |
152 | summary: no changes, new message |
|
152 | summary: no changes, new message | |
153 |
|
153 | |||
154 | changeset: 0:ad120869acf0 |
|
154 | changeset: 0:ad120869acf0 | |
155 | user: test |
|
155 | user: test | |
156 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
157 | summary: base |
|
157 | summary: base | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | Disable default date on commit so when -d isn't given, the old date is preserved: |
|
160 | Disable default date on commit so when -d isn't given, the old date is preserved: | |
161 |
|
161 | |||
162 | $ echo '[defaults]' >> $HGRCPATH |
|
162 | $ echo '[defaults]' >> $HGRCPATH | |
163 | $ echo 'commit=' >> $HGRCPATH |
|
163 | $ echo 'commit=' >> $HGRCPATH | |
164 |
|
164 | |||
165 | Test -u/-d: |
|
165 | Test -u/-d: | |
166 |
|
166 | |||
167 | $ cat > .hg/checkeditform.sh <<EOF |
|
167 | $ cat > .hg/checkeditform.sh <<EOF | |
168 | > env | grep HGEDITFORM |
|
168 | > env | grep HGEDITFORM | |
169 | > true |
|
169 | > true | |
170 | > EOF |
|
170 | > EOF | |
171 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' |
|
171 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' | |
172 | HGEDITFORM=commit.amend.normal |
|
172 | HGEDITFORM=commit.amend.normal | |
173 | saved backup bundle to $TESTTMP/.hg/strip-backup/401431e913a1-5e8e532c-amend.hg |
|
173 | saved backup bundle to $TESTTMP/.hg/strip-backup/401431e913a1-5e8e532c-amend.hg | |
174 | $ echo a >> a |
|
174 | $ echo a >> a | |
175 | $ hg ci --amend -u foo -d '1 0' |
|
175 | $ hg ci --amend -u foo -d '1 0' | |
176 | saved backup bundle to $TESTTMP/.hg/strip-backup/d96b1d28ae33-677e0afb-amend.hg |
|
176 | saved backup bundle to $TESTTMP/.hg/strip-backup/d96b1d28ae33-677e0afb-amend.hg | |
177 | $ hg log -r . |
|
177 | $ hg log -r . | |
178 | changeset: 1:a9a13940fc03 |
|
178 | changeset: 1:a9a13940fc03 | |
179 | tag: tip |
|
179 | tag: tip | |
180 | user: foo |
|
180 | user: foo | |
181 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:01 1970 +0000 | |
182 | summary: no changes, new message |
|
182 | summary: no changes, new message | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | Open editor with old commit message if a message isn't given otherwise: |
|
185 | Open editor with old commit message if a message isn't given otherwise: | |
186 |
|
186 | |||
187 | $ cat > editor.sh << '__EOF__' |
|
187 | $ cat > editor.sh << '__EOF__' | |
188 | > #!/bin/sh |
|
188 | > #!/bin/sh | |
189 | > cat $1 |
|
189 | > cat $1 | |
190 | > echo "another precious commit message" > "$1" |
|
190 | > echo "another precious commit message" > "$1" | |
191 | > __EOF__ |
|
191 | > __EOF__ | |
192 |
|
192 | |||
193 | at first, test saving last-message.txt |
|
193 | at first, test saving last-message.txt | |
194 |
|
194 | |||
195 | $ cat > .hg/hgrc << '__EOF__' |
|
195 | $ cat > .hg/hgrc << '__EOF__' | |
196 | > [hooks] |
|
196 | > [hooks] | |
197 | > pretxncommit.test-saving-last-message = false |
|
197 | > pretxncommit.test-saving-last-message = false | |
198 | > __EOF__ |
|
198 | > __EOF__ | |
199 |
|
199 | |||
200 | $ rm -f .hg/last-message.txt |
|
200 | $ rm -f .hg/last-message.txt | |
201 | $ hg commit --amend -v -m "message given from command line" |
|
201 | $ hg commit --amend -v -m "message given from command line" | |
202 | amending changeset a9a13940fc03 |
|
202 | amending changeset a9a13940fc03 | |
203 | copying changeset a9a13940fc03 to ad120869acf0 |
|
203 | copying changeset a9a13940fc03 to ad120869acf0 | |
204 | committing files: |
|
204 | committing files: | |
205 | a |
|
205 | a | |
206 | committing manifest |
|
206 | committing manifest | |
207 | committing changelog |
|
207 | committing changelog | |
208 | running hook pretxncommit.test-saving-last-message: false |
|
208 | running hook pretxncommit.test-saving-last-message: false | |
209 | transaction abort! |
|
209 | transaction abort! | |
210 | rollback completed |
|
210 | rollback completed | |
211 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
211 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
212 | [255] |
|
212 | [255] | |
213 | $ cat .hg/last-message.txt |
|
213 | $ cat .hg/last-message.txt | |
214 | message given from command line (no-eol) |
|
214 | message given from command line (no-eol) | |
215 |
|
215 | |||
216 | $ rm -f .hg/last-message.txt |
|
216 | $ rm -f .hg/last-message.txt | |
217 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
217 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
218 | amending changeset a9a13940fc03 |
|
218 | amending changeset a9a13940fc03 | |
219 | copying changeset a9a13940fc03 to ad120869acf0 |
|
219 | copying changeset a9a13940fc03 to ad120869acf0 | |
220 | no changes, new message |
|
220 | no changes, new message | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
223 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
224 | HG: Leave message empty to abort commit. |
|
224 | HG: Leave message empty to abort commit. | |
225 | HG: -- |
|
225 | HG: -- | |
226 | HG: user: foo |
|
226 | HG: user: foo | |
227 | HG: branch 'default' |
|
227 | HG: branch 'default' | |
228 | HG: changed a |
|
228 | HG: changed a | |
229 | committing files: |
|
229 | committing files: | |
230 | a |
|
230 | a | |
231 | committing manifest |
|
231 | committing manifest | |
232 | committing changelog |
|
232 | committing changelog | |
233 | running hook pretxncommit.test-saving-last-message: false |
|
233 | running hook pretxncommit.test-saving-last-message: false | |
234 | transaction abort! |
|
234 | transaction abort! | |
235 | rollback completed |
|
235 | rollback completed | |
236 | abort: pretxncommit.test-saving-last-message hook exited with status 1 |
|
236 | abort: pretxncommit.test-saving-last-message hook exited with status 1 | |
237 | [255] |
|
237 | [255] | |
238 |
|
238 | |||
239 | $ cat .hg/last-message.txt |
|
239 | $ cat .hg/last-message.txt | |
240 | another precious commit message |
|
240 | another precious commit message | |
241 |
|
241 | |||
242 | $ cat > .hg/hgrc << '__EOF__' |
|
242 | $ cat > .hg/hgrc << '__EOF__' | |
243 | > [hooks] |
|
243 | > [hooks] | |
244 | > pretxncommit.test-saving-last-message = |
|
244 | > pretxncommit.test-saving-last-message = | |
245 | > __EOF__ |
|
245 | > __EOF__ | |
246 |
|
246 | |||
247 | then, test editing custom commit message |
|
247 | then, test editing custom commit message | |
248 |
|
248 | |||
249 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
249 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
250 | amending changeset a9a13940fc03 |
|
250 | amending changeset a9a13940fc03 | |
251 | copying changeset a9a13940fc03 to ad120869acf0 |
|
251 | copying changeset a9a13940fc03 to ad120869acf0 | |
252 | no changes, new message |
|
252 | no changes, new message | |
253 |
|
253 | |||
254 |
|
254 | |||
255 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
255 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
256 | HG: Leave message empty to abort commit. |
|
256 | HG: Leave message empty to abort commit. | |
257 | HG: -- |
|
257 | HG: -- | |
258 | HG: user: foo |
|
258 | HG: user: foo | |
259 | HG: branch 'default' |
|
259 | HG: branch 'default' | |
260 | HG: changed a |
|
260 | HG: changed a | |
261 | committing files: |
|
261 | committing files: | |
262 | a |
|
262 | a | |
263 | committing manifest |
|
263 | committing manifest | |
264 | committing changelog |
|
264 | committing changelog | |
265 | 1 changesets found |
|
265 | 1 changesets found | |
266 | uncompressed size of bundle content: |
|
266 | uncompressed size of bundle content: | |
267 | 249 (changelog) |
|
267 | 249 (changelog) | |
268 | 163 (manifests) |
|
268 | 163 (manifests) | |
269 | 133 a |
|
269 | 133 a | |
270 | saved backup bundle to $TESTTMP/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg |
|
270 | saved backup bundle to $TESTTMP/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg | |
271 | 1 changesets found |
|
271 | 1 changesets found | |
272 | uncompressed size of bundle content: |
|
272 | uncompressed size of bundle content: | |
273 | 257 (changelog) |
|
273 | 257 (changelog) | |
274 | 163 (manifests) |
|
274 | 163 (manifests) | |
275 | 133 a |
|
275 | 133 a | |
276 | adding branch |
|
276 | adding branch | |
277 | adding changesets |
|
277 | adding changesets | |
278 | adding manifests |
|
278 | adding manifests | |
279 | adding file changes |
|
279 | adding file changes | |
280 | added 1 changesets with 1 changes to 1 files |
|
280 | added 1 changesets with 1 changes to 1 files | |
281 | committed changeset 1:64a124ba1b44 |
|
281 | committed changeset 1:64a124ba1b44 | |
282 |
|
282 | |||
283 | Same, but with changes in working dir (different code path): |
|
283 | Same, but with changes in working dir (different code path): | |
284 |
|
284 | |||
285 | $ echo a >> a |
|
285 | $ echo a >> a | |
286 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
286 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
287 | amending changeset 64a124ba1b44 |
|
287 | amending changeset 64a124ba1b44 | |
288 | another precious commit message |
|
288 | another precious commit message | |
289 |
|
289 | |||
290 |
|
290 | |||
291 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
291 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
292 | HG: Leave message empty to abort commit. |
|
292 | HG: Leave message empty to abort commit. | |
293 | HG: -- |
|
293 | HG: -- | |
294 | HG: user: foo |
|
294 | HG: user: foo | |
295 | HG: branch 'default' |
|
295 | HG: branch 'default' | |
296 | HG: changed a |
|
296 | HG: changed a | |
297 | committing files: |
|
297 | committing files: | |
298 | a |
|
298 | a | |
299 | committing manifest |
|
299 | committing manifest | |
300 | committing changelog |
|
300 | committing changelog | |
301 | 1 changesets found |
|
301 | 1 changesets found | |
302 | uncompressed size of bundle content: |
|
302 | uncompressed size of bundle content: | |
303 | 257 (changelog) |
|
303 | 257 (changelog) | |
304 | 163 (manifests) |
|
304 | 163 (manifests) | |
305 | 133 a |
|
305 | 133 a | |
306 | saved backup bundle to $TESTTMP/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg |
|
306 | saved backup bundle to $TESTTMP/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg | |
307 | 1 changesets found |
|
307 | 1 changesets found | |
308 | uncompressed size of bundle content: |
|
308 | uncompressed size of bundle content: | |
309 | 257 (changelog) |
|
309 | 257 (changelog) | |
310 | 163 (manifests) |
|
310 | 163 (manifests) | |
311 | 135 a |
|
311 | 135 a | |
312 | adding branch |
|
312 | adding branch | |
313 | adding changesets |
|
313 | adding changesets | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | added 1 changesets with 1 changes to 1 files |
|
316 | added 1 changesets with 1 changes to 1 files | |
317 | committed changeset 1:7892795b8e38 |
|
317 | committed changeset 1:7892795b8e38 | |
318 |
|
318 | |||
319 | $ rm editor.sh |
|
319 | $ rm editor.sh | |
320 | $ hg log -r . |
|
320 | $ hg log -r . | |
321 | changeset: 1:7892795b8e38 |
|
321 | changeset: 1:7892795b8e38 | |
322 | tag: tip |
|
322 | tag: tip | |
323 | user: foo |
|
323 | user: foo | |
324 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
324 | date: Thu Jan 01 00:00:01 1970 +0000 | |
325 | summary: another precious commit message |
|
325 | summary: another precious commit message | |
326 |
|
326 | |||
327 |
|
327 | |||
328 | Moving bookmarks, preserve active bookmark: |
|
328 | Moving bookmarks, preserve active bookmark: | |
329 |
|
329 | |||
330 | $ hg book book1 |
|
330 | $ hg book book1 | |
331 | $ hg book book2 |
|
331 | $ hg book book2 | |
332 | $ hg ci --amend -m 'move bookmarks' |
|
332 | $ hg ci --amend -m 'move bookmarks' | |
333 | saved backup bundle to $TESTTMP/.hg/strip-backup/7892795b8e38-3fb46217-amend.hg |
|
333 | saved backup bundle to $TESTTMP/.hg/strip-backup/7892795b8e38-3fb46217-amend.hg | |
334 | $ hg book |
|
334 | $ hg book | |
335 | book1 1:8311f17e2616 |
|
335 | book1 1:8311f17e2616 | |
336 | * book2 1:8311f17e2616 |
|
336 | * book2 1:8311f17e2616 | |
337 | $ echo a >> a |
|
337 | $ echo a >> a | |
338 | $ hg ci --amend -m 'move bookmarks' |
|
338 | $ hg ci --amend -m 'move bookmarks' | |
339 | saved backup bundle to $TESTTMP/.hg/strip-backup/8311f17e2616-f0504fe3-amend.hg |
|
339 | saved backup bundle to $TESTTMP/.hg/strip-backup/8311f17e2616-f0504fe3-amend.hg | |
340 | $ hg book |
|
340 | $ hg book | |
341 | book1 1:a3b65065808c |
|
341 | book1 1:a3b65065808c | |
342 | * book2 1:a3b65065808c |
|
342 | * book2 1:a3b65065808c | |
343 |
|
343 | |||
344 | abort does not loose bookmarks |
|
344 | abort does not loose bookmarks | |
345 |
|
345 | |||
346 | $ cat > editor.sh << '__EOF__' |
|
346 | $ cat > editor.sh << '__EOF__' | |
347 | > #!/bin/sh |
|
347 | > #!/bin/sh | |
348 | > echo "" > "$1" |
|
348 | > echo "" > "$1" | |
349 | > __EOF__ |
|
349 | > __EOF__ | |
350 | $ echo a >> a |
|
350 | $ echo a >> a | |
351 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
351 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
352 | abort: empty commit message |
|
352 | abort: empty commit message | |
353 | [255] |
|
353 | [255] | |
354 | $ hg book |
|
354 | $ hg book | |
355 | book1 1:a3b65065808c |
|
355 | book1 1:a3b65065808c | |
356 | * book2 1:a3b65065808c |
|
356 | * book2 1:a3b65065808c | |
357 | $ hg revert -Caq |
|
357 | $ hg revert -Caq | |
358 | $ rm editor.sh |
|
358 | $ rm editor.sh | |
359 |
|
359 | |||
360 | $ echo '[defaults]' >> $HGRCPATH |
|
360 | $ echo '[defaults]' >> $HGRCPATH | |
361 | $ echo "commit=-d '0 0'" >> $HGRCPATH |
|
361 | $ echo "commit=-d '0 0'" >> $HGRCPATH | |
362 |
|
362 | |||
363 | Moving branches: |
|
363 | Moving branches: | |
364 |
|
364 | |||
365 | $ hg branch foo |
|
365 | $ hg branch foo | |
366 | marked working directory as branch foo |
|
366 | marked working directory as branch foo | |
367 | (branches are permanent and global, did you want a bookmark?) |
|
367 | (branches are permanent and global, did you want a bookmark?) | |
368 | $ echo a >> a |
|
368 | $ echo a >> a | |
369 | $ hg ci -m 'branch foo' |
|
369 | $ hg ci -m 'branch foo' | |
370 | $ hg branch default -f |
|
370 | $ hg branch default -f | |
371 | marked working directory as branch default |
|
371 | marked working directory as branch default | |
372 | $ hg ci --amend -m 'back to default' |
|
372 | $ hg ci --amend -m 'back to default' | |
373 | saved backup bundle to $TESTTMP/.hg/strip-backup/f8339a38efe1-c18453c9-amend.hg |
|
373 | saved backup bundle to $TESTTMP/.hg/strip-backup/f8339a38efe1-c18453c9-amend.hg | |
374 | $ hg branches |
|
374 | $ hg branches | |
375 | default 2:9c07515f2650 |
|
375 | default 2:9c07515f2650 | |
376 |
|
376 | |||
377 | Close branch: |
|
377 | Close branch: | |
378 |
|
378 | |||
379 | $ hg up -q 0 |
|
379 | $ hg up -q 0 | |
380 | $ echo b >> b |
|
380 | $ echo b >> b | |
381 | $ hg branch foo |
|
381 | $ hg branch foo | |
382 | marked working directory as branch foo |
|
382 | marked working directory as branch foo | |
383 | (branches are permanent and global, did you want a bookmark?) |
|
383 | (branches are permanent and global, did you want a bookmark?) | |
384 | $ hg ci -Am 'fork' |
|
384 | $ hg ci -Am 'fork' | |
385 | adding b |
|
385 | adding b | |
386 | $ echo b >> b |
|
386 | $ echo b >> b | |
387 | $ hg ci -mb |
|
387 | $ hg ci -mb | |
388 | $ hg ci --amend --close-branch -m 'closing branch foo' |
|
388 | $ hg ci --amend --close-branch -m 'closing branch foo' | |
389 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-54245dc7-amend.hg |
|
389 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-54245dc7-amend.hg | |
390 |
|
390 | |||
391 | Same thing, different code path: |
|
391 | Same thing, different code path: | |
392 |
|
392 | |||
393 | $ echo b >> b |
|
393 | $ echo b >> b | |
394 | $ hg ci -m 'reopen branch' |
|
394 | $ hg ci -m 'reopen branch' | |
395 | reopening closed branch head 4 |
|
395 | reopening closed branch head 4 | |
396 | $ echo b >> b |
|
396 | $ echo b >> b | |
397 | $ hg ci --amend --close-branch |
|
397 | $ hg ci --amend --close-branch | |
398 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-b900d9fa-amend.hg |
|
398 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-b900d9fa-amend.hg | |
399 | $ hg branches |
|
399 | $ hg branches | |
400 | default 2:9c07515f2650 |
|
400 | default 2:9c07515f2650 | |
401 |
|
401 | |||
402 | Refuse to amend during a merge: |
|
402 | Refuse to amend during a merge: | |
403 |
|
403 | |||
404 | $ hg up -q default |
|
404 | $ hg up -q default | |
405 | $ hg merge foo |
|
405 | $ hg merge foo | |
406 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
406 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
407 | (branch merge, don't forget to commit) |
|
407 | (branch merge, don't forget to commit) | |
408 | $ hg ci --amend |
|
408 | $ hg ci --amend | |
409 | abort: cannot amend while merging |
|
409 | abort: cannot amend while merging | |
410 | [255] |
|
410 | [255] | |
411 | $ hg ci -m 'merge' |
|
411 | $ hg ci -m 'merge' | |
412 |
|
412 | |||
413 | Refuse to amend if there is a merge conflict (issue5805): |
|
413 | Refuse to amend if there is a merge conflict (issue5805): | |
414 |
|
414 | |||
415 | $ hg up -q foo |
|
415 | $ hg up -q foo | |
416 | $ echo c > a |
|
416 | $ echo c > a | |
417 | $ hg up default -t :fail |
|
417 | $ hg up default -t :fail | |
418 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
418 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
419 | use 'hg resolve' to retry unresolved file merges |
|
419 | use 'hg resolve' to retry unresolved file merges | |
420 | [1] |
|
420 | [1] | |
421 | $ hg resolve -l |
|
421 | $ hg resolve -l | |
422 | U a |
|
422 | U a | |
423 |
|
423 | |||
424 | $ hg ci --amend |
|
424 | $ hg ci --amend | |
425 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
425 | abort: unresolved merge conflicts (see 'hg help resolve') | |
426 | [255] |
|
426 | [255] | |
427 |
|
427 | |||
428 | $ hg up -qC . |
|
428 | $ hg up -qC . | |
429 |
|
429 | |||
430 | Follow copies/renames: |
|
430 | Follow copies/renames: | |
431 |
|
431 | |||
432 | $ hg mv b c |
|
432 | $ hg mv b c | |
433 | $ hg ci -m 'b -> c' |
|
433 | $ hg ci -m 'b -> c' | |
434 | $ hg mv c d |
|
434 | $ hg mv c d | |
435 | $ hg ci --amend -m 'b -> d' |
|
435 | $ hg ci --amend -m 'b -> d' | |
436 | saved backup bundle to $TESTTMP/.hg/strip-backup/42f3f27a067d-f23cc9f7-amend.hg |
|
436 | saved backup bundle to $TESTTMP/.hg/strip-backup/42f3f27a067d-f23cc9f7-amend.hg | |
437 | $ hg st --rev '.^' --copies d |
|
437 | $ hg st --rev '.^' --copies d | |
438 | A d |
|
438 | A d | |
439 | b |
|
439 | b | |
440 | $ hg cp d e |
|
440 | $ hg cp d e | |
441 | $ hg ci -m 'e = d' |
|
441 | $ hg ci -m 'e = d' | |
442 | $ hg cp e f |
|
442 | $ hg cp e f | |
443 | $ hg ci --amend -m 'f = d' |
|
443 | $ hg ci --amend -m 'f = d' | |
444 | saved backup bundle to $TESTTMP/.hg/strip-backup/9198f73182d5-251d584a-amend.hg |
|
444 | saved backup bundle to $TESTTMP/.hg/strip-backup/9198f73182d5-251d584a-amend.hg | |
445 | $ hg st --rev '.^' --copies f |
|
445 | $ hg st --rev '.^' --copies f | |
446 | A f |
|
446 | A f | |
447 | d |
|
447 | d | |
448 |
|
448 | |||
449 | $ mv f f.orig |
|
449 | $ mv f f.orig | |
450 | $ hg rm -A f |
|
450 | $ hg rm -A f | |
451 | $ hg ci -m removef |
|
451 | $ hg ci -m removef | |
452 | $ hg cp a f |
|
452 | $ hg cp a f | |
453 | $ mv f.orig f |
|
453 | $ mv f.orig f | |
454 | $ hg ci --amend -m replacef |
|
454 | $ hg ci --amend -m replacef | |
455 | saved backup bundle to $TESTTMP/.hg/strip-backup/f0993ab6b482-eda301bf-amend.hg |
|
455 | saved backup bundle to $TESTTMP/.hg/strip-backup/f0993ab6b482-eda301bf-amend.hg | |
456 | $ hg st --change . --copies |
|
456 | $ hg st --change . --copies | |
457 | $ hg log -r . --template "{file_copies}\n" |
|
457 | $ hg log -r . --template "{file_copies}\n" | |
458 |
|
458 | |||
459 |
|
459 | |||
460 | Move added file (issue3410): |
|
460 | Move added file (issue3410): | |
461 |
|
461 | |||
462 | $ echo g >> g |
|
462 | $ echo g >> g | |
463 | $ hg ci -Am g |
|
463 | $ hg ci -Am g | |
464 | adding g |
|
464 | adding g | |
465 | $ hg mv g h |
|
465 | $ hg mv g h | |
466 | $ hg ci --amend |
|
466 | $ hg ci --amend | |
467 | saved backup bundle to $TESTTMP/.hg/strip-backup/58585e3f095c-0f5ebcda-amend.hg |
|
467 | saved backup bundle to $TESTTMP/.hg/strip-backup/58585e3f095c-0f5ebcda-amend.hg | |
468 | $ hg st --change . --copies h |
|
468 | $ hg st --change . --copies h | |
469 | A h |
|
469 | A h | |
470 | $ hg log -r . --template "{file_copies}\n" |
|
470 | $ hg log -r . --template "{file_copies}\n" | |
471 |
|
471 | |||
472 |
|
472 | |||
473 | Can't rollback an amend: |
|
473 | Can't rollback an amend: | |
474 |
|
474 | |||
475 | $ hg rollback |
|
475 | $ hg rollback | |
476 | no rollback information available |
|
476 | no rollback information available | |
477 | [1] |
|
477 | [1] | |
478 |
|
478 | |||
479 | Preserve extra dict (issue3430): |
|
479 | Preserve extra dict (issue3430): | |
480 |
|
480 | |||
481 | $ hg branch a |
|
481 | $ hg branch a | |
482 | marked working directory as branch a |
|
482 | marked working directory as branch a | |
483 | (branches are permanent and global, did you want a bookmark?) |
|
483 | (branches are permanent and global, did you want a bookmark?) | |
484 | $ echo a >> a |
|
484 | $ echo a >> a | |
485 | $ hg ci -ma |
|
485 | $ hg ci -ma | |
486 | $ hg ci --amend -m "a'" |
|
486 | $ hg ci --amend -m "a'" | |
487 | saved backup bundle to $TESTTMP/.hg/strip-backup/39a162f1d65e-9dfe13d8-amend.hg |
|
487 | saved backup bundle to $TESTTMP/.hg/strip-backup/39a162f1d65e-9dfe13d8-amend.hg | |
488 | $ hg log -r . --template "{branch}\n" |
|
488 | $ hg log -r . --template "{branch}\n" | |
489 | a |
|
489 | a | |
490 | $ hg ci --amend -m "a''" |
|
490 | $ hg ci --amend -m "a''" | |
491 | saved backup bundle to $TESTTMP/.hg/strip-backup/d5ca7b1ac72b-0b4c1a34-amend.hg |
|
491 | saved backup bundle to $TESTTMP/.hg/strip-backup/d5ca7b1ac72b-0b4c1a34-amend.hg | |
492 | $ hg log -r . --template "{branch}\n" |
|
492 | $ hg log -r . --template "{branch}\n" | |
493 | a |
|
493 | a | |
494 |
|
494 | |||
495 | Also preserve other entries in the dict that are in the old commit, |
|
495 | Also preserve other entries in the dict that are in the old commit, | |
496 | first graft something so there's an additional entry: |
|
496 | first graft something so there's an additional entry: | |
497 |
|
497 | |||
498 | $ hg up 0 -q |
|
498 | $ hg up 0 -q | |
499 | $ echo z > z |
|
499 | $ echo z > z | |
500 | $ hg ci -Am 'fork' |
|
500 | $ hg ci -Am 'fork' | |
501 | adding z |
|
501 | adding z | |
502 | created new head |
|
502 | created new head | |
503 | $ hg up 11 |
|
503 | $ hg up 11 | |
504 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
504 | 5 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
505 | $ hg graft 12 |
|
505 | $ hg graft 12 | |
506 | grafting 12:2647734878ef "fork" (tip) |
|
506 | grafting 12:2647734878ef "fork" (tip) | |
507 | $ hg ci --amend -m 'graft amend' |
|
507 | $ hg ci --amend -m 'graft amend' | |
508 | saved backup bundle to $TESTTMP/.hg/strip-backup/fe8c6f7957ca-25638666-amend.hg |
|
508 | saved backup bundle to $TESTTMP/.hg/strip-backup/fe8c6f7957ca-25638666-amend.hg | |
509 | $ hg log -r . --debug | grep extra |
|
509 | $ hg log -r . --debug | grep extra | |
510 | extra: amend_source=fe8c6f7957ca1665ed77496ed7a07657d469ac60 |
|
510 | extra: amend_source=fe8c6f7957ca1665ed77496ed7a07657d469ac60 | |
511 | extra: branch=a |
|
511 | extra: branch=a | |
512 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
|
512 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a | |
513 |
|
513 | |||
514 | Preserve phase |
|
514 | Preserve phase | |
515 |
|
515 | |||
516 | $ hg phase '.^::.' |
|
516 | $ hg phase '.^::.' | |
517 | 11: draft |
|
517 | 11: draft | |
518 | 13: draft |
|
518 | 13: draft | |
519 | $ hg phase --secret --force . |
|
519 | $ hg phase --secret --force . | |
520 | $ hg phase '.^::.' |
|
520 | $ hg phase '.^::.' | |
521 | 11: draft |
|
521 | 11: draft | |
522 | 13: secret |
|
522 | 13: secret | |
523 | $ hg commit --amend -m 'amend for phase' -q |
|
523 | $ hg commit --amend -m 'amend for phase' -q | |
524 | $ hg phase '.^::.' |
|
524 | $ hg phase '.^::.' | |
525 | 11: draft |
|
525 | 11: draft | |
526 | 13: secret |
|
526 | 13: secret | |
527 |
|
527 | |||
528 | Test amend with obsolete |
|
528 | Test amend with obsolete | |
529 | --------------------------- |
|
529 | --------------------------- | |
530 |
|
530 | |||
531 | Enable obsolete |
|
531 | Enable obsolete | |
532 |
|
532 | |||
533 | $ cat >> $HGRCPATH << EOF |
|
533 | $ cat >> $HGRCPATH << EOF | |
534 | > [experimental] |
|
534 | > [experimental] | |
535 | > evolution.createmarkers=True |
|
535 | > evolution.createmarkers=True | |
536 | > evolution.allowunstable=True |
|
536 | > evolution.allowunstable=True | |
537 | > EOF |
|
537 | > EOF | |
538 |
|
538 | |||
539 | Amend with no files changes |
|
539 | Amend with no files changes | |
540 |
|
540 | |||
541 | $ hg id -n |
|
541 | $ hg id -n | |
542 | 13 |
|
542 | 13 | |
543 | $ hg ci --amend -m 'babar' |
|
543 | $ hg ci --amend -m 'babar' | |
544 | $ hg id -n |
|
544 | $ hg id -n | |
545 | 14 |
|
545 | 14 | |
546 | $ hg log -Gl 3 --style=compact |
|
546 | $ hg log -Gl 3 --style=compact | |
547 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test |
|
547 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
548 | | babar |
|
548 | | babar | |
549 | | |
|
549 | | | |
550 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
550 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
551 | | | fork |
|
551 | | | fork | |
552 | | ~ |
|
552 | | ~ | |
553 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
553 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
554 | | a'' |
|
554 | | a'' | |
555 | ~ |
|
555 | ~ | |
556 | $ hg log -Gl 4 --hidden --style=compact |
|
556 | $ hg log -Gl 4 --hidden --style=compact | |
557 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test |
|
557 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
558 | | babar |
|
558 | | babar | |
559 | | |
|
559 | | | |
560 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test |
|
560 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
561 | |/ amend for phase |
|
561 | |/ amend for phase | |
562 | | |
|
562 | | | |
563 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
563 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
564 | | | fork |
|
564 | | | fork | |
565 | | ~ |
|
565 | | ~ | |
566 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
566 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
567 | | a'' |
|
567 | | a'' | |
568 | ~ |
|
568 | ~ | |
569 |
|
569 | |||
570 | Amend with files changes |
|
570 | Amend with files changes | |
571 |
|
571 | |||
572 | (note: the extra commit over 15 is a temporary junk I would be happy to get |
|
572 | (note: the extra commit over 15 is a temporary junk I would be happy to get | |
573 | ride of) |
|
573 | ride of) | |
574 |
|
574 | |||
575 | $ echo 'babar' >> a |
|
575 | $ echo 'babar' >> a | |
576 | $ hg commit --amend |
|
576 | $ hg commit --amend | |
577 | $ hg log -Gl 6 --hidden --style=compact |
|
577 | $ hg log -Gl 6 --hidden --style=compact | |
578 | @ 15[tip]:11 a5b42b49b0d5 1970-01-01 00:00 +0000 test |
|
578 | @ 15[tip]:11 a5b42b49b0d5 1970-01-01 00:00 +0000 test | |
579 | | babar |
|
579 | | babar | |
580 | | |
|
580 | | | |
581 | | x 14:11 682950e85999 1970-01-01 00:00 +0000 test |
|
581 | | x 14:11 682950e85999 1970-01-01 00:00 +0000 test | |
582 | |/ babar |
|
582 | |/ babar | |
583 | | |
|
583 | | | |
584 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test |
|
584 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
585 | |/ amend for phase |
|
585 | |/ amend for phase | |
586 | | |
|
586 | | | |
587 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
587 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
588 | | | fork |
|
588 | | | fork | |
589 | | ~ |
|
589 | | ~ | |
590 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test |
|
590 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
591 | | a'' |
|
591 | | a'' | |
592 | | |
|
592 | | | |
593 | o 10 5fa75032e226 1970-01-01 00:00 +0000 test |
|
593 | o 10 5fa75032e226 1970-01-01 00:00 +0000 test | |
594 | | g |
|
594 | | g | |
595 | ~ |
|
595 | ~ | |
596 |
|
596 | |||
597 |
|
597 | |||
598 | Test that amend does not make it easy to create obsolescence cycle |
|
598 | Test that amend does not make it easy to create obsolescence cycle | |
599 | --------------------------------------------------------------------- |
|
599 | --------------------------------------------------------------------- | |
600 |
|
600 | |||
601 | $ hg id -r 14 --hidden |
|
601 | $ hg id -r 14 --hidden | |
602 | 682950e85999 (a) |
|
602 | 682950e85999 (a) | |
603 | $ hg revert -ar 14 --hidden |
|
603 | $ hg revert -ar 14 --hidden | |
604 | reverting a |
|
604 | reverting a | |
605 | $ hg commit --amend |
|
605 | $ hg commit --amend | |
606 | $ hg id |
|
606 | $ hg id | |
607 | 37973c7e0b61 (a) tip |
|
607 | 37973c7e0b61 (a) tip | |
608 |
|
608 | |||
609 | Test that rewriting leaving instability behind is allowed |
|
609 | Test that rewriting leaving instability behind is allowed | |
610 | --------------------------------------------------------------------- |
|
610 | --------------------------------------------------------------------- | |
611 |
|
611 | |||
612 | $ hg up '.^' |
|
612 | $ hg up '.^' | |
613 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
613 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
614 | $ echo 'b' >> a |
|
614 | $ echo 'b' >> a | |
615 | $ hg log --style compact -r 'children(.)' |
|
615 | $ hg log --style compact -r 'children(.)' | |
616 | 16[tip]:11 37973c7e0b61 1970-01-01 00:00 +0000 test |
|
616 | 16[tip]:11 37973c7e0b61 1970-01-01 00:00 +0000 test | |
617 | babar |
|
617 | babar | |
618 |
|
618 | |||
619 | $ hg commit --amend |
|
619 | $ hg commit --amend | |
620 | 1 new orphan changesets |
|
620 | 1 new orphan changesets | |
621 | $ hg log -r 'orphan()' |
|
621 | $ hg log -r 'orphan()' | |
622 | changeset: 16:37973c7e0b61 |
|
622 | changeset: 16:37973c7e0b61 | |
623 | branch: a |
|
623 | branch: a | |
624 | parent: 11:0ddb275cfad1 |
|
624 | parent: 11:0ddb275cfad1 | |
625 | user: test |
|
625 | user: test | |
626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
626 | date: Thu Jan 01 00:00:00 1970 +0000 | |
627 | instability: orphan |
|
627 | instability: orphan | |
628 | summary: babar |
|
628 | summary: babar | |
629 |
|
629 | |||
630 |
|
630 | |||
631 | Amend a merge changeset (with renames and conflicts from the second parent): |
|
631 | Amend a merge changeset (with renames and conflicts from the second parent): | |
632 |
|
632 | |||
633 | $ hg up -q default |
|
633 | $ hg up -q default | |
634 | $ hg branch -q bar |
|
634 | $ hg branch -q bar | |
635 | $ hg cp a aa |
|
635 | $ hg cp a aa | |
636 | $ hg mv z zz |
|
636 | $ hg mv z zz | |
637 | $ echo cc > cc |
|
637 | $ echo cc > cc | |
638 | $ hg add cc |
|
638 | $ hg add cc | |
639 | $ hg ci -m aazzcc |
|
639 | $ hg ci -m aazzcc | |
640 | $ hg up -q default |
|
640 | $ hg up -q default | |
641 | $ echo a >> a |
|
641 | $ echo a >> a | |
642 | $ echo dd > cc |
|
642 | $ echo dd > cc | |
643 | $ hg add cc |
|
643 | $ hg add cc | |
644 | $ hg ci -m aa |
|
644 | $ hg ci -m aa | |
645 | $ hg merge -q bar |
|
645 | $ hg merge -q bar | |
646 | warning: conflicts while merging cc! (edit, then use 'hg resolve --mark') |
|
646 | warning: conflicts while merging cc! (edit, then use 'hg resolve --mark') | |
647 | [1] |
|
647 | [1] | |
648 | $ hg resolve -m cc |
|
648 | $ hg resolve -m cc | |
649 | (no more unresolved files) |
|
649 | (no more unresolved files) | |
650 | $ hg ci -m 'merge bar' |
|
650 | $ hg ci -m 'merge bar' | |
651 | $ hg log --config diff.git=1 -pr . |
|
651 | $ hg log --config diff.git=1 -pr . | |
652 | changeset: 20:163cfd7219f7 |
|
652 | changeset: 20:163cfd7219f7 | |
653 | tag: tip |
|
653 | tag: tip | |
654 | parent: 19:30d96aeaf27b |
|
654 | parent: 19:30d96aeaf27b | |
655 | parent: 18:1aa437659d19 |
|
655 | parent: 18:1aa437659d19 | |
656 | user: test |
|
656 | user: test | |
657 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
657 | date: Thu Jan 01 00:00:00 1970 +0000 | |
658 | summary: merge bar |
|
658 | summary: merge bar | |
659 |
|
659 | |||
660 | diff --git a/a b/aa |
|
660 | diff --git a/a b/aa | |
661 | copy from a |
|
661 | copy from a | |
662 | copy to aa |
|
662 | copy to aa | |
663 | diff --git a/cc b/cc |
|
663 | diff --git a/cc b/cc | |
664 | --- a/cc |
|
664 | --- a/cc | |
665 | +++ b/cc |
|
665 | +++ b/cc | |
666 | @@ -1,1 +1,5 @@ |
|
666 | @@ -1,1 +1,5 @@ | |
667 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
667 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
668 | dd |
|
668 | dd | |
669 | +======= |
|
669 | +======= | |
670 | +cc |
|
670 | +cc | |
671 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
671 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
672 | diff --git a/z b/zz |
|
672 | diff --git a/z b/zz | |
673 | rename from z |
|
673 | rename from z | |
674 | rename to zz |
|
674 | rename to zz | |
675 |
|
675 | |||
676 | $ hg debugrename aa |
|
676 | $ hg debugrename aa | |
677 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
677 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
678 | $ hg debugrename zz |
|
678 | $ hg debugrename zz | |
679 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
679 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
680 | $ hg debugrename cc |
|
680 | $ hg debugrename cc | |
681 | cc not renamed |
|
681 | cc not renamed | |
682 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit |
|
682 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit | |
683 | HGEDITFORM=commit.amend.merge |
|
683 | HGEDITFORM=commit.amend.merge | |
684 | $ hg log --config diff.git=1 -pr . |
|
684 | $ hg log --config diff.git=1 -pr . | |
685 | changeset: 21:bca52d4ed186 |
|
685 | changeset: 21:bca52d4ed186 | |
686 | tag: tip |
|
686 | tag: tip | |
687 | parent: 19:30d96aeaf27b |
|
687 | parent: 19:30d96aeaf27b | |
688 | parent: 18:1aa437659d19 |
|
688 | parent: 18:1aa437659d19 | |
689 | user: test |
|
689 | user: test | |
690 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
690 | date: Thu Jan 01 00:00:00 1970 +0000 | |
691 | summary: merge bar (amend message) |
|
691 | summary: merge bar (amend message) | |
692 |
|
692 | |||
693 | diff --git a/a b/aa |
|
693 | diff --git a/a b/aa | |
694 | copy from a |
|
694 | copy from a | |
695 | copy to aa |
|
695 | copy to aa | |
696 | diff --git a/cc b/cc |
|
696 | diff --git a/cc b/cc | |
697 | --- a/cc |
|
697 | --- a/cc | |
698 | +++ b/cc |
|
698 | +++ b/cc | |
699 | @@ -1,1 +1,5 @@ |
|
699 | @@ -1,1 +1,5 @@ | |
700 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
700 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
701 | dd |
|
701 | dd | |
702 | +======= |
|
702 | +======= | |
703 | +cc |
|
703 | +cc | |
704 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
704 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
705 | diff --git a/z b/zz |
|
705 | diff --git a/z b/zz | |
706 | rename from z |
|
706 | rename from z | |
707 | rename to zz |
|
707 | rename to zz | |
708 |
|
708 | |||
709 | $ hg debugrename aa |
|
709 | $ hg debugrename aa | |
710 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
710 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
711 | $ hg debugrename zz |
|
711 | $ hg debugrename zz | |
712 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a |
|
712 | zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a | |
713 | $ hg debugrename cc |
|
713 | $ hg debugrename cc | |
714 | cc not renamed |
|
714 | cc not renamed | |
715 | $ hg mv zz z |
|
715 | $ hg mv zz z | |
716 | $ hg ci --amend -m 'merge bar (undo rename)' |
|
716 | $ hg ci --amend -m 'merge bar (undo rename)' | |
717 | $ hg log --config diff.git=1 -pr . |
|
717 | $ hg log --config diff.git=1 -pr . | |
718 | changeset: 22:12594a98ca3f |
|
718 | changeset: 22:12594a98ca3f | |
719 | tag: tip |
|
719 | tag: tip | |
720 | parent: 19:30d96aeaf27b |
|
720 | parent: 19:30d96aeaf27b | |
721 | parent: 18:1aa437659d19 |
|
721 | parent: 18:1aa437659d19 | |
722 | user: test |
|
722 | user: test | |
723 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
723 | date: Thu Jan 01 00:00:00 1970 +0000 | |
724 | summary: merge bar (undo rename) |
|
724 | summary: merge bar (undo rename) | |
725 |
|
725 | |||
726 | diff --git a/a b/aa |
|
726 | diff --git a/a b/aa | |
727 | copy from a |
|
727 | copy from a | |
728 | copy to aa |
|
728 | copy to aa | |
729 | diff --git a/cc b/cc |
|
729 | diff --git a/cc b/cc | |
730 | --- a/cc |
|
730 | --- a/cc | |
731 | +++ b/cc |
|
731 | +++ b/cc | |
732 | @@ -1,1 +1,5 @@ |
|
732 | @@ -1,1 +1,5 @@ | |
733 | +<<<<<<< working copy: 30d96aeaf27b - test: aa |
|
733 | +<<<<<<< working copy: 30d96aeaf27b - test: aa | |
734 | dd |
|
734 | dd | |
735 | +======= |
|
735 | +======= | |
736 | +cc |
|
736 | +cc | |
737 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc |
|
737 | +>>>>>>> merge rev: 1aa437659d19 bar - test: aazzcc | |
738 |
|
738 | |||
739 | $ hg debugrename z |
|
739 | $ hg debugrename z | |
740 | z not renamed |
|
740 | z not renamed | |
741 |
|
741 | |||
742 | Amend a merge changeset (with renames during the merge): |
|
742 | Amend a merge changeset (with renames during the merge): | |
743 |
|
743 | |||
744 | $ hg up -q bar |
|
744 | $ hg up -q bar | |
745 | $ echo x > x |
|
745 | $ echo x > x | |
746 | $ hg add x |
|
746 | $ hg add x | |
747 | $ hg ci -m x |
|
747 | $ hg ci -m x | |
748 | $ hg up -q default |
|
748 | $ hg up -q default | |
749 | $ hg merge -q bar |
|
749 | $ hg merge -q bar | |
750 | $ hg mv aa aaa |
|
750 | $ hg mv aa aaa | |
751 | $ echo aa >> aaa |
|
751 | $ echo aa >> aaa | |
752 | $ hg ci -m 'merge bar again' |
|
752 | $ hg ci -m 'merge bar again' | |
753 | $ hg log --config diff.git=1 -pr . |
|
753 | $ hg log --config diff.git=1 -pr . | |
754 | changeset: 24:dffde028b388 |
|
754 | changeset: 24:dffde028b388 | |
755 | tag: tip |
|
755 | tag: tip | |
756 | parent: 22:12594a98ca3f |
|
756 | parent: 22:12594a98ca3f | |
757 | parent: 23:4c94d5bc65f5 |
|
757 | parent: 23:4c94d5bc65f5 | |
758 | user: test |
|
758 | user: test | |
759 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
759 | date: Thu Jan 01 00:00:00 1970 +0000 | |
760 | summary: merge bar again |
|
760 | summary: merge bar again | |
761 |
|
761 | |||
762 | diff --git a/aa b/aa |
|
762 | diff --git a/aa b/aa | |
763 | deleted file mode 100644 |
|
763 | deleted file mode 100644 | |
764 | --- a/aa |
|
764 | --- a/aa | |
765 | +++ /dev/null |
|
765 | +++ /dev/null | |
766 | @@ -1,2 +0,0 @@ |
|
766 | @@ -1,2 +0,0 @@ | |
767 | -a |
|
767 | -a | |
768 | -a |
|
768 | -a | |
769 | diff --git a/aaa b/aaa |
|
769 | diff --git a/aaa b/aaa | |
770 | new file mode 100644 |
|
770 | new file mode 100644 | |
771 | --- /dev/null |
|
771 | --- /dev/null | |
772 | +++ b/aaa |
|
772 | +++ b/aaa | |
773 | @@ -0,0 +1,3 @@ |
|
773 | @@ -0,0 +1,3 @@ | |
774 | +a |
|
774 | +a | |
775 | +a |
|
775 | +a | |
776 | +aa |
|
776 | +aa | |
777 | diff --git a/x b/x |
|
777 | diff --git a/x b/x | |
778 | new file mode 100644 |
|
778 | new file mode 100644 | |
779 | --- /dev/null |
|
779 | --- /dev/null | |
780 | +++ b/x |
|
780 | +++ b/x | |
781 | @@ -0,0 +1,1 @@ |
|
781 | @@ -0,0 +1,1 @@ | |
782 | +x |
|
782 | +x | |
783 |
|
783 | |||
784 | $ hg debugrename aaa |
|
784 | $ hg debugrename aaa | |
785 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 |
|
785 | aaa renamed from aa:37d9b5d994eab34eda9c16b195ace52c7b129980 | |
786 | $ hg mv aaa aa |
|
786 | $ hg mv aaa aa | |
787 | $ hg ci --amend -m 'merge bar again (undo rename)' |
|
787 | $ hg ci --amend -m 'merge bar again (undo rename)' | |
788 | $ hg log --config diff.git=1 -pr . |
|
788 | $ hg log --config diff.git=1 -pr . | |
789 | changeset: 25:18e3ba160489 |
|
789 | changeset: 25:18e3ba160489 | |
790 | tag: tip |
|
790 | tag: tip | |
791 | parent: 22:12594a98ca3f |
|
791 | parent: 22:12594a98ca3f | |
792 | parent: 23:4c94d5bc65f5 |
|
792 | parent: 23:4c94d5bc65f5 | |
793 | user: test |
|
793 | user: test | |
794 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
794 | date: Thu Jan 01 00:00:00 1970 +0000 | |
795 | summary: merge bar again (undo rename) |
|
795 | summary: merge bar again (undo rename) | |
796 |
|
796 | |||
797 | diff --git a/aa b/aa |
|
797 | diff --git a/aa b/aa | |
798 | --- a/aa |
|
798 | --- a/aa | |
799 | +++ b/aa |
|
799 | +++ b/aa | |
800 | @@ -1,2 +1,3 @@ |
|
800 | @@ -1,2 +1,3 @@ | |
801 | a |
|
801 | a | |
802 | a |
|
802 | a | |
803 | +aa |
|
803 | +aa | |
804 | diff --git a/x b/x |
|
804 | diff --git a/x b/x | |
805 | new file mode 100644 |
|
805 | new file mode 100644 | |
806 | --- /dev/null |
|
806 | --- /dev/null | |
807 | +++ b/x |
|
807 | +++ b/x | |
808 | @@ -0,0 +1,1 @@ |
|
808 | @@ -0,0 +1,1 @@ | |
809 | +x |
|
809 | +x | |
810 |
|
810 | |||
811 | $ hg debugrename aa |
|
811 | $ hg debugrename aa | |
812 | aa not renamed |
|
812 | aa not renamed | |
813 | $ hg debugrename -r '.^' aa |
|
813 | $ hg debugrename -r '.^' aa | |
814 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e |
|
814 | aa renamed from a:a80d06849b333b8a3d5c445f8ba3142010dcdc9e | |
815 |
|
815 | |||
816 | Amend a merge changeset (with manifest-level conflicts): |
|
816 | Amend a merge changeset (with manifest-level conflicts): | |
817 |
|
817 | |||
818 | $ hg up -q bar |
|
818 | $ hg up -q bar | |
819 | $ hg rm aa |
|
819 | $ hg rm aa | |
820 | $ hg ci -m 'rm aa' |
|
820 | $ hg ci -m 'rm aa' | |
821 | $ hg up -q default |
|
821 | $ hg up -q default | |
822 | $ echo aa >> aa |
|
822 | $ echo aa >> aa | |
823 | $ hg ci -m aa |
|
823 | $ hg ci -m aa | |
824 | $ hg merge -q bar --config ui.interactive=True << EOF |
|
824 | $ hg merge -q bar --config ui.interactive=True << EOF | |
825 | > c |
|
825 | > c | |
826 | > EOF |
|
826 | > EOF | |
827 |
local [working copy] |
|
827 | file aa was deleted in local [working copy] but was modified in other [merge rev]. | |
|
828 | What do you want to do? | |||
828 |
|
|
829 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
829 | $ hg ci -m 'merge bar (with conflicts)' |
|
830 | $ hg ci -m 'merge bar (with conflicts)' | |
830 | $ hg log --config diff.git=1 -pr . |
|
831 | $ hg log --config diff.git=1 -pr . | |
831 | changeset: 28:b4c3035e2544 |
|
832 | changeset: 28:b4c3035e2544 | |
832 | tag: tip |
|
833 | tag: tip | |
833 | parent: 27:4b216ca5ba97 |
|
834 | parent: 27:4b216ca5ba97 | |
834 | parent: 26:67db8847a540 |
|
835 | parent: 26:67db8847a540 | |
835 | user: test |
|
836 | user: test | |
836 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
837 | date: Thu Jan 01 00:00:00 1970 +0000 | |
837 | summary: merge bar (with conflicts) |
|
838 | summary: merge bar (with conflicts) | |
838 |
|
839 | |||
839 |
|
840 | |||
840 | $ hg rm aa |
|
841 | $ hg rm aa | |
841 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' |
|
842 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' | |
842 | $ hg log --config diff.git=1 -pr . |
|
843 | $ hg log --config diff.git=1 -pr . | |
843 | changeset: 29:1205ed810051 |
|
844 | changeset: 29:1205ed810051 | |
844 | tag: tip |
|
845 | tag: tip | |
845 | parent: 27:4b216ca5ba97 |
|
846 | parent: 27:4b216ca5ba97 | |
846 | parent: 26:67db8847a540 |
|
847 | parent: 26:67db8847a540 | |
847 | user: test |
|
848 | user: test | |
848 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
849 | date: Thu Jan 01 00:00:00 1970 +0000 | |
849 | summary: merge bar (with conflicts, amended) |
|
850 | summary: merge bar (with conflicts, amended) | |
850 |
|
851 | |||
851 | diff --git a/aa b/aa |
|
852 | diff --git a/aa b/aa | |
852 | deleted file mode 100644 |
|
853 | deleted file mode 100644 | |
853 | --- a/aa |
|
854 | --- a/aa | |
854 | +++ /dev/null |
|
855 | +++ /dev/null | |
855 | @@ -1,4 +0,0 @@ |
|
856 | @@ -1,4 +0,0 @@ | |
856 | -a |
|
857 | -a | |
857 | -a |
|
858 | -a | |
858 | -aa |
|
859 | -aa | |
859 | -aa |
|
860 | -aa | |
860 |
|
861 | |||
861 | Issue 3445: amending with --close-branch a commit that created a new head should fail |
|
862 | Issue 3445: amending with --close-branch a commit that created a new head should fail | |
862 | This shouldn't be possible: |
|
863 | This shouldn't be possible: | |
863 |
|
864 | |||
864 | $ hg up -q default |
|
865 | $ hg up -q default | |
865 | $ hg branch closewithamend |
|
866 | $ hg branch closewithamend | |
866 | marked working directory as branch closewithamend |
|
867 | marked working directory as branch closewithamend | |
867 | $ echo foo > foo |
|
868 | $ echo foo > foo | |
868 | $ hg add foo |
|
869 | $ hg add foo | |
869 | $ hg ci -m.. |
|
870 | $ hg ci -m.. | |
870 | $ hg ci --amend --close-branch -m 'closing' |
|
871 | $ hg ci --amend --close-branch -m 'closing' | |
871 | abort: can only close branch heads |
|
872 | abort: can only close branch heads | |
872 | [255] |
|
873 | [255] | |
873 |
|
874 | |||
874 | This silliness fails: |
|
875 | This silliness fails: | |
875 |
|
876 | |||
876 | $ hg branch silliness |
|
877 | $ hg branch silliness | |
877 | marked working directory as branch silliness |
|
878 | marked working directory as branch silliness | |
878 | $ echo b >> b |
|
879 | $ echo b >> b | |
879 | $ hg ci --close-branch -m'open and close' |
|
880 | $ hg ci --close-branch -m'open and close' | |
880 | abort: can only close branch heads |
|
881 | abort: can only close branch heads | |
881 | [255] |
|
882 | [255] | |
882 |
|
883 | |||
883 | Test that amend with --secret creates new secret changeset forcibly |
|
884 | Test that amend with --secret creates new secret changeset forcibly | |
884 | --------------------------------------------------------------------- |
|
885 | --------------------------------------------------------------------- | |
885 |
|
886 | |||
886 | $ hg phase '.^::.' |
|
887 | $ hg phase '.^::.' | |
887 | 29: draft |
|
888 | 29: draft | |
888 | 30: draft |
|
889 | 30: draft | |
889 | $ hg commit --amend --secret -m 'amend as secret' -q |
|
890 | $ hg commit --amend --secret -m 'amend as secret' -q | |
890 | $ hg phase '.^::.' |
|
891 | $ hg phase '.^::.' | |
891 | 29: draft |
|
892 | 29: draft | |
892 | 31: secret |
|
893 | 31: secret | |
893 |
|
894 | |||
894 | Test that amend with --edit invokes editor forcibly |
|
895 | Test that amend with --edit invokes editor forcibly | |
895 | --------------------------------------------------- |
|
896 | --------------------------------------------------- | |
896 |
|
897 | |||
897 | $ hg parents --template "{desc}\n" |
|
898 | $ hg parents --template "{desc}\n" | |
898 | amend as secret |
|
899 | amend as secret | |
899 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" |
|
900 | $ HGEDITOR=cat hg commit --amend -m "editor should be suppressed" | |
900 | $ hg parents --template "{desc}\n" |
|
901 | $ hg parents --template "{desc}\n" | |
901 | editor should be suppressed |
|
902 | editor should be suppressed | |
902 |
|
903 | |||
903 | $ hg status --rev '.^1::.' |
|
904 | $ hg status --rev '.^1::.' | |
904 | A foo |
|
905 | A foo | |
905 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit |
|
906 | $ HGEDITOR=cat hg commit --amend -m "editor should be invoked" --edit | |
906 | editor should be invoked |
|
907 | editor should be invoked | |
907 |
|
908 | |||
908 |
|
909 | |||
909 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
910 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
910 | HG: Leave message empty to abort commit. |
|
911 | HG: Leave message empty to abort commit. | |
911 | HG: -- |
|
912 | HG: -- | |
912 | HG: user: test |
|
913 | HG: user: test | |
913 | HG: branch 'silliness' |
|
914 | HG: branch 'silliness' | |
914 | HG: added foo |
|
915 | HG: added foo | |
915 | $ hg parents --template "{desc}\n" |
|
916 | $ hg parents --template "{desc}\n" | |
916 | editor should be invoked |
|
917 | editor should be invoked | |
917 |
|
918 | |||
918 | Test that "diff()" in committemplate works correctly for amending |
|
919 | Test that "diff()" in committemplate works correctly for amending | |
919 | ----------------------------------------------------------------- |
|
920 | ----------------------------------------------------------------- | |
920 |
|
921 | |||
921 | $ cat >> .hg/hgrc <<EOF |
|
922 | $ cat >> .hg/hgrc <<EOF | |
922 | > [committemplate] |
|
923 | > [committemplate] | |
923 | > changeset.commit.amend = {desc}\n |
|
924 | > changeset.commit.amend = {desc}\n | |
924 | > HG: M: {file_mods} |
|
925 | > HG: M: {file_mods} | |
925 | > HG: A: {file_adds} |
|
926 | > HG: A: {file_adds} | |
926 | > HG: R: {file_dels} |
|
927 | > HG: R: {file_dels} | |
927 | > {splitlines(diff()) % 'HG: {line}\n'} |
|
928 | > {splitlines(diff()) % 'HG: {line}\n'} | |
928 | > EOF |
|
929 | > EOF | |
929 |
|
930 | |||
930 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" |
|
931 | $ hg parents --template "M: {file_mods}\nA: {file_adds}\nR: {file_dels}\n" | |
931 | M: |
|
932 | M: | |
932 | A: foo |
|
933 | A: foo | |
933 | R: |
|
934 | R: | |
934 | $ hg status -amr |
|
935 | $ hg status -amr | |
935 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" |
|
936 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo" | |
936 | expecting diff of foo |
|
937 | expecting diff of foo | |
937 |
|
938 | |||
938 | HG: M: |
|
939 | HG: M: | |
939 | HG: A: foo |
|
940 | HG: A: foo | |
940 | HG: R: |
|
941 | HG: R: | |
941 | HG: diff -r 1205ed810051 foo |
|
942 | HG: diff -r 1205ed810051 foo | |
942 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
943 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
943 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
944 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
944 | HG: @@ -0,0 +1,1 @@ |
|
945 | HG: @@ -0,0 +1,1 @@ | |
945 | HG: +foo |
|
946 | HG: +foo | |
946 |
|
947 | |||
947 | $ echo y > y |
|
948 | $ echo y > y | |
948 | $ hg add y |
|
949 | $ hg add y | |
949 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" |
|
950 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of foo and y" | |
950 | expecting diff of foo and y |
|
951 | expecting diff of foo and y | |
951 |
|
952 | |||
952 | HG: M: |
|
953 | HG: M: | |
953 | HG: A: foo y |
|
954 | HG: A: foo y | |
954 | HG: R: |
|
955 | HG: R: | |
955 | HG: diff -r 1205ed810051 foo |
|
956 | HG: diff -r 1205ed810051 foo | |
956 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
957 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
957 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
958 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
958 | HG: @@ -0,0 +1,1 @@ |
|
959 | HG: @@ -0,0 +1,1 @@ | |
959 | HG: +foo |
|
960 | HG: +foo | |
960 | HG: diff -r 1205ed810051 y |
|
961 | HG: diff -r 1205ed810051 y | |
961 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
962 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
962 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
963 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
963 | HG: @@ -0,0 +1,1 @@ |
|
964 | HG: @@ -0,0 +1,1 @@ | |
964 | HG: +y |
|
965 | HG: +y | |
965 |
|
966 | |||
966 | $ hg rm a |
|
967 | $ hg rm a | |
967 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" |
|
968 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo and y" | |
968 | expecting diff of a, foo and y |
|
969 | expecting diff of a, foo and y | |
969 |
|
970 | |||
970 | HG: M: |
|
971 | HG: M: | |
971 | HG: A: foo y |
|
972 | HG: A: foo y | |
972 | HG: R: a |
|
973 | HG: R: a | |
973 | HG: diff -r 1205ed810051 a |
|
974 | HG: diff -r 1205ed810051 a | |
974 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
975 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
975 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
976 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
976 | HG: @@ -1,2 +0,0 @@ |
|
977 | HG: @@ -1,2 +0,0 @@ | |
977 | HG: -a |
|
978 | HG: -a | |
978 | HG: -a |
|
979 | HG: -a | |
979 | HG: diff -r 1205ed810051 foo |
|
980 | HG: diff -r 1205ed810051 foo | |
980 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
981 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
981 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
982 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
982 | HG: @@ -0,0 +1,1 @@ |
|
983 | HG: @@ -0,0 +1,1 @@ | |
983 | HG: +foo |
|
984 | HG: +foo | |
984 | HG: diff -r 1205ed810051 y |
|
985 | HG: diff -r 1205ed810051 y | |
985 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
986 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
986 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
987 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
987 | HG: @@ -0,0 +1,1 @@ |
|
988 | HG: @@ -0,0 +1,1 @@ | |
988 | HG: +y |
|
989 | HG: +y | |
989 |
|
990 | |||
990 | $ hg rm x |
|
991 | $ hg rm x | |
991 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" |
|
992 | $ HGEDITOR=cat hg commit --amend -e -m "expecting diff of a, foo, x and y" | |
992 | expecting diff of a, foo, x and y |
|
993 | expecting diff of a, foo, x and y | |
993 |
|
994 | |||
994 | HG: M: |
|
995 | HG: M: | |
995 | HG: A: foo y |
|
996 | HG: A: foo y | |
996 | HG: R: a x |
|
997 | HG: R: a x | |
997 | HG: diff -r 1205ed810051 a |
|
998 | HG: diff -r 1205ed810051 a | |
998 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
999 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
999 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1000 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1000 | HG: @@ -1,2 +0,0 @@ |
|
1001 | HG: @@ -1,2 +0,0 @@ | |
1001 | HG: -a |
|
1002 | HG: -a | |
1002 | HG: -a |
|
1003 | HG: -a | |
1003 | HG: diff -r 1205ed810051 foo |
|
1004 | HG: diff -r 1205ed810051 foo | |
1004 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1005 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1005 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
1006 | HG: @@ -0,0 +1,1 @@ |
|
1007 | HG: @@ -0,0 +1,1 @@ | |
1007 | HG: +foo |
|
1008 | HG: +foo | |
1008 | HG: diff -r 1205ed810051 x |
|
1009 | HG: diff -r 1205ed810051 x | |
1009 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
|
1010 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | |
1010 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1011 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1011 | HG: @@ -1,1 +0,0 @@ |
|
1012 | HG: @@ -1,1 +0,0 @@ | |
1012 | HG: -x |
|
1013 | HG: -x | |
1013 | HG: diff -r 1205ed810051 y |
|
1014 | HG: diff -r 1205ed810051 y | |
1014 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1015 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1015 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
1016 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
1016 | HG: @@ -0,0 +1,1 @@ |
|
1017 | HG: @@ -0,0 +1,1 @@ | |
1017 | HG: +y |
|
1018 | HG: +y | |
1018 |
|
1019 | |||
1019 | $ echo cccc >> cc |
|
1020 | $ echo cccc >> cc | |
1020 | $ hg status -amr |
|
1021 | $ hg status -amr | |
1021 | M cc |
|
1022 | M cc | |
1022 | $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc |
|
1023 | $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc | |
1023 | cc should be excluded |
|
1024 | cc should be excluded | |
1024 |
|
1025 | |||
1025 | HG: M: |
|
1026 | HG: M: | |
1026 | HG: A: foo y |
|
1027 | HG: A: foo y | |
1027 | HG: R: a x |
|
1028 | HG: R: a x | |
1028 | HG: diff -r 1205ed810051 a |
|
1029 | HG: diff -r 1205ed810051 a | |
1029 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1030 | HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1030 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1031 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1031 | HG: @@ -1,2 +0,0 @@ |
|
1032 | HG: @@ -1,2 +0,0 @@ | |
1032 | HG: -a |
|
1033 | HG: -a | |
1033 | HG: -a |
|
1034 | HG: -a | |
1034 | HG: diff -r 1205ed810051 foo |
|
1035 | HG: diff -r 1205ed810051 foo | |
1035 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1036 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1036 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
1037 | HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
1037 | HG: @@ -0,0 +1,1 @@ |
|
1038 | HG: @@ -0,0 +1,1 @@ | |
1038 | HG: +foo |
|
1039 | HG: +foo | |
1039 | HG: diff -r 1205ed810051 x |
|
1040 | HG: diff -r 1205ed810051 x | |
1040 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 |
|
1041 | HG: --- a/x Thu Jan 01 00:00:00 1970 +0000 | |
1041 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1042 | HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1042 | HG: @@ -1,1 +0,0 @@ |
|
1043 | HG: @@ -1,1 +0,0 @@ | |
1043 | HG: -x |
|
1044 | HG: -x | |
1044 | HG: diff -r 1205ed810051 y |
|
1045 | HG: diff -r 1205ed810051 y | |
1045 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1046 | HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1046 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 |
|
1047 | HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000 | |
1047 | HG: @@ -0,0 +1,1 @@ |
|
1048 | HG: @@ -0,0 +1,1 @@ | |
1048 | HG: +y |
|
1049 | HG: +y | |
1049 |
|
1050 | |||
1050 | Check for issue4405 |
|
1051 | Check for issue4405 | |
1051 | ------------------- |
|
1052 | ------------------- | |
1052 |
|
1053 | |||
1053 | Setup the repo with a file that gets moved in a second commit. |
|
1054 | Setup the repo with a file that gets moved in a second commit. | |
1054 | $ hg init repo |
|
1055 | $ hg init repo | |
1055 | $ cd repo |
|
1056 | $ cd repo | |
1056 | $ touch a0 |
|
1057 | $ touch a0 | |
1057 | $ hg add a0 |
|
1058 | $ hg add a0 | |
1058 | $ hg commit -m a0 |
|
1059 | $ hg commit -m a0 | |
1059 | $ hg mv a0 a1 |
|
1060 | $ hg mv a0 a1 | |
1060 | $ hg commit -m a1 |
|
1061 | $ hg commit -m a1 | |
1061 | $ hg up -q 0 |
|
1062 | $ hg up -q 0 | |
1062 | $ hg log -G --template '{rev} {desc}' |
|
1063 | $ hg log -G --template '{rev} {desc}' | |
1063 | o 1 a1 |
|
1064 | o 1 a1 | |
1064 | | |
|
1065 | | | |
1065 | @ 0 a0 |
|
1066 | @ 0 a0 | |
1066 |
|
1067 | |||
1067 |
|
1068 | |||
1068 | Now we branch the repro, but re-use the file contents, so we have a divergence |
|
1069 | Now we branch the repro, but re-use the file contents, so we have a divergence | |
1069 | in the file revlog topology and the changelog topology. |
|
1070 | in the file revlog topology and the changelog topology. | |
1070 | $ hg revert --rev 1 --all |
|
1071 | $ hg revert --rev 1 --all | |
1071 | removing a0 |
|
1072 | removing a0 | |
1072 | adding a1 |
|
1073 | adding a1 | |
1073 | $ hg ci -qm 'a1-amend' |
|
1074 | $ hg ci -qm 'a1-amend' | |
1074 | $ hg log -G --template '{rev} {desc}' |
|
1075 | $ hg log -G --template '{rev} {desc}' | |
1075 | @ 2 a1-amend |
|
1076 | @ 2 a1-amend | |
1076 | | |
|
1077 | | | |
1077 | | o 1 a1 |
|
1078 | | o 1 a1 | |
1078 | |/ |
|
1079 | |/ | |
1079 | o 0 a0 |
|
1080 | o 0 a0 | |
1080 |
|
1081 | |||
1081 |
|
1082 | |||
1082 | The way mercurial does amends is by folding the working copy and old commit |
|
1083 | The way mercurial does amends is by folding the working copy and old commit | |
1083 | together into another commit (rev 3). During this process, _findlimit is called |
|
1084 | together into another commit (rev 3). During this process, _findlimit is called | |
1084 | to check how far back to look for the transitive closure of file copy |
|
1085 | to check how far back to look for the transitive closure of file copy | |
1085 | information, but due to the divergence of the filelog and changelog graph |
|
1086 | information, but due to the divergence of the filelog and changelog graph | |
1086 | topologies, before _findlimit was fixed, it returned a rev which was not far |
|
1087 | topologies, before _findlimit was fixed, it returned a rev which was not far | |
1087 | enough back in this case. |
|
1088 | enough back in this case. | |
1088 | $ hg mv a1 a2 |
|
1089 | $ hg mv a1 a2 | |
1089 | $ hg status --copies --rev 0 |
|
1090 | $ hg status --copies --rev 0 | |
1090 | A a2 |
|
1091 | A a2 | |
1091 | a0 |
|
1092 | a0 | |
1092 | R a0 |
|
1093 | R a0 | |
1093 | $ hg ci --amend -q |
|
1094 | $ hg ci --amend -q | |
1094 | $ hg log -G --template '{rev} {desc}' |
|
1095 | $ hg log -G --template '{rev} {desc}' | |
1095 | @ 3 a1-amend |
|
1096 | @ 3 a1-amend | |
1096 | | |
|
1097 | | | |
1097 | | o 1 a1 |
|
1098 | | o 1 a1 | |
1098 | |/ |
|
1099 | |/ | |
1099 | o 0 a0 |
|
1100 | o 0 a0 | |
1100 |
|
1101 | |||
1101 |
|
1102 | |||
1102 | Before the fix, the copy information was lost. |
|
1103 | Before the fix, the copy information was lost. | |
1103 | $ hg status --copies --rev 0 |
|
1104 | $ hg status --copies --rev 0 | |
1104 | A a2 |
|
1105 | A a2 | |
1105 | a0 |
|
1106 | a0 | |
1106 | R a0 |
|
1107 | R a0 | |
1107 | $ cd .. |
|
1108 | $ cd .. | |
1108 |
|
1109 | |||
1109 | Check that amend properly preserve rename from directory rename (issue-4516) |
|
1110 | Check that amend properly preserve rename from directory rename (issue-4516) | |
1110 |
|
1111 | |||
1111 | If a parent of the merge renames a full directory, any files added to the old |
|
1112 | If a parent of the merge renames a full directory, any files added to the old | |
1112 | directory in the other parent will be renamed to the new directory. For some |
|
1113 | directory in the other parent will be renamed to the new directory. For some | |
1113 | reason, the rename metadata was when amending such merge. This test ensure we |
|
1114 | reason, the rename metadata was when amending such merge. This test ensure we | |
1114 | do not regress. We have a dedicated repo because it needs a setup with renamed |
|
1115 | do not regress. We have a dedicated repo because it needs a setup with renamed | |
1115 | directory) |
|
1116 | directory) | |
1116 |
|
1117 | |||
1117 | $ hg init issue4516 |
|
1118 | $ hg init issue4516 | |
1118 | $ cd issue4516 |
|
1119 | $ cd issue4516 | |
1119 | $ mkdir olddirname |
|
1120 | $ mkdir olddirname | |
1120 | $ echo line1 > olddirname/commonfile.py |
|
1121 | $ echo line1 > olddirname/commonfile.py | |
1121 | $ hg add olddirname/commonfile.py |
|
1122 | $ hg add olddirname/commonfile.py | |
1122 | $ hg ci -m first |
|
1123 | $ hg ci -m first | |
1123 |
|
1124 | |||
1124 | $ hg branch newdirname |
|
1125 | $ hg branch newdirname | |
1125 | marked working directory as branch newdirname |
|
1126 | marked working directory as branch newdirname | |
1126 | (branches are permanent and global, did you want a bookmark?) |
|
1127 | (branches are permanent and global, did you want a bookmark?) | |
1127 | $ hg mv olddirname newdirname |
|
1128 | $ hg mv olddirname newdirname | |
1128 | moving olddirname/commonfile.py to newdirname/commonfile.py |
|
1129 | moving olddirname/commonfile.py to newdirname/commonfile.py | |
1129 | $ hg ci -m rename |
|
1130 | $ hg ci -m rename | |
1130 |
|
1131 | |||
1131 | $ hg update default |
|
1132 | $ hg update default | |
1132 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1133 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1133 | $ echo line1 > olddirname/newfile.py |
|
1134 | $ echo line1 > olddirname/newfile.py | |
1134 | $ hg add olddirname/newfile.py |
|
1135 | $ hg add olddirname/newfile.py | |
1135 | $ hg ci -m log |
|
1136 | $ hg ci -m log | |
1136 |
|
1137 | |||
1137 | $ hg up newdirname |
|
1138 | $ hg up newdirname | |
1138 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1139 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1139 | $ # create newdirname/newfile.py |
|
1140 | $ # create newdirname/newfile.py | |
1140 | $ hg merge default |
|
1141 | $ hg merge default | |
1141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1142 | (branch merge, don't forget to commit) |
|
1143 | (branch merge, don't forget to commit) | |
1143 | $ hg ci -m add |
|
1144 | $ hg ci -m add | |
1144 | $ |
|
1145 | $ | |
1145 | $ hg debugrename newdirname/newfile.py |
|
1146 | $ hg debugrename newdirname/newfile.py | |
1146 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def |
|
1147 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def | |
1147 | $ hg status -C --change . |
|
1148 | $ hg status -C --change . | |
1148 | A newdirname/newfile.py |
|
1149 | A newdirname/newfile.py | |
1149 | $ hg status -C --rev 1 |
|
1150 | $ hg status -C --rev 1 | |
1150 | A newdirname/newfile.py |
|
1151 | A newdirname/newfile.py | |
1151 | $ hg status -C --rev 2 |
|
1152 | $ hg status -C --rev 2 | |
1152 | A newdirname/commonfile.py |
|
1153 | A newdirname/commonfile.py | |
1153 | olddirname/commonfile.py |
|
1154 | olddirname/commonfile.py | |
1154 | A newdirname/newfile.py |
|
1155 | A newdirname/newfile.py | |
1155 | olddirname/newfile.py |
|
1156 | olddirname/newfile.py | |
1156 | R olddirname/commonfile.py |
|
1157 | R olddirname/commonfile.py | |
1157 | R olddirname/newfile.py |
|
1158 | R olddirname/newfile.py | |
1158 | $ hg debugindex newdirname/newfile.py |
|
1159 | $ hg debugindex newdirname/newfile.py | |
1159 | rev linkrev nodeid p1 p2 |
|
1160 | rev linkrev nodeid p1 p2 | |
1160 | 0 3 34a4d536c0c0 000000000000 000000000000 |
|
1161 | 0 3 34a4d536c0c0 000000000000 000000000000 | |
1161 |
|
1162 | |||
1162 | $ echo a >> newdirname/commonfile.py |
|
1163 | $ echo a >> newdirname/commonfile.py | |
1163 | $ hg ci --amend -m bug |
|
1164 | $ hg ci --amend -m bug | |
1164 | $ hg debugrename newdirname/newfile.py |
|
1165 | $ hg debugrename newdirname/newfile.py | |
1165 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def |
|
1166 | newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def | |
1166 | $ hg debugindex newdirname/newfile.py |
|
1167 | $ hg debugindex newdirname/newfile.py | |
1167 | rev linkrev nodeid p1 p2 |
|
1168 | rev linkrev nodeid p1 p2 | |
1168 | 0 3 34a4d536c0c0 000000000000 000000000000 |
|
1169 | 0 3 34a4d536c0c0 000000000000 000000000000 | |
1169 |
|
1170 | |||
1170 | #if execbit |
|
1171 | #if execbit | |
1171 |
|
1172 | |||
1172 | Test if amend preserves executable bit changes |
|
1173 | Test if amend preserves executable bit changes | |
1173 | $ chmod +x newdirname/commonfile.py |
|
1174 | $ chmod +x newdirname/commonfile.py | |
1174 | $ hg ci -m chmod |
|
1175 | $ hg ci -m chmod | |
1175 | $ hg ci --amend -m "chmod amended" |
|
1176 | $ hg ci --amend -m "chmod amended" | |
1176 | $ hg ci --amend -m "chmod amended second time" |
|
1177 | $ hg ci --amend -m "chmod amended second time" | |
1177 | $ hg log -p --git -r . |
|
1178 | $ hg log -p --git -r . | |
1178 | changeset: 7:b1326f52dddf |
|
1179 | changeset: 7:b1326f52dddf | |
1179 | branch: newdirname |
|
1180 | branch: newdirname | |
1180 | tag: tip |
|
1181 | tag: tip | |
1181 | parent: 4:7fd235f7cb2f |
|
1182 | parent: 4:7fd235f7cb2f | |
1182 | user: test |
|
1183 | user: test | |
1183 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1184 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1184 | summary: chmod amended second time |
|
1185 | summary: chmod amended second time | |
1185 |
|
1186 | |||
1186 | diff --git a/newdirname/commonfile.py b/newdirname/commonfile.py |
|
1187 | diff --git a/newdirname/commonfile.py b/newdirname/commonfile.py | |
1187 | old mode 100644 |
|
1188 | old mode 100644 | |
1188 | new mode 100755 |
|
1189 | new mode 100755 | |
1189 |
|
1190 | |||
1190 | #endif |
|
1191 | #endif | |
1191 |
|
1192 | |||
1192 | Test amend with file inclusion options |
|
1193 | Test amend with file inclusion options | |
1193 | -------------------------------------- |
|
1194 | -------------------------------------- | |
1194 |
|
1195 | |||
1195 | These tests ensure that we are always amending some files that were part of the |
|
1196 | These tests ensure that we are always amending some files that were part of the | |
1196 | pre-amend commit. We want to test that the remaining files in the pre-amend |
|
1197 | pre-amend commit. We want to test that the remaining files in the pre-amend | |
1197 | commit were not changed in the amended commit. We do so by performing a diff of |
|
1198 | commit were not changed in the amended commit. We do so by performing a diff of | |
1198 | the amended commit against its parent commit. |
|
1199 | the amended commit against its parent commit. | |
1199 | $ cd .. |
|
1200 | $ cd .. | |
1200 | $ hg init testfileinclusions |
|
1201 | $ hg init testfileinclusions | |
1201 | $ cd testfileinclusions |
|
1202 | $ cd testfileinclusions | |
1202 | $ echo a > a |
|
1203 | $ echo a > a | |
1203 | $ echo b > b |
|
1204 | $ echo b > b | |
1204 | $ hg commit -Aqm "Adding a and b" |
|
1205 | $ hg commit -Aqm "Adding a and b" | |
1205 |
|
1206 | |||
1206 | Only add changes to a particular file |
|
1207 | Only add changes to a particular file | |
1207 | $ echo a >> a |
|
1208 | $ echo a >> a | |
1208 | $ echo b >> b |
|
1209 | $ echo b >> b | |
1209 | $ hg commit --amend -I a |
|
1210 | $ hg commit --amend -I a | |
1210 | $ hg diff --git -r null -r . |
|
1211 | $ hg diff --git -r null -r . | |
1211 | diff --git a/a b/a |
|
1212 | diff --git a/a b/a | |
1212 | new file mode 100644 |
|
1213 | new file mode 100644 | |
1213 | --- /dev/null |
|
1214 | --- /dev/null | |
1214 | +++ b/a |
|
1215 | +++ b/a | |
1215 | @@ -0,0 +1,2 @@ |
|
1216 | @@ -0,0 +1,2 @@ | |
1216 | +a |
|
1217 | +a | |
1217 | +a |
|
1218 | +a | |
1218 | diff --git a/b b/b |
|
1219 | diff --git a/b b/b | |
1219 | new file mode 100644 |
|
1220 | new file mode 100644 | |
1220 | --- /dev/null |
|
1221 | --- /dev/null | |
1221 | +++ b/b |
|
1222 | +++ b/b | |
1222 | @@ -0,0 +1,1 @@ |
|
1223 | @@ -0,0 +1,1 @@ | |
1223 | +b |
|
1224 | +b | |
1224 |
|
1225 | |||
1225 | $ echo a >> a |
|
1226 | $ echo a >> a | |
1226 | $ hg commit --amend b |
|
1227 | $ hg commit --amend b | |
1227 | $ hg diff --git -r null -r . |
|
1228 | $ hg diff --git -r null -r . | |
1228 | diff --git a/a b/a |
|
1229 | diff --git a/a b/a | |
1229 | new file mode 100644 |
|
1230 | new file mode 100644 | |
1230 | --- /dev/null |
|
1231 | --- /dev/null | |
1231 | +++ b/a |
|
1232 | +++ b/a | |
1232 | @@ -0,0 +1,2 @@ |
|
1233 | @@ -0,0 +1,2 @@ | |
1233 | +a |
|
1234 | +a | |
1234 | +a |
|
1235 | +a | |
1235 | diff --git a/b b/b |
|
1236 | diff --git a/b b/b | |
1236 | new file mode 100644 |
|
1237 | new file mode 100644 | |
1237 | --- /dev/null |
|
1238 | --- /dev/null | |
1238 | +++ b/b |
|
1239 | +++ b/b | |
1239 | @@ -0,0 +1,2 @@ |
|
1240 | @@ -0,0 +1,2 @@ | |
1240 | +b |
|
1241 | +b | |
1241 | +b |
|
1242 | +b | |
1242 |
|
1243 | |||
1243 | Exclude changes to a particular file |
|
1244 | Exclude changes to a particular file | |
1244 | $ echo b >> b |
|
1245 | $ echo b >> b | |
1245 | $ hg commit --amend -X a |
|
1246 | $ hg commit --amend -X a | |
1246 | $ hg diff --git -r null -r . |
|
1247 | $ hg diff --git -r null -r . | |
1247 | diff --git a/a b/a |
|
1248 | diff --git a/a b/a | |
1248 | new file mode 100644 |
|
1249 | new file mode 100644 | |
1249 | --- /dev/null |
|
1250 | --- /dev/null | |
1250 | +++ b/a |
|
1251 | +++ b/a | |
1251 | @@ -0,0 +1,2 @@ |
|
1252 | @@ -0,0 +1,2 @@ | |
1252 | +a |
|
1253 | +a | |
1253 | +a |
|
1254 | +a | |
1254 | diff --git a/b b/b |
|
1255 | diff --git a/b b/b | |
1255 | new file mode 100644 |
|
1256 | new file mode 100644 | |
1256 | --- /dev/null |
|
1257 | --- /dev/null | |
1257 | +++ b/b |
|
1258 | +++ b/b | |
1258 | @@ -0,0 +1,3 @@ |
|
1259 | @@ -0,0 +1,3 @@ | |
1259 | +b |
|
1260 | +b | |
1260 | +b |
|
1261 | +b | |
1261 | +b |
|
1262 | +b | |
1262 |
|
1263 | |||
1263 | Check the addremove flag |
|
1264 | Check the addremove flag | |
1264 | $ echo c > c |
|
1265 | $ echo c > c | |
1265 | $ rm a |
|
1266 | $ rm a | |
1266 | $ hg commit --amend -A |
|
1267 | $ hg commit --amend -A | |
1267 | removing a |
|
1268 | removing a | |
1268 | adding c |
|
1269 | adding c | |
1269 | $ hg diff --git -r null -r . |
|
1270 | $ hg diff --git -r null -r . | |
1270 | diff --git a/b b/b |
|
1271 | diff --git a/b b/b | |
1271 | new file mode 100644 |
|
1272 | new file mode 100644 | |
1272 | --- /dev/null |
|
1273 | --- /dev/null | |
1273 | +++ b/b |
|
1274 | +++ b/b | |
1274 | @@ -0,0 +1,3 @@ |
|
1275 | @@ -0,0 +1,3 @@ | |
1275 | +b |
|
1276 | +b | |
1276 | +b |
|
1277 | +b | |
1277 | +b |
|
1278 | +b | |
1278 | diff --git a/c b/c |
|
1279 | diff --git a/c b/c | |
1279 | new file mode 100644 |
|
1280 | new file mode 100644 | |
1280 | --- /dev/null |
|
1281 | --- /dev/null | |
1281 | +++ b/c |
|
1282 | +++ b/c | |
1282 | @@ -0,0 +1,1 @@ |
|
1283 | @@ -0,0 +1,1 @@ | |
1283 | +c |
|
1284 | +c |
@@ -1,171 +1,172 b'' | |||||
1 | Test for the full copytracing algorithm |
|
1 | Test for the full copytracing algorithm | |
2 | ======================================= |
|
2 | ======================================= | |
3 |
|
3 | |||
4 | $ hg init t |
|
4 | $ hg init t | |
5 | $ cd t |
|
5 | $ cd t | |
6 |
|
6 | |||
7 | $ echo 1 > a |
|
7 | $ echo 1 > a | |
8 | $ hg ci -qAm "first" |
|
8 | $ hg ci -qAm "first" | |
9 |
|
9 | |||
10 | $ hg cp a b |
|
10 | $ hg cp a b | |
11 | $ hg mv a c |
|
11 | $ hg mv a c | |
12 | $ echo 2 >> b |
|
12 | $ echo 2 >> b | |
13 | $ echo 2 >> c |
|
13 | $ echo 2 >> c | |
14 |
|
14 | |||
15 | $ hg ci -qAm "second" |
|
15 | $ hg ci -qAm "second" | |
16 |
|
16 | |||
17 | $ hg co -C 0 |
|
17 | $ hg co -C 0 | |
18 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
18 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
19 |
|
19 | |||
20 | $ echo 0 > a |
|
20 | $ echo 0 > a | |
21 | $ echo 1 >> a |
|
21 | $ echo 1 >> a | |
22 |
|
22 | |||
23 | $ hg ci -qAm "other" |
|
23 | $ hg ci -qAm "other" | |
24 |
|
24 | |||
25 | $ hg merge --debug |
|
25 | $ hg merge --debug | |
26 | searching for copies back to rev 1 |
|
26 | searching for copies back to rev 1 | |
27 | unmatched files in other: |
|
27 | unmatched files in other: | |
28 | b |
|
28 | b | |
29 | c |
|
29 | c | |
30 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
30 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
31 | src: 'a' -> dst: 'b' * |
|
31 | src: 'a' -> dst: 'b' * | |
32 | src: 'a' -> dst: 'c' * |
|
32 | src: 'a' -> dst: 'c' * | |
33 | checking for directory renames |
|
33 | checking for directory renames | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 | branchmerge: True, force: False, partial: False |
|
35 | branchmerge: True, force: False, partial: False | |
36 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 |
|
36 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 | |
37 | preserving a for resolve of b |
|
37 | preserving a for resolve of b | |
38 | preserving a for resolve of c |
|
38 | preserving a for resolve of c | |
39 | removing a |
|
39 | removing a | |
40 | starting 4 threads for background file closing (?) |
|
40 | starting 4 threads for background file closing (?) | |
41 | b: remote moved from a -> m (premerge) |
|
41 | b: remote moved from a -> m (premerge) | |
42 | picked tool ':merge' for b (binary False symlink False changedelete False) |
|
42 | picked tool ':merge' for b (binary False symlink False changedelete False) | |
43 | merging a and b to b |
|
43 | merging a and b to b | |
44 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
44 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
45 | premerge successful |
|
45 | premerge successful | |
46 | c: remote moved from a -> m (premerge) |
|
46 | c: remote moved from a -> m (premerge) | |
47 | picked tool ':merge' for c (binary False symlink False changedelete False) |
|
47 | picked tool ':merge' for c (binary False symlink False changedelete False) | |
48 | merging a and c to c |
|
48 | merging a and c to c | |
49 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
49 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
50 | premerge successful |
|
50 | premerge successful | |
51 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
51 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
52 | (branch merge, don't forget to commit) |
|
52 | (branch merge, don't forget to commit) | |
53 |
|
53 | |||
54 | file b |
|
54 | file b | |
55 | $ cat b |
|
55 | $ cat b | |
56 | 0 |
|
56 | 0 | |
57 | 1 |
|
57 | 1 | |
58 | 2 |
|
58 | 2 | |
59 |
|
59 | |||
60 | file c |
|
60 | file c | |
61 | $ cat c |
|
61 | $ cat c | |
62 | 0 |
|
62 | 0 | |
63 | 1 |
|
63 | 1 | |
64 | 2 |
|
64 | 2 | |
65 |
|
65 | |||
66 | Test disabling copy tracing |
|
66 | Test disabling copy tracing | |
67 |
|
67 | |||
68 | - first verify copy metadata was kept |
|
68 | - first verify copy metadata was kept | |
69 |
|
69 | |||
70 | $ hg up -qC 2 |
|
70 | $ hg up -qC 2 | |
71 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= |
|
71 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= | |
72 | rebasing 2:add3f11052fa "other" (tip) |
|
72 | rebasing 2:add3f11052fa "other" (tip) | |
73 | merging b and a to b |
|
73 | merging b and a to b | |
74 | merging c and a to c |
|
74 | merging c and a to c | |
75 |
|
75 | |||
76 | $ cat b |
|
76 | $ cat b | |
77 | 0 |
|
77 | 0 | |
78 | 1 |
|
78 | 1 | |
79 | 2 |
|
79 | 2 | |
80 |
|
80 | |||
81 | - next verify copy metadata is lost when disabled |
|
81 | - next verify copy metadata is lost when disabled | |
82 |
|
82 | |||
83 | $ hg strip -r . --config extensions.strip= |
|
83 | $ hg strip -r . --config extensions.strip= | |
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/550bd84c0cd3-fc575957-backup.hg |
|
85 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/550bd84c0cd3-fc575957-backup.hg | |
86 | $ hg up -qC 2 |
|
86 | $ hg up -qC 2 | |
87 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.copytrace=off --config ui.interactive=True << EOF |
|
87 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.copytrace=off --config ui.interactive=True << EOF | |
88 | > c |
|
88 | > c | |
89 | > EOF |
|
89 | > EOF | |
90 | rebasing 2:add3f11052fa "other" (tip) |
|
90 | rebasing 2:add3f11052fa "other" (tip) | |
91 | other [source] changed a which local [dest] deleted |
|
91 | file a was deleted in other [source] but was modified in local [dest]. | |
|
92 | What do you want to do? | |||
92 |
|
|
93 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
93 |
|
94 | |||
94 | $ cat b |
|
95 | $ cat b | |
95 | 1 |
|
96 | 1 | |
96 | 2 |
|
97 | 2 | |
97 |
|
98 | |||
98 | $ cd .. |
|
99 | $ cd .. | |
99 |
|
100 | |||
100 | Verify disabling copy tracing still keeps copies from rebase source |
|
101 | Verify disabling copy tracing still keeps copies from rebase source | |
101 |
|
102 | |||
102 | $ hg init copydisable |
|
103 | $ hg init copydisable | |
103 | $ cd copydisable |
|
104 | $ cd copydisable | |
104 | $ touch a |
|
105 | $ touch a | |
105 | $ hg ci -Aqm 'add a' |
|
106 | $ hg ci -Aqm 'add a' | |
106 | $ touch b |
|
107 | $ touch b | |
107 | $ hg ci -Aqm 'add b, c' |
|
108 | $ hg ci -Aqm 'add b, c' | |
108 | $ hg cp b x |
|
109 | $ hg cp b x | |
109 | $ echo x >> x |
|
110 | $ echo x >> x | |
110 | $ hg ci -qm 'copy b->x' |
|
111 | $ hg ci -qm 'copy b->x' | |
111 | $ hg up -q 1 |
|
112 | $ hg up -q 1 | |
112 | $ touch z |
|
113 | $ touch z | |
113 | $ hg ci -Aqm 'add z' |
|
114 | $ hg ci -Aqm 'add z' | |
114 | $ hg log -G -T '{rev} {desc}\n' |
|
115 | $ hg log -G -T '{rev} {desc}\n' | |
115 | @ 3 add z |
|
116 | @ 3 add z | |
116 | | |
|
117 | | | |
117 | | o 2 copy b->x |
|
118 | | o 2 copy b->x | |
118 | |/ |
|
119 | |/ | |
119 | o 1 add b, c |
|
120 | o 1 add b, c | |
120 | | |
|
121 | | | |
121 | o 0 add a |
|
122 | o 0 add a | |
122 |
|
123 | |||
123 | $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.copytrace=off |
|
124 | $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.copytrace=off | |
124 | rebasing 2:6adcf8c12e7d "copy b->x" |
|
125 | rebasing 2:6adcf8c12e7d "copy b->x" | |
125 | saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-rebase.hg |
|
126 | saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-rebase.hg | |
126 | $ hg up -q 3 |
|
127 | $ hg up -q 3 | |
127 | $ hg log -f x -T '{rev} {desc}\n' |
|
128 | $ hg log -f x -T '{rev} {desc}\n' | |
128 | 3 copy b->x |
|
129 | 3 copy b->x | |
129 | 1 add b, c |
|
130 | 1 add b, c | |
130 |
|
131 | |||
131 | $ cd ../ |
|
132 | $ cd ../ | |
132 |
|
133 | |||
133 | Verify we duplicate existing copies, instead of detecting them |
|
134 | Verify we duplicate existing copies, instead of detecting them | |
134 |
|
135 | |||
135 | $ hg init copydisable3 |
|
136 | $ hg init copydisable3 | |
136 | $ cd copydisable3 |
|
137 | $ cd copydisable3 | |
137 | $ touch a |
|
138 | $ touch a | |
138 | $ hg ci -Aqm 'add a' |
|
139 | $ hg ci -Aqm 'add a' | |
139 | $ hg cp a b |
|
140 | $ hg cp a b | |
140 | $ hg ci -Aqm 'copy a->b' |
|
141 | $ hg ci -Aqm 'copy a->b' | |
141 | $ hg mv b c |
|
142 | $ hg mv b c | |
142 | $ hg ci -Aqm 'move b->c' |
|
143 | $ hg ci -Aqm 'move b->c' | |
143 | $ hg up -q 0 |
|
144 | $ hg up -q 0 | |
144 | $ hg cp a b |
|
145 | $ hg cp a b | |
145 | $ echo b >> b |
|
146 | $ echo b >> b | |
146 | $ hg ci -Aqm 'copy a->b (2)' |
|
147 | $ hg ci -Aqm 'copy a->b (2)' | |
147 | $ hg log -G -T '{rev} {desc}\n' |
|
148 | $ hg log -G -T '{rev} {desc}\n' | |
148 | @ 3 copy a->b (2) |
|
149 | @ 3 copy a->b (2) | |
149 | | |
|
150 | | | |
150 | | o 2 move b->c |
|
151 | | o 2 move b->c | |
151 | | | |
|
152 | | | | |
152 | | o 1 copy a->b |
|
153 | | o 1 copy a->b | |
153 | |/ |
|
154 | |/ | |
154 | o 0 add a |
|
155 | o 0 add a | |
155 |
|
156 | |||
156 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.copytrace=off |
|
157 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.copytrace=off | |
157 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) |
|
158 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) | |
158 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-rebase.hg |
|
159 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-rebase.hg | |
159 |
|
160 | |||
160 | $ hg log -G -f b |
|
161 | $ hg log -G -f b | |
161 | @ changeset: 3:76024fb4b05b |
|
162 | @ changeset: 3:76024fb4b05b | |
162 | : tag: tip |
|
163 | : tag: tip | |
163 | : user: test |
|
164 | : user: test | |
164 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | : summary: copy a->b (2) |
|
166 | : summary: copy a->b (2) | |
166 | : |
|
167 | : | |
167 | o changeset: 0:ac82d8b1f7c4 |
|
168 | o changeset: 0:ac82d8b1f7c4 | |
168 | user: test |
|
169 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: add a |
|
171 | summary: add a | |
171 |
|
172 |
@@ -1,715 +1,718 b'' | |||||
1 | Test for the heuristic copytracing algorithm |
|
1 | Test for the heuristic copytracing algorithm | |
2 | ============================================ |
|
2 | ============================================ | |
3 |
|
3 | |||
4 | $ cat >> $TESTTMP/copytrace.sh << '__EOF__' |
|
4 | $ cat >> $TESTTMP/copytrace.sh << '__EOF__' | |
5 | > initclient() { |
|
5 | > initclient() { | |
6 | > cat >> $1/.hg/hgrc <<EOF |
|
6 | > cat >> $1/.hg/hgrc <<EOF | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > copytrace = heuristics |
|
8 | > copytrace = heuristics | |
9 | > copytrace.sourcecommitlimit = -1 |
|
9 | > copytrace.sourcecommitlimit = -1 | |
10 | > EOF |
|
10 | > EOF | |
11 | > } |
|
11 | > } | |
12 | > __EOF__ |
|
12 | > __EOF__ | |
13 | $ . "$TESTTMP/copytrace.sh" |
|
13 | $ . "$TESTTMP/copytrace.sh" | |
14 |
|
14 | |||
15 | $ cat >> $HGRCPATH << EOF |
|
15 | $ cat >> $HGRCPATH << EOF | |
16 | > [extensions] |
|
16 | > [extensions] | |
17 | > rebase= |
|
17 | > rebase= | |
18 | > shelve= |
|
18 | > shelve= | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to |
|
21 | NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to | |
22 | prevent the full copytrace algorithm to run and test the heuristic algorithm |
|
22 | prevent the full copytrace algorithm to run and test the heuristic algorithm | |
23 | without complexing the test cases with public and draft commits. |
|
23 | without complexing the test cases with public and draft commits. | |
24 |
|
24 | |||
25 | Check filename heuristics (same dirname and same basename) |
|
25 | Check filename heuristics (same dirname and same basename) | |
26 | ---------------------------------------------------------- |
|
26 | ---------------------------------------------------------- | |
27 |
|
27 | |||
28 | $ hg init repo |
|
28 | $ hg init repo | |
29 | $ initclient repo |
|
29 | $ initclient repo | |
30 | $ cd repo |
|
30 | $ cd repo | |
31 | $ echo a > a |
|
31 | $ echo a > a | |
32 | $ mkdir dir |
|
32 | $ mkdir dir | |
33 | $ echo a > dir/file.txt |
|
33 | $ echo a > dir/file.txt | |
34 | $ hg addremove |
|
34 | $ hg addremove | |
35 | adding a |
|
35 | adding a | |
36 | adding dir/file.txt |
|
36 | adding dir/file.txt | |
37 | $ hg ci -m initial |
|
37 | $ hg ci -m initial | |
38 | $ hg mv a b |
|
38 | $ hg mv a b | |
39 | $ hg mv -q dir dir2 |
|
39 | $ hg mv -q dir dir2 | |
40 | $ hg ci -m 'mv a b, mv dir/ dir2/' |
|
40 | $ hg ci -m 'mv a b, mv dir/ dir2/' | |
41 | $ hg up -q 0 |
|
41 | $ hg up -q 0 | |
42 | $ echo b > a |
|
42 | $ echo b > a | |
43 | $ echo b > dir/file.txt |
|
43 | $ echo b > dir/file.txt | |
44 | $ hg ci -qm 'mod a, mod dir/file.txt' |
|
44 | $ hg ci -qm 'mod a, mod dir/file.txt' | |
45 |
|
45 | |||
46 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
46 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
47 | @ changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081 |
|
47 | @ changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081 | |
48 | | desc: mod a, mod dir/file.txt |
|
48 | | desc: mod a, mod dir/file.txt | |
49 | | o changeset: 928d74bc9110681920854d845c06959f6dfc9547 |
|
49 | | o changeset: 928d74bc9110681920854d845c06959f6dfc9547 | |
50 | |/ desc: mv a b, mv dir/ dir2/ |
|
50 | |/ desc: mv a b, mv dir/ dir2/ | |
51 | o changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee |
|
51 | o changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee | |
52 | desc: initial |
|
52 | desc: initial | |
53 |
|
53 | |||
54 | $ hg rebase -s . -d 1 |
|
54 | $ hg rebase -s . -d 1 | |
55 | rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip) |
|
55 | rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip) | |
56 | merging b and a to b |
|
56 | merging b and a to b | |
57 | merging dir2/file.txt and dir/file.txt to dir2/file.txt |
|
57 | merging dir2/file.txt and dir/file.txt to dir2/file.txt | |
58 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg |
|
58 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg | |
59 | $ cd .. |
|
59 | $ cd .. | |
60 | $ rm -rf repo |
|
60 | $ rm -rf repo | |
61 |
|
61 | |||
62 | Make sure filename heuristics do not when they are not related |
|
62 | Make sure filename heuristics do not when they are not related | |
63 | -------------------------------------------------------------- |
|
63 | -------------------------------------------------------------- | |
64 |
|
64 | |||
65 | $ hg init repo |
|
65 | $ hg init repo | |
66 | $ initclient repo |
|
66 | $ initclient repo | |
67 | $ cd repo |
|
67 | $ cd repo | |
68 | $ echo 'somecontent' > a |
|
68 | $ echo 'somecontent' > a | |
69 | $ hg add a |
|
69 | $ hg add a | |
70 | $ hg ci -m initial |
|
70 | $ hg ci -m initial | |
71 | $ hg rm a |
|
71 | $ hg rm a | |
72 | $ echo 'completelydifferentcontext' > b |
|
72 | $ echo 'completelydifferentcontext' > b | |
73 | $ hg add b |
|
73 | $ hg add b | |
74 | $ hg ci -m 'rm a, add b' |
|
74 | $ hg ci -m 'rm a, add b' | |
75 | $ hg up -q 0 |
|
75 | $ hg up -q 0 | |
76 | $ printf 'somecontent\nmoarcontent' > a |
|
76 | $ printf 'somecontent\nmoarcontent' > a | |
77 | $ hg ci -qm 'mode a' |
|
77 | $ hg ci -qm 'mode a' | |
78 |
|
78 | |||
79 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
79 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
80 | @ changeset: d526312210b9e8f795d576a77dc643796384d86e |
|
80 | @ changeset: d526312210b9e8f795d576a77dc643796384d86e | |
81 | | desc: mode a |
|
81 | | desc: mode a | |
82 | | o changeset: 46985f76c7e5e5123433527f5c8526806145650b |
|
82 | | o changeset: 46985f76c7e5e5123433527f5c8526806145650b | |
83 | |/ desc: rm a, add b |
|
83 | |/ desc: rm a, add b | |
84 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 |
|
84 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
85 | desc: initial |
|
85 | desc: initial | |
86 |
|
86 | |||
87 | $ hg rebase -s . -d 1 |
|
87 | $ hg rebase -s . -d 1 | |
88 | rebasing 2:d526312210b9 "mode a" (tip) |
|
88 | rebasing 2:d526312210b9 "mode a" (tip) | |
89 | other [source] changed a which local [dest] deleted |
|
89 | file a was deleted in other [source] but was modified in local [dest]. | |
|
90 | What do you want to do? | |||
90 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
91 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
91 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
92 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
92 | [1] |
|
93 | [1] | |
93 |
|
94 | |||
94 | $ cd .. |
|
95 | $ cd .. | |
95 | $ rm -rf repo |
|
96 | $ rm -rf repo | |
96 |
|
97 | |||
97 | Test when lca didn't modified the file that was moved |
|
98 | Test when lca didn't modified the file that was moved | |
98 | ----------------------------------------------------- |
|
99 | ----------------------------------------------------- | |
99 |
|
100 | |||
100 | $ hg init repo |
|
101 | $ hg init repo | |
101 | $ initclient repo |
|
102 | $ initclient repo | |
102 | $ cd repo |
|
103 | $ cd repo | |
103 | $ echo 'somecontent' > a |
|
104 | $ echo 'somecontent' > a | |
104 | $ hg add a |
|
105 | $ hg add a | |
105 | $ hg ci -m initial |
|
106 | $ hg ci -m initial | |
106 | $ echo c > c |
|
107 | $ echo c > c | |
107 | $ hg add c |
|
108 | $ hg add c | |
108 | $ hg ci -m randomcommit |
|
109 | $ hg ci -m randomcommit | |
109 | $ hg mv a b |
|
110 | $ hg mv a b | |
110 | $ hg ci -m 'mv a b' |
|
111 | $ hg ci -m 'mv a b' | |
111 | $ hg up -q 1 |
|
112 | $ hg up -q 1 | |
112 | $ echo b > a |
|
113 | $ echo b > a | |
113 | $ hg ci -qm 'mod a' |
|
114 | $ hg ci -qm 'mod a' | |
114 |
|
115 | |||
115 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' |
|
116 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
116 | @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc |
|
117 | @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc | |
117 | | desc: mod a, phase: draft |
|
118 | | desc: mod a, phase: draft | |
118 | | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d |
|
119 | | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d | |
119 | |/ desc: mv a b, phase: draft |
|
120 | |/ desc: mv a b, phase: draft | |
120 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 |
|
121 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 | |
121 | | desc: randomcommit, phase: draft |
|
122 | | desc: randomcommit, phase: draft | |
122 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 |
|
123 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
123 | desc: initial, phase: draft |
|
124 | desc: initial, phase: draft | |
124 |
|
125 | |||
125 | $ hg rebase -s . -d 2 |
|
126 | $ hg rebase -s . -d 2 | |
126 | rebasing 3:9d5cf99c3d9f "mod a" (tip) |
|
127 | rebasing 3:9d5cf99c3d9f "mod a" (tip) | |
127 | merging b and a to b |
|
128 | merging b and a to b | |
128 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg |
|
129 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg | |
129 | $ cd .. |
|
130 | $ cd .. | |
130 | $ rm -rf repo |
|
131 | $ rm -rf repo | |
131 |
|
132 | |||
132 | Rebase "backwards" |
|
133 | Rebase "backwards" | |
133 | ------------------ |
|
134 | ------------------ | |
134 |
|
135 | |||
135 | $ hg init repo |
|
136 | $ hg init repo | |
136 | $ initclient repo |
|
137 | $ initclient repo | |
137 | $ cd repo |
|
138 | $ cd repo | |
138 | $ echo 'somecontent' > a |
|
139 | $ echo 'somecontent' > a | |
139 | $ hg add a |
|
140 | $ hg add a | |
140 | $ hg ci -m initial |
|
141 | $ hg ci -m initial | |
141 | $ echo c > c |
|
142 | $ echo c > c | |
142 | $ hg add c |
|
143 | $ hg add c | |
143 | $ hg ci -m randomcommit |
|
144 | $ hg ci -m randomcommit | |
144 | $ hg mv a b |
|
145 | $ hg mv a b | |
145 | $ hg ci -m 'mv a b' |
|
146 | $ hg ci -m 'mv a b' | |
146 | $ hg up -q 2 |
|
147 | $ hg up -q 2 | |
147 | $ echo b > b |
|
148 | $ echo b > b | |
148 | $ hg ci -qm 'mod b' |
|
149 | $ hg ci -qm 'mod b' | |
149 |
|
150 | |||
150 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
151 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
151 | @ changeset: fbe97126b3969056795c462a67d93faf13e4d298 |
|
152 | @ changeset: fbe97126b3969056795c462a67d93faf13e4d298 | |
152 | | desc: mod b |
|
153 | | desc: mod b | |
153 | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d |
|
154 | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d | |
154 | | desc: mv a b |
|
155 | | desc: mv a b | |
155 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 |
|
156 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 | |
156 | | desc: randomcommit |
|
157 | | desc: randomcommit | |
157 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 |
|
158 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
158 | desc: initial |
|
159 | desc: initial | |
159 |
|
160 | |||
160 | $ hg rebase -s . -d 0 |
|
161 | $ hg rebase -s . -d 0 | |
161 | rebasing 3:fbe97126b396 "mod b" (tip) |
|
162 | rebasing 3:fbe97126b396 "mod b" (tip) | |
162 | merging a and b to a |
|
163 | merging a and b to a | |
163 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg |
|
164 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg | |
164 | $ cd .. |
|
165 | $ cd .. | |
165 | $ rm -rf repo |
|
166 | $ rm -rf repo | |
166 |
|
167 | |||
167 | Check a few potential move candidates |
|
168 | Check a few potential move candidates | |
168 | ------------------------------------- |
|
169 | ------------------------------------- | |
169 |
|
170 | |||
170 | $ hg init repo |
|
171 | $ hg init repo | |
171 | $ initclient repo |
|
172 | $ initclient repo | |
172 | $ cd repo |
|
173 | $ cd repo | |
173 | $ mkdir dir |
|
174 | $ mkdir dir | |
174 | $ echo a > dir/a |
|
175 | $ echo a > dir/a | |
175 | $ hg add dir/a |
|
176 | $ hg add dir/a | |
176 | $ hg ci -qm initial |
|
177 | $ hg ci -qm initial | |
177 | $ hg mv dir/a dir/b |
|
178 | $ hg mv dir/a dir/b | |
178 | $ hg ci -qm 'mv dir/a dir/b' |
|
179 | $ hg ci -qm 'mv dir/a dir/b' | |
179 | $ mkdir dir2 |
|
180 | $ mkdir dir2 | |
180 | $ echo b > dir2/a |
|
181 | $ echo b > dir2/a | |
181 | $ hg add dir2/a |
|
182 | $ hg add dir2/a | |
182 | $ hg ci -qm 'create dir2/a' |
|
183 | $ hg ci -qm 'create dir2/a' | |
183 | $ hg up -q 0 |
|
184 | $ hg up -q 0 | |
184 | $ echo b > dir/a |
|
185 | $ echo b > dir/a | |
185 | $ hg ci -qm 'mod dir/a' |
|
186 | $ hg ci -qm 'mod dir/a' | |
186 |
|
187 | |||
187 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
188 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
188 | @ changeset: 6b2f4cece40fd320f41229f23821256ffc08efea |
|
189 | @ changeset: 6b2f4cece40fd320f41229f23821256ffc08efea | |
189 | | desc: mod dir/a |
|
190 | | desc: mod dir/a | |
190 | | o changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa |
|
191 | | o changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa | |
191 | | | desc: create dir2/a |
|
192 | | | desc: create dir2/a | |
192 | | o changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade |
|
193 | | o changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade | |
193 | |/ desc: mv dir/a dir/b |
|
194 | |/ desc: mv dir/a dir/b | |
194 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 |
|
195 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 | |
195 | desc: initial |
|
196 | desc: initial | |
196 |
|
197 | |||
197 | $ hg rebase -s . -d 2 |
|
198 | $ hg rebase -s . -d 2 | |
198 | rebasing 3:6b2f4cece40f "mod dir/a" (tip) |
|
199 | rebasing 3:6b2f4cece40f "mod dir/a" (tip) | |
199 | merging dir/b and dir/a to dir/b |
|
200 | merging dir/b and dir/a to dir/b | |
200 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg |
|
201 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg | |
201 | $ cd .. |
|
202 | $ cd .. | |
202 | $ rm -rf repo |
|
203 | $ rm -rf repo | |
203 |
|
204 | |||
204 | Test the copytrace.movecandidateslimit with many move candidates |
|
205 | Test the copytrace.movecandidateslimit with many move candidates | |
205 | ---------------------------------------------------------------- |
|
206 | ---------------------------------------------------------------- | |
206 |
|
207 | |||
207 | $ hg init repo |
|
208 | $ hg init repo | |
208 | $ initclient repo |
|
209 | $ initclient repo | |
209 | $ cd repo |
|
210 | $ cd repo | |
210 | $ echo a > a |
|
211 | $ echo a > a | |
211 | $ hg add a |
|
212 | $ hg add a | |
212 | $ hg ci -m initial |
|
213 | $ hg ci -m initial | |
213 | $ hg mv a foo |
|
214 | $ hg mv a foo | |
214 | $ echo a > b |
|
215 | $ echo a > b | |
215 | $ echo a > c |
|
216 | $ echo a > c | |
216 | $ echo a > d |
|
217 | $ echo a > d | |
217 | $ echo a > e |
|
218 | $ echo a > e | |
218 | $ echo a > f |
|
219 | $ echo a > f | |
219 | $ echo a > g |
|
220 | $ echo a > g | |
220 | $ hg add b |
|
221 | $ hg add b | |
221 | $ hg add c |
|
222 | $ hg add c | |
222 | $ hg add d |
|
223 | $ hg add d | |
223 | $ hg add e |
|
224 | $ hg add e | |
224 | $ hg add f |
|
225 | $ hg add f | |
225 | $ hg add g |
|
226 | $ hg add g | |
226 | $ hg ci -m 'mv a foo, add many files' |
|
227 | $ hg ci -m 'mv a foo, add many files' | |
227 | $ hg up -q ".^" |
|
228 | $ hg up -q ".^" | |
228 | $ echo b > a |
|
229 | $ echo b > a | |
229 | $ hg ci -m 'mod a' |
|
230 | $ hg ci -m 'mod a' | |
230 | created new head |
|
231 | created new head | |
231 |
|
232 | |||
232 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
233 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
233 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
234 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e | |
234 | | desc: mod a |
|
235 | | desc: mod a | |
235 | | o changeset: 8329d5c6bf479ec5ca59b9864f3f45d07213f5a4 |
|
236 | | o changeset: 8329d5c6bf479ec5ca59b9864f3f45d07213f5a4 | |
236 | |/ desc: mv a foo, add many files |
|
237 | |/ desc: mv a foo, add many files | |
237 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
238 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
238 | desc: initial |
|
239 | desc: initial | |
239 |
|
240 | |||
240 | With small limit |
|
241 | With small limit | |
241 |
|
242 | |||
242 | $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0 |
|
243 | $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0 | |
243 | rebasing 2:ef716627c70b "mod a" (tip) |
|
244 | rebasing 2:ef716627c70b "mod a" (tip) | |
244 | skipping copytracing for 'a', more candidates than the limit: 7 |
|
245 | skipping copytracing for 'a', more candidates than the limit: 7 | |
245 | other [source] changed a which local [dest] deleted |
|
246 | file a was deleted in other [source] but was modified in local [dest]. | |
|
247 | What do you want to do? | |||
246 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
248 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
247 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
249 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
248 | [1] |
|
250 | [1] | |
249 |
|
251 | |||
250 | $ hg rebase --abort |
|
252 | $ hg rebase --abort | |
251 | rebase aborted |
|
253 | rebase aborted | |
252 |
|
254 | |||
253 | With default limit which is 100 |
|
255 | With default limit which is 100 | |
254 |
|
256 | |||
255 | $ hg rebase -s 2 -d 1 |
|
257 | $ hg rebase -s 2 -d 1 | |
256 | rebasing 2:ef716627c70b "mod a" (tip) |
|
258 | rebasing 2:ef716627c70b "mod a" (tip) | |
257 | merging foo and a to foo |
|
259 | merging foo and a to foo | |
258 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg |
|
260 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg | |
259 |
|
261 | |||
260 | $ cd .. |
|
262 | $ cd .. | |
261 | $ rm -rf repo |
|
263 | $ rm -rf repo | |
262 |
|
264 | |||
263 | Move file in one branch and delete it in another |
|
265 | Move file in one branch and delete it in another | |
264 | ----------------------------------------------- |
|
266 | ----------------------------------------------- | |
265 |
|
267 | |||
266 | $ hg init repo |
|
268 | $ hg init repo | |
267 | $ initclient repo |
|
269 | $ initclient repo | |
268 | $ cd repo |
|
270 | $ cd repo | |
269 | $ echo a > a |
|
271 | $ echo a > a | |
270 | $ hg add a |
|
272 | $ hg add a | |
271 | $ hg ci -m initial |
|
273 | $ hg ci -m initial | |
272 | $ hg mv a b |
|
274 | $ hg mv a b | |
273 | $ hg ci -m 'mv a b' |
|
275 | $ hg ci -m 'mv a b' | |
274 | $ hg up -q ".^" |
|
276 | $ hg up -q ".^" | |
275 | $ hg rm a |
|
277 | $ hg rm a | |
276 | $ hg ci -m 'del a' |
|
278 | $ hg ci -m 'del a' | |
277 | created new head |
|
279 | created new head | |
278 |
|
280 | |||
279 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' |
|
281 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
280 | @ changeset: 7d61ee3b1e48577891a072024968428ba465c47b |
|
282 | @ changeset: 7d61ee3b1e48577891a072024968428ba465c47b | |
281 | | desc: del a, phase: draft |
|
283 | | desc: del a, phase: draft | |
282 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
284 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
283 | |/ desc: mv a b, phase: draft |
|
285 | |/ desc: mv a b, phase: draft | |
284 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
286 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
285 | desc: initial, phase: draft |
|
287 | desc: initial, phase: draft | |
286 |
|
288 | |||
287 | $ hg rebase -s 1 -d 2 |
|
289 | $ hg rebase -s 1 -d 2 | |
288 | rebasing 1:472e38d57782 "mv a b" |
|
290 | rebasing 1:472e38d57782 "mv a b" | |
289 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg |
|
291 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg | |
290 | $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062 |
|
292 | $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062 | |
291 | $ ls |
|
293 | $ ls | |
292 | b |
|
294 | b | |
293 | $ cd .. |
|
295 | $ cd .. | |
294 | $ rm -rf repo |
|
296 | $ rm -rf repo | |
295 |
|
297 | |||
296 | Move a directory in draft branch |
|
298 | Move a directory in draft branch | |
297 | -------------------------------- |
|
299 | -------------------------------- | |
298 |
|
300 | |||
299 | $ hg init repo |
|
301 | $ hg init repo | |
300 | $ initclient repo |
|
302 | $ initclient repo | |
301 | $ cd repo |
|
303 | $ cd repo | |
302 | $ mkdir dir |
|
304 | $ mkdir dir | |
303 | $ echo a > dir/a |
|
305 | $ echo a > dir/a | |
304 | $ hg add dir/a |
|
306 | $ hg add dir/a | |
305 | $ hg ci -qm initial |
|
307 | $ hg ci -qm initial | |
306 | $ echo b > dir/a |
|
308 | $ echo b > dir/a | |
307 | $ hg ci -qm 'mod dir/a' |
|
309 | $ hg ci -qm 'mod dir/a' | |
308 | $ hg up -q ".^" |
|
310 | $ hg up -q ".^" | |
309 | $ hg mv -q dir/ dir2 |
|
311 | $ hg mv -q dir/ dir2 | |
310 | $ hg ci -qm 'mv dir/ dir2/' |
|
312 | $ hg ci -qm 'mv dir/ dir2/' | |
311 |
|
313 | |||
312 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
314 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
313 | @ changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239 |
|
315 | @ changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239 | |
314 | | desc: mv dir/ dir2/ |
|
316 | | desc: mv dir/ dir2/ | |
315 | | o changeset: 6b2f4cece40fd320f41229f23821256ffc08efea |
|
317 | | o changeset: 6b2f4cece40fd320f41229f23821256ffc08efea | |
316 | |/ desc: mod dir/a |
|
318 | |/ desc: mod dir/a | |
317 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 |
|
319 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 | |
318 | desc: initial |
|
320 | desc: initial | |
319 |
|
321 | |||
320 | $ hg rebase -s . -d 1 |
|
322 | $ hg rebase -s . -d 1 | |
321 | rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip) |
|
323 | rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip) | |
322 | merging dir/a and dir2/a to dir2/a |
|
324 | merging dir/a and dir2/a to dir2/a | |
323 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg |
|
325 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg | |
324 | $ cd .. |
|
326 | $ cd .. | |
325 | $ rm -rf server |
|
327 | $ rm -rf server | |
326 | $ rm -rf repo |
|
328 | $ rm -rf repo | |
327 |
|
329 | |||
328 | Move file twice and rebase mod on top of moves |
|
330 | Move file twice and rebase mod on top of moves | |
329 | ---------------------------------------------- |
|
331 | ---------------------------------------------- | |
330 |
|
332 | |||
331 | $ hg init repo |
|
333 | $ hg init repo | |
332 | $ initclient repo |
|
334 | $ initclient repo | |
333 | $ cd repo |
|
335 | $ cd repo | |
334 | $ echo a > a |
|
336 | $ echo a > a | |
335 | $ hg add a |
|
337 | $ hg add a | |
336 | $ hg ci -m initial |
|
338 | $ hg ci -m initial | |
337 | $ hg mv a b |
|
339 | $ hg mv a b | |
338 | $ hg ci -m 'mv a b' |
|
340 | $ hg ci -m 'mv a b' | |
339 | $ hg mv b c |
|
341 | $ hg mv b c | |
340 | $ hg ci -m 'mv b c' |
|
342 | $ hg ci -m 'mv b c' | |
341 | $ hg up -q 0 |
|
343 | $ hg up -q 0 | |
342 | $ echo c > a |
|
344 | $ echo c > a | |
343 | $ hg ci -m 'mod a' |
|
345 | $ hg ci -m 'mod a' | |
344 | created new head |
|
346 | created new head | |
345 |
|
347 | |||
346 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
348 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
347 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 |
|
349 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 | |
348 | | desc: mod a |
|
350 | | desc: mod a | |
349 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
351 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
350 | | | desc: mv b c |
|
352 | | | desc: mv b c | |
351 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
353 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
352 | |/ desc: mv a b |
|
354 | |/ desc: mv a b | |
353 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
355 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
354 | desc: initial |
|
356 | desc: initial | |
355 | $ hg rebase -s . -d 2 |
|
357 | $ hg rebase -s . -d 2 | |
356 | rebasing 3:d41316942216 "mod a" (tip) |
|
358 | rebasing 3:d41316942216 "mod a" (tip) | |
357 | merging c and a to c |
|
359 | merging c and a to c | |
358 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg |
|
360 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg | |
359 |
|
361 | |||
360 | $ cd .. |
|
362 | $ cd .. | |
361 | $ rm -rf repo |
|
363 | $ rm -rf repo | |
362 |
|
364 | |||
363 | Move file twice and rebase moves on top of mods |
|
365 | Move file twice and rebase moves on top of mods | |
364 | ----------------------------------------------- |
|
366 | ----------------------------------------------- | |
365 |
|
367 | |||
366 | $ hg init repo |
|
368 | $ hg init repo | |
367 | $ initclient repo |
|
369 | $ initclient repo | |
368 | $ cd repo |
|
370 | $ cd repo | |
369 | $ echo a > a |
|
371 | $ echo a > a | |
370 | $ hg add a |
|
372 | $ hg add a | |
371 | $ hg ci -m initial |
|
373 | $ hg ci -m initial | |
372 | $ hg mv a b |
|
374 | $ hg mv a b | |
373 | $ hg ci -m 'mv a b' |
|
375 | $ hg ci -m 'mv a b' | |
374 | $ hg mv b c |
|
376 | $ hg mv b c | |
375 | $ hg ci -m 'mv b c' |
|
377 | $ hg ci -m 'mv b c' | |
376 | $ hg up -q 0 |
|
378 | $ hg up -q 0 | |
377 | $ echo c > a |
|
379 | $ echo c > a | |
378 | $ hg ci -m 'mod a' |
|
380 | $ hg ci -m 'mod a' | |
379 | created new head |
|
381 | created new head | |
380 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
382 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
381 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 |
|
383 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 | |
382 | | desc: mod a |
|
384 | | desc: mod a | |
383 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
385 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
384 | | | desc: mv b c |
|
386 | | | desc: mv b c | |
385 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
387 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
386 | |/ desc: mv a b |
|
388 | |/ desc: mv a b | |
387 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
389 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
388 | desc: initial |
|
390 | desc: initial | |
389 | $ hg rebase -s 1 -d . |
|
391 | $ hg rebase -s 1 -d . | |
390 | rebasing 1:472e38d57782 "mv a b" |
|
392 | rebasing 1:472e38d57782 "mv a b" | |
391 | merging a and b to b |
|
393 | merging a and b to b | |
392 | rebasing 2:d3efd280421d "mv b c" |
|
394 | rebasing 2:d3efd280421d "mv b c" | |
393 | merging b and c to c |
|
395 | merging b and c to c | |
394 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg |
|
396 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg | |
395 |
|
397 | |||
396 | $ cd .. |
|
398 | $ cd .. | |
397 | $ rm -rf repo |
|
399 | $ rm -rf repo | |
398 |
|
400 | |||
399 | Move one file and add another file in the same folder in one branch, modify file in another branch |
|
401 | Move one file and add another file in the same folder in one branch, modify file in another branch | |
400 | -------------------------------------------------------------------------------------------------- |
|
402 | -------------------------------------------------------------------------------------------------- | |
401 |
|
403 | |||
402 | $ hg init repo |
|
404 | $ hg init repo | |
403 | $ initclient repo |
|
405 | $ initclient repo | |
404 | $ cd repo |
|
406 | $ cd repo | |
405 | $ echo a > a |
|
407 | $ echo a > a | |
406 | $ hg add a |
|
408 | $ hg add a | |
407 | $ hg ci -m initial |
|
409 | $ hg ci -m initial | |
408 | $ hg mv a b |
|
410 | $ hg mv a b | |
409 | $ hg ci -m 'mv a b' |
|
411 | $ hg ci -m 'mv a b' | |
410 | $ echo c > c |
|
412 | $ echo c > c | |
411 | $ hg add c |
|
413 | $ hg add c | |
412 | $ hg ci -m 'add c' |
|
414 | $ hg ci -m 'add c' | |
413 | $ hg up -q 0 |
|
415 | $ hg up -q 0 | |
414 | $ echo b > a |
|
416 | $ echo b > a | |
415 | $ hg ci -m 'mod a' |
|
417 | $ hg ci -m 'mod a' | |
416 | created new head |
|
418 | created new head | |
417 |
|
419 | |||
418 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
420 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
419 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
421 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e | |
420 | | desc: mod a |
|
422 | | desc: mod a | |
421 | | o changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9 |
|
423 | | o changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9 | |
422 | | | desc: add c |
|
424 | | | desc: add c | |
423 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
425 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
424 | |/ desc: mv a b |
|
426 | |/ desc: mv a b | |
425 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
427 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
426 | desc: initial |
|
428 | desc: initial | |
427 |
|
429 | |||
428 | $ hg rebase -s . -d 2 |
|
430 | $ hg rebase -s . -d 2 | |
429 | rebasing 3:ef716627c70b "mod a" (tip) |
|
431 | rebasing 3:ef716627c70b "mod a" (tip) | |
430 | merging b and a to b |
|
432 | merging b and a to b | |
431 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg |
|
433 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg | |
432 | $ ls |
|
434 | $ ls | |
433 | b |
|
435 | b | |
434 | c |
|
436 | c | |
435 | $ cat b |
|
437 | $ cat b | |
436 | b |
|
438 | b | |
437 | $ rm -rf repo |
|
439 | $ rm -rf repo | |
438 |
|
440 | |||
439 | Merge test |
|
441 | Merge test | |
440 | ---------- |
|
442 | ---------- | |
441 |
|
443 | |||
442 | $ hg init repo |
|
444 | $ hg init repo | |
443 | $ initclient repo |
|
445 | $ initclient repo | |
444 | $ cd repo |
|
446 | $ cd repo | |
445 | $ echo a > a |
|
447 | $ echo a > a | |
446 | $ hg add a |
|
448 | $ hg add a | |
447 | $ hg ci -m initial |
|
449 | $ hg ci -m initial | |
448 | $ echo b > a |
|
450 | $ echo b > a | |
449 | $ hg ci -m 'modify a' |
|
451 | $ hg ci -m 'modify a' | |
450 | $ hg up -q 0 |
|
452 | $ hg up -q 0 | |
451 | $ hg mv a b |
|
453 | $ hg mv a b | |
452 | $ hg ci -m 'mv a b' |
|
454 | $ hg ci -m 'mv a b' | |
453 | created new head |
|
455 | created new head | |
454 | $ hg up -q 2 |
|
456 | $ hg up -q 2 | |
455 |
|
457 | |||
456 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
458 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
457 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
459 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
458 | | desc: mv a b |
|
460 | | desc: mv a b | |
459 | | o changeset: b0357b07f79129a3d08a68621271ca1352ae8a09 |
|
461 | | o changeset: b0357b07f79129a3d08a68621271ca1352ae8a09 | |
460 | |/ desc: modify a |
|
462 | |/ desc: modify a | |
461 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
463 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
462 | desc: initial |
|
464 | desc: initial | |
463 |
|
465 | |||
464 | $ hg merge 1 |
|
466 | $ hg merge 1 | |
465 | merging b and a to b |
|
467 | merging b and a to b | |
466 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
468 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
467 | (branch merge, don't forget to commit) |
|
469 | (branch merge, don't forget to commit) | |
468 | $ hg ci -m merge |
|
470 | $ hg ci -m merge | |
469 | $ ls |
|
471 | $ ls | |
470 | b |
|
472 | b | |
471 | $ cd .. |
|
473 | $ cd .. | |
472 | $ rm -rf repo |
|
474 | $ rm -rf repo | |
473 |
|
475 | |||
474 | Copy and move file |
|
476 | Copy and move file | |
475 | ------------------ |
|
477 | ------------------ | |
476 |
|
478 | |||
477 | $ hg init repo |
|
479 | $ hg init repo | |
478 | $ initclient repo |
|
480 | $ initclient repo | |
479 | $ cd repo |
|
481 | $ cd repo | |
480 | $ echo a > a |
|
482 | $ echo a > a | |
481 | $ hg add a |
|
483 | $ hg add a | |
482 | $ hg ci -m initial |
|
484 | $ hg ci -m initial | |
483 | $ hg cp a c |
|
485 | $ hg cp a c | |
484 | $ hg mv a b |
|
486 | $ hg mv a b | |
485 | $ hg ci -m 'cp a c, mv a b' |
|
487 | $ hg ci -m 'cp a c, mv a b' | |
486 | $ hg up -q 0 |
|
488 | $ hg up -q 0 | |
487 | $ echo b > a |
|
489 | $ echo b > a | |
488 | $ hg ci -m 'mod a' |
|
490 | $ hg ci -m 'mod a' | |
489 | created new head |
|
491 | created new head | |
490 |
|
492 | |||
491 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
493 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
492 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
494 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e | |
493 | | desc: mod a |
|
495 | | desc: mod a | |
494 | | o changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8 |
|
496 | | o changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8 | |
495 | |/ desc: cp a c, mv a b |
|
497 | |/ desc: cp a c, mv a b | |
496 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
498 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
497 | desc: initial |
|
499 | desc: initial | |
498 |
|
500 | |||
499 | $ hg rebase -s . -d 1 |
|
501 | $ hg rebase -s . -d 1 | |
500 | rebasing 2:ef716627c70b "mod a" (tip) |
|
502 | rebasing 2:ef716627c70b "mod a" (tip) | |
501 | merging b and a to b |
|
503 | merging b and a to b | |
502 | merging c and a to c |
|
504 | merging c and a to c | |
503 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg |
|
505 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg | |
504 | $ ls |
|
506 | $ ls | |
505 | b |
|
507 | b | |
506 | c |
|
508 | c | |
507 | $ cat b |
|
509 | $ cat b | |
508 | b |
|
510 | b | |
509 | $ cat c |
|
511 | $ cat c | |
510 | b |
|
512 | b | |
511 | $ cd .. |
|
513 | $ cd .. | |
512 | $ rm -rf repo |
|
514 | $ rm -rf repo | |
513 |
|
515 | |||
514 | Do a merge commit with many consequent moves in one branch |
|
516 | Do a merge commit with many consequent moves in one branch | |
515 | ---------------------------------------------------------- |
|
517 | ---------------------------------------------------------- | |
516 |
|
518 | |||
517 | $ hg init repo |
|
519 | $ hg init repo | |
518 | $ initclient repo |
|
520 | $ initclient repo | |
519 | $ cd repo |
|
521 | $ cd repo | |
520 | $ echo a > a |
|
522 | $ echo a > a | |
521 | $ hg add a |
|
523 | $ hg add a | |
522 | $ hg ci -m initial |
|
524 | $ hg ci -m initial | |
523 | $ echo b > a |
|
525 | $ echo b > a | |
524 | $ hg ci -qm 'mod a' |
|
526 | $ hg ci -qm 'mod a' | |
525 | $ hg up -q ".^" |
|
527 | $ hg up -q ".^" | |
526 | $ hg mv a b |
|
528 | $ hg mv a b | |
527 | $ hg ci -qm 'mv a b' |
|
529 | $ hg ci -qm 'mv a b' | |
528 | $ hg mv b c |
|
530 | $ hg mv b c | |
529 | $ hg ci -qm 'mv b c' |
|
531 | $ hg ci -qm 'mv b c' | |
530 | $ hg up -q 1 |
|
532 | $ hg up -q 1 | |
531 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
533 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
532 | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
534 | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
533 | | desc: mv b c |
|
535 | | desc: mv b c | |
534 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
536 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
535 | | desc: mv a b |
|
537 | | desc: mv a b | |
536 | | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
538 | | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e | |
537 | |/ desc: mod a |
|
539 | |/ desc: mod a | |
538 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
540 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
539 | desc: initial |
|
541 | desc: initial | |
540 |
|
542 | |||
541 | $ hg merge 3 |
|
543 | $ hg merge 3 | |
542 | merging a and c to c |
|
544 | merging a and c to c | |
543 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
545 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
544 | (branch merge, don't forget to commit) |
|
546 | (branch merge, don't forget to commit) | |
545 | $ hg ci -qm 'merge' |
|
547 | $ hg ci -qm 'merge' | |
546 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' |
|
548 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
547 | @ changeset: cd29b0d08c0f39bfed4cde1b40e30f419db0c825 |
|
549 | @ changeset: cd29b0d08c0f39bfed4cde1b40e30f419db0c825 | |
548 | |\ desc: merge, phase: draft |
|
550 | |\ desc: merge, phase: draft | |
549 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
551 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
550 | | | desc: mv b c, phase: draft |
|
552 | | | desc: mv b c, phase: draft | |
551 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
553 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
552 | | | desc: mv a b, phase: draft |
|
554 | | | desc: mv a b, phase: draft | |
553 | o | changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
555 | o | changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e | |
554 | |/ desc: mod a, phase: draft |
|
556 | |/ desc: mod a, phase: draft | |
555 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
557 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
556 | desc: initial, phase: draft |
|
558 | desc: initial, phase: draft | |
557 | $ ls |
|
559 | $ ls | |
558 | c |
|
560 | c | |
559 | $ cd .. |
|
561 | $ cd .. | |
560 | $ rm -rf repo |
|
562 | $ rm -rf repo | |
561 |
|
563 | |||
562 | Test shelve/unshelve |
|
564 | Test shelve/unshelve | |
563 | ------------------- |
|
565 | ------------------- | |
564 |
|
566 | |||
565 | $ hg init repo |
|
567 | $ hg init repo | |
566 | $ initclient repo |
|
568 | $ initclient repo | |
567 | $ cd repo |
|
569 | $ cd repo | |
568 | $ echo a > a |
|
570 | $ echo a > a | |
569 | $ hg add a |
|
571 | $ hg add a | |
570 | $ hg ci -m initial |
|
572 | $ hg ci -m initial | |
571 | $ echo b > a |
|
573 | $ echo b > a | |
572 | $ hg shelve |
|
574 | $ hg shelve | |
573 | shelved as default |
|
575 | shelved as default | |
574 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
576 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
575 | $ hg mv a b |
|
577 | $ hg mv a b | |
576 | $ hg ci -m 'mv a b' |
|
578 | $ hg ci -m 'mv a b' | |
577 |
|
579 | |||
578 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' |
|
580 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
579 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
581 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
580 | | desc: mv a b |
|
582 | | desc: mv a b | |
581 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
583 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
582 | desc: initial |
|
584 | desc: initial | |
583 | $ hg unshelve |
|
585 | $ hg unshelve | |
584 | unshelving change 'default' |
|
586 | unshelving change 'default' | |
585 | rebasing shelved changes |
|
587 | rebasing shelved changes | |
586 | merging b and a to b |
|
588 | merging b and a to b | |
587 | $ ls |
|
589 | $ ls | |
588 | b |
|
590 | b | |
589 | $ cat b |
|
591 | $ cat b | |
590 | b |
|
592 | b | |
591 | $ cd .. |
|
593 | $ cd .. | |
592 | $ rm -rf repo |
|
594 | $ rm -rf repo | |
593 |
|
595 | |||
594 | Test full copytrace ability on draft branch |
|
596 | Test full copytrace ability on draft branch | |
595 | ------------------------------------------- |
|
597 | ------------------------------------------- | |
596 |
|
598 | |||
597 | File directory and base name changed in same move |
|
599 | File directory and base name changed in same move | |
598 | $ hg init repo |
|
600 | $ hg init repo | |
599 | $ initclient repo |
|
601 | $ initclient repo | |
600 | $ mkdir repo/dir1 |
|
602 | $ mkdir repo/dir1 | |
601 | $ cd repo/dir1 |
|
603 | $ cd repo/dir1 | |
602 | $ echo a > a |
|
604 | $ echo a > a | |
603 | $ hg add a |
|
605 | $ hg add a | |
604 | $ hg ci -qm initial |
|
606 | $ hg ci -qm initial | |
605 | $ cd .. |
|
607 | $ cd .. | |
606 | $ hg mv -q dir1 dir2 |
|
608 | $ hg mv -q dir1 dir2 | |
607 | $ hg mv dir2/a dir2/b |
|
609 | $ hg mv dir2/a dir2/b | |
608 | $ hg ci -qm 'mv a b; mv dir1 dir2' |
|
610 | $ hg ci -qm 'mv a b; mv dir1 dir2' | |
609 | $ hg up -q '.^' |
|
611 | $ hg up -q '.^' | |
610 | $ cd dir1 |
|
612 | $ cd dir1 | |
611 | $ echo b >> a |
|
613 | $ echo b >> a | |
612 | $ cd .. |
|
614 | $ cd .. | |
613 | $ hg ci -qm 'mod a' |
|
615 | $ hg ci -qm 'mod a' | |
614 |
|
616 | |||
615 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' |
|
617 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' | |
616 | @ changeset 6207d2d318e710b882e3d5ada2a89770efc42c96 |
|
618 | @ changeset 6207d2d318e710b882e3d5ada2a89770efc42c96 | |
617 | | desc mod a, phase: draft |
|
619 | | desc mod a, phase: draft | |
618 | | o changeset abffdd4e3dfc04bc375034b970299b2a309a1cce |
|
620 | | o changeset abffdd4e3dfc04bc375034b970299b2a309a1cce | |
619 | |/ desc mv a b; mv dir1 dir2, phase: draft |
|
621 | |/ desc mv a b; mv dir1 dir2, phase: draft | |
620 | o changeset 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3 |
|
622 | o changeset 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3 | |
621 | desc initial, phase: draft |
|
623 | desc initial, phase: draft | |
622 |
|
624 | |||
623 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 |
|
625 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 | |
624 | rebasing 2:6207d2d318e7 "mod a" (tip) |
|
626 | rebasing 2:6207d2d318e7 "mod a" (tip) | |
625 | merging dir2/b and dir1/a to dir2/b |
|
627 | merging dir2/b and dir1/a to dir2/b | |
626 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg |
|
628 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg | |
627 | $ cat dir2/b |
|
629 | $ cat dir2/b | |
628 | a |
|
630 | a | |
629 | b |
|
631 | b | |
630 | $ cd .. |
|
632 | $ cd .. | |
631 | $ rm -rf repo |
|
633 | $ rm -rf repo | |
632 |
|
634 | |||
633 | Move directory in one merge parent, while adding file to original directory |
|
635 | Move directory in one merge parent, while adding file to original directory | |
634 | in other merge parent. File moved on rebase. |
|
636 | in other merge parent. File moved on rebase. | |
635 |
|
637 | |||
636 | $ hg init repo |
|
638 | $ hg init repo | |
637 | $ initclient repo |
|
639 | $ initclient repo | |
638 | $ mkdir repo/dir1 |
|
640 | $ mkdir repo/dir1 | |
639 | $ cd repo/dir1 |
|
641 | $ cd repo/dir1 | |
640 | $ echo dummy > dummy |
|
642 | $ echo dummy > dummy | |
641 | $ hg add dummy |
|
643 | $ hg add dummy | |
642 | $ cd .. |
|
644 | $ cd .. | |
643 | $ hg ci -qm initial |
|
645 | $ hg ci -qm initial | |
644 | $ cd dir1 |
|
646 | $ cd dir1 | |
645 | $ echo a > a |
|
647 | $ echo a > a | |
646 | $ hg add a |
|
648 | $ hg add a | |
647 | $ cd .. |
|
649 | $ cd .. | |
648 | $ hg ci -qm 'hg add dir1/a' |
|
650 | $ hg ci -qm 'hg add dir1/a' | |
649 | $ hg up -q '.^' |
|
651 | $ hg up -q '.^' | |
650 | $ hg mv -q dir1 dir2 |
|
652 | $ hg mv -q dir1 dir2 | |
651 | $ hg ci -qm 'mv dir1 dir2' |
|
653 | $ hg ci -qm 'mv dir1 dir2' | |
652 |
|
654 | |||
653 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' |
|
655 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' | |
654 | @ changeset e8919e7df8d036e07b906045eddcd4a42ff1915f |
|
656 | @ changeset e8919e7df8d036e07b906045eddcd4a42ff1915f | |
655 | | desc mv dir1 dir2, phase: draft |
|
657 | | desc mv dir1 dir2, phase: draft | |
656 | | o changeset 7c7c6f339be00f849c3cb2df738ca91db78b32c8 |
|
658 | | o changeset 7c7c6f339be00f849c3cb2df738ca91db78b32c8 | |
657 | |/ desc hg add dir1/a, phase: draft |
|
659 | |/ desc hg add dir1/a, phase: draft | |
658 | o changeset a235dcce55dcf42034c4e374cb200662d0bb4a13 |
|
660 | o changeset a235dcce55dcf42034c4e374cb200662d0bb4a13 | |
659 | desc initial, phase: draft |
|
661 | desc initial, phase: draft | |
660 |
|
662 | |||
661 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 |
|
663 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 | |
662 | rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip) |
|
664 | rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip) | |
663 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg |
|
665 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg | |
664 | $ ls dir2 |
|
666 | $ ls dir2 | |
665 | a |
|
667 | a | |
666 | dummy |
|
668 | dummy | |
667 | $ rm -rf repo |
|
669 | $ rm -rf repo | |
668 |
|
670 | |||
669 | Testing the sourcecommitlimit config |
|
671 | Testing the sourcecommitlimit config | |
670 | ----------------------------------- |
|
672 | ----------------------------------- | |
671 |
|
673 | |||
672 | $ hg init repo |
|
674 | $ hg init repo | |
673 | $ initclient repo |
|
675 | $ initclient repo | |
674 | $ cd repo |
|
676 | $ cd repo | |
675 | $ echo a > a |
|
677 | $ echo a > a | |
676 | $ hg ci -Aqm "added a" |
|
678 | $ hg ci -Aqm "added a" | |
677 | $ echo "more things" >> a |
|
679 | $ echo "more things" >> a | |
678 | $ hg ci -qm "added more things to a" |
|
680 | $ hg ci -qm "added more things to a" | |
679 | $ hg up 0 |
|
681 | $ hg up 0 | |
680 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
682 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
681 | $ echo b > b |
|
683 | $ echo b > b | |
682 | $ hg ci -Aqm "added b" |
|
684 | $ hg ci -Aqm "added b" | |
683 | $ mkdir foo |
|
685 | $ mkdir foo | |
684 | $ hg mv a foo/bar |
|
686 | $ hg mv a foo/bar | |
685 | $ hg ci -m "Moved a to foo/bar" |
|
687 | $ hg ci -m "Moved a to foo/bar" | |
686 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' |
|
688 | $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n' | |
687 | @ changeset b4b0f7880e500b5c364a5f07b4a2b167de7a6fb0 |
|
689 | @ changeset b4b0f7880e500b5c364a5f07b4a2b167de7a6fb0 | |
688 | | desc Moved a to foo/bar, phase: draft |
|
690 | | desc Moved a to foo/bar, phase: draft | |
689 | o changeset 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d |
|
691 | o changeset 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d | |
690 | | desc added b, phase: draft |
|
692 | | desc added b, phase: draft | |
691 | | o changeset 8b6e13696c38e8445a759516474640c2f8dddef6 |
|
693 | | o changeset 8b6e13696c38e8445a759516474640c2f8dddef6 | |
692 | |/ desc added more things to a, phase: draft |
|
694 | |/ desc added more things to a, phase: draft | |
693 | o changeset 9092f1db7931481f93b37d5c9fbcfc341bcd7318 |
|
695 | o changeset 9092f1db7931481f93b37d5c9fbcfc341bcd7318 | |
694 | desc added a, phase: draft |
|
696 | desc added a, phase: draft | |
695 |
|
697 | |||
696 | When the sourcecommitlimit is small and we have more drafts, we use heuristics only |
|
698 | When the sourcecommitlimit is small and we have more drafts, we use heuristics only | |
697 |
|
699 | |||
698 | $ hg rebase -s 8b6e13696 -d . |
|
700 | $ hg rebase -s 8b6e13696 -d . | |
699 | rebasing 1:8b6e13696c38 "added more things to a" |
|
701 | rebasing 1:8b6e13696c38 "added more things to a" | |
700 | other [source] changed a which local [dest] deleted |
|
702 | file a was deleted in other [source] but was modified in local [dest]. | |
|
703 | What do you want to do? | |||
701 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
704 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
702 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
705 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
703 | [1] |
|
706 | [1] | |
704 |
|
707 | |||
705 | But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do |
|
708 | But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do | |
706 | fullcopytracing |
|
709 | fullcopytracing | |
707 |
|
710 | |||
708 | $ hg rebase --abort |
|
711 | $ hg rebase --abort | |
709 | rebase aborted |
|
712 | rebase aborted | |
710 | $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100 |
|
713 | $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100 | |
711 | rebasing 1:8b6e13696c38 "added more things to a" |
|
714 | rebasing 1:8b6e13696c38 "added more things to a" | |
712 | merging foo/bar and a to foo/bar |
|
715 | merging foo/bar and a to foo/bar | |
713 | saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg |
|
716 | saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg | |
714 | $ cd .. |
|
717 | $ cd .. | |
715 | $ rm -rf repo |
|
718 | $ rm -rf repo |
@@ -1,794 +1,795 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 |
|
2 | |||
3 | This file focuses mainly on updating largefiles in the working |
|
3 | This file focuses mainly on updating largefiles in the working | |
4 | directory (and ".hg/largefiles/dirstate") |
|
4 | directory (and ".hg/largefiles/dirstate") | |
5 |
|
5 | |||
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [ui] |
|
7 | > [ui] | |
8 | > merge = internal:fail |
|
8 | > merge = internal:fail | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > largefiles = |
|
10 | > largefiles = | |
11 | > [extdiff] |
|
11 | > [extdiff] | |
12 | > # for portability: |
|
12 | > # for portability: | |
13 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
13 | > pdiff = sh "$RUNTESTDIR/pdiff" | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ hg init repo |
|
16 | $ hg init repo | |
17 | $ cd repo |
|
17 | $ cd repo | |
18 |
|
18 | |||
19 | $ echo large1 > large1 |
|
19 | $ echo large1 > large1 | |
20 | $ echo large2 > large2 |
|
20 | $ echo large2 > large2 | |
21 | $ hg add --large large1 large2 |
|
21 | $ hg add --large large1 large2 | |
22 | $ echo normal1 > normal1 |
|
22 | $ echo normal1 > normal1 | |
23 | $ hg add normal1 |
|
23 | $ hg add normal1 | |
24 | $ hg commit -m '#0' |
|
24 | $ hg commit -m '#0' | |
25 | $ echo 'large1 in #1' > large1 |
|
25 | $ echo 'large1 in #1' > large1 | |
26 | $ echo 'normal1 in #1' > normal1 |
|
26 | $ echo 'normal1 in #1' > normal1 | |
27 | $ hg commit -m '#1' |
|
27 | $ hg commit -m '#1' | |
28 | $ hg pdiff -r '.^' --config extensions.extdiff= |
|
28 | $ hg pdiff -r '.^' --config extensions.extdiff= | |
29 | diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1 |
|
29 | diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1 | |
30 | --- repo.0d9d9b8dc9a3/.hglf/large1 * (glob) |
|
30 | --- repo.0d9d9b8dc9a3/.hglf/large1 * (glob) | |
31 | +++ repo/.hglf/large1 * (glob) |
|
31 | +++ repo/.hglf/large1 * (glob) | |
32 | @@ -1* +1* @@ (glob) |
|
32 | @@ -1* +1* @@ (glob) | |
33 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
33 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
34 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
34 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
35 | diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1 |
|
35 | diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1 | |
36 | --- repo.0d9d9b8dc9a3/normal1 * (glob) |
|
36 | --- repo.0d9d9b8dc9a3/normal1 * (glob) | |
37 | +++ repo/normal1 * (glob) |
|
37 | +++ repo/normal1 * (glob) | |
38 | @@ -1* +1* @@ (glob) |
|
38 | @@ -1* +1* @@ (glob) | |
39 | -normal1 |
|
39 | -normal1 | |
40 | +normal1 in #1 |
|
40 | +normal1 in #1 | |
41 | [1] |
|
41 | [1] | |
42 | $ hg update -q -C 0 |
|
42 | $ hg update -q -C 0 | |
43 | $ echo 'large2 in #2' > large2 |
|
43 | $ echo 'large2 in #2' > large2 | |
44 | $ hg commit -m '#2' |
|
44 | $ hg commit -m '#2' | |
45 | created new head |
|
45 | created new head | |
46 |
|
46 | |||
47 | Test that update also updates the lfdirstate of 'unsure' largefiles after |
|
47 | Test that update also updates the lfdirstate of 'unsure' largefiles after | |
48 | hashing them: |
|
48 | hashing them: | |
49 |
|
49 | |||
50 | The previous operations will usually have left us with largefiles with a mtime |
|
50 | The previous operations will usually have left us with largefiles with a mtime | |
51 | within the same second as the dirstate was written. |
|
51 | within the same second as the dirstate was written. | |
52 | The lfdirstate entries will thus have been written with an invalidated/unset |
|
52 | The lfdirstate entries will thus have been written with an invalidated/unset | |
53 | mtime to make sure further changes within the same second is detected. |
|
53 | mtime to make sure further changes within the same second is detected. | |
54 | We will however occasionally be "lucky" and get a tick between writing |
|
54 | We will however occasionally be "lucky" and get a tick between writing | |
55 | largefiles and writing dirstate so we get valid lfdirstate timestamps. The |
|
55 | largefiles and writing dirstate so we get valid lfdirstate timestamps. The | |
56 | following verification is thus disabled but can be verified manually. |
|
56 | following verification is thus disabled but can be verified manually. | |
57 |
|
57 | |||
58 | #if false |
|
58 | #if false | |
59 | $ hg debugdirstate --large --nodate |
|
59 | $ hg debugdirstate --large --nodate | |
60 | n 644 7 unset large1 |
|
60 | n 644 7 unset large1 | |
61 | n 644 13 unset large2 |
|
61 | n 644 13 unset large2 | |
62 | #endif |
|
62 | #endif | |
63 |
|
63 | |||
64 | Wait to make sure we get a tick so the mtime of the largefiles become valid. |
|
64 | Wait to make sure we get a tick so the mtime of the largefiles become valid. | |
65 |
|
65 | |||
66 | $ sleep 1 |
|
66 | $ sleep 1 | |
67 |
|
67 | |||
68 | A linear merge will update standins before performing the actual merge. It will |
|
68 | A linear merge will update standins before performing the actual merge. It will | |
69 | do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and |
|
69 | do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and | |
70 | update the corresponding standins. |
|
70 | update the corresponding standins. | |
71 | Verify that it actually marks the clean files as clean in lfdirstate so |
|
71 | Verify that it actually marks the clean files as clean in lfdirstate so | |
72 | we don't have to hash them again next time we update. |
|
72 | we don't have to hash them again next time we update. | |
73 |
|
73 | |||
74 | $ hg up |
|
74 | $ hg up | |
75 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 | updated to "f74e50bd9e55: #2" |
|
76 | updated to "f74e50bd9e55: #2" | |
77 | 1 other heads for branch "default" |
|
77 | 1 other heads for branch "default" | |
78 | $ hg debugdirstate --large --nodate |
|
78 | $ hg debugdirstate --large --nodate | |
79 | n 644 7 set large1 |
|
79 | n 644 7 set large1 | |
80 | n 644 13 set large2 |
|
80 | n 644 13 set large2 | |
81 |
|
81 | |||
82 | Test that lfdirstate keeps track of last modification of largefiles and |
|
82 | Test that lfdirstate keeps track of last modification of largefiles and | |
83 | prevents unnecessary hashing of content - also after linear/noop update |
|
83 | prevents unnecessary hashing of content - also after linear/noop update | |
84 |
|
84 | |||
85 | $ sleep 1 |
|
85 | $ sleep 1 | |
86 | $ hg st |
|
86 | $ hg st | |
87 | $ hg debugdirstate --large --nodate |
|
87 | $ hg debugdirstate --large --nodate | |
88 | n 644 7 set large1 |
|
88 | n 644 7 set large1 | |
89 | n 644 13 set large2 |
|
89 | n 644 13 set large2 | |
90 | $ hg up |
|
90 | $ hg up | |
91 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | updated to "f74e50bd9e55: #2" |
|
92 | updated to "f74e50bd9e55: #2" | |
93 | 1 other heads for branch "default" |
|
93 | 1 other heads for branch "default" | |
94 | $ hg debugdirstate --large --nodate |
|
94 | $ hg debugdirstate --large --nodate | |
95 | n 644 7 set large1 |
|
95 | n 644 7 set large1 | |
96 | n 644 13 set large2 |
|
96 | n 644 13 set large2 | |
97 |
|
97 | |||
98 | Test that "hg merge" updates largefiles from "other" correctly |
|
98 | Test that "hg merge" updates largefiles from "other" correctly | |
99 |
|
99 | |||
100 | (getting largefiles from "other" normally) |
|
100 | (getting largefiles from "other" normally) | |
101 |
|
101 | |||
102 | $ hg status -A large1 |
|
102 | $ hg status -A large1 | |
103 | C large1 |
|
103 | C large1 | |
104 | $ cat large1 |
|
104 | $ cat large1 | |
105 | large1 |
|
105 | large1 | |
106 | $ cat .hglf/large1 |
|
106 | $ cat .hglf/large1 | |
107 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
107 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
108 | $ hg merge --config debug.dirstate.delaywrite=2 |
|
108 | $ hg merge --config debug.dirstate.delaywrite=2 | |
109 | getting changed largefiles |
|
109 | getting changed largefiles | |
110 | 1 largefiles updated, 0 removed |
|
110 | 1 largefiles updated, 0 removed | |
111 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 | (branch merge, don't forget to commit) |
|
112 | (branch merge, don't forget to commit) | |
113 | $ hg status -A large1 |
|
113 | $ hg status -A large1 | |
114 | M large1 |
|
114 | M large1 | |
115 | $ cat large1 |
|
115 | $ cat large1 | |
116 | large1 in #1 |
|
116 | large1 in #1 | |
117 | $ cat .hglf/large1 |
|
117 | $ cat .hglf/large1 | |
118 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
118 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
119 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
119 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
120 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
120 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
121 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
121 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
122 |
|
122 | |||
123 | (getting largefiles from "other" via conflict prompt) |
|
123 | (getting largefiles from "other" via conflict prompt) | |
124 |
|
124 | |||
125 | $ hg update -q -C 2 |
|
125 | $ hg update -q -C 2 | |
126 | $ echo 'large1 in #3' > large1 |
|
126 | $ echo 'large1 in #3' > large1 | |
127 | $ echo 'normal1 in #3' > normal1 |
|
127 | $ echo 'normal1 in #3' > normal1 | |
128 | $ hg commit -m '#3' |
|
128 | $ hg commit -m '#3' | |
129 | $ cat .hglf/large1 |
|
129 | $ cat .hglf/large1 | |
130 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
130 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
131 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF |
|
131 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF | |
132 | > o |
|
132 | > o | |
133 | > EOF |
|
133 | > EOF | |
134 | largefile large1 has a merge conflict |
|
134 | largefile large1 has a merge conflict | |
135 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
135 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
136 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
136 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
137 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
137 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
138 | merging normal1 |
|
138 | merging normal1 | |
139 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') |
|
139 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') | |
140 | getting changed largefiles |
|
140 | getting changed largefiles | |
141 | 1 largefiles updated, 0 removed |
|
141 | 1 largefiles updated, 0 removed | |
142 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
142 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
143 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
143 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
144 | [1] |
|
144 | [1] | |
145 | $ hg status -A large1 |
|
145 | $ hg status -A large1 | |
146 | M large1 |
|
146 | M large1 | |
147 | $ cat large1 |
|
147 | $ cat large1 | |
148 | large1 in #1 |
|
148 | large1 in #1 | |
149 | $ cat .hglf/large1 |
|
149 | $ cat .hglf/large1 | |
150 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
150 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
151 | $ rm normal1.orig |
|
151 | $ rm normal1.orig | |
152 |
|
152 | |||
153 | (merge non-existing largefiles from "other" via conflict prompt - |
|
153 | (merge non-existing largefiles from "other" via conflict prompt - | |
154 | make sure the following commit doesn't abort in a confusing way when trying to |
|
154 | make sure the following commit doesn't abort in a confusing way when trying to | |
155 | mark the non-existing file as normal in lfdirstate) |
|
155 | mark the non-existing file as normal in lfdirstate) | |
156 |
|
156 | |||
157 | $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 . |
|
157 | $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 . | |
158 | $ hg update -q -C 3 |
|
158 | $ hg update -q -C 3 | |
159 | $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF |
|
159 | $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF | |
160 | > o |
|
160 | > o | |
161 | > EOF |
|
161 | > EOF | |
162 | largefile large1 has a merge conflict |
|
162 | largefile large1 has a merge conflict | |
163 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
163 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
164 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
164 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
165 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
165 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
166 | getting changed largefiles |
|
166 | getting changed largefiles | |
167 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) |
|
167 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) | |
168 | 0 largefiles updated, 0 removed |
|
168 | 0 largefiles updated, 0 removed | |
169 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
169 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
170 | (branch merge, don't forget to commit) |
|
170 | (branch merge, don't forget to commit) | |
171 | $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not |
|
171 | $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not | |
172 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store |
|
172 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store | |
173 | $ hg up -C . --config largefiles.usercache=not |
|
173 | $ hg up -C . --config largefiles.usercache=not | |
174 | getting changed largefiles |
|
174 | getting changed largefiles | |
175 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) |
|
175 | large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob) | |
176 | 0 largefiles updated, 0 removed |
|
176 | 0 largefiles updated, 0 removed | |
177 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
177 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
178 | $ hg st large1 |
|
178 | $ hg st large1 | |
179 | ! large1 |
|
179 | ! large1 | |
180 | $ hg rollback -q |
|
180 | $ hg rollback -q | |
181 | $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/ |
|
181 | $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/ | |
182 |
|
182 | |||
183 | Test that "hg revert -r REV" updates largefiles from "REV" correctly |
|
183 | Test that "hg revert -r REV" updates largefiles from "REV" correctly | |
184 |
|
184 | |||
185 | $ hg update -q -C 3 |
|
185 | $ hg update -q -C 3 | |
186 | $ hg status -A large1 |
|
186 | $ hg status -A large1 | |
187 | C large1 |
|
187 | C large1 | |
188 | $ cat large1 |
|
188 | $ cat large1 | |
189 | large1 in #3 |
|
189 | large1 in #3 | |
190 | $ cat .hglf/large1 |
|
190 | $ cat .hglf/large1 | |
191 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
191 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
192 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
192 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
193 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
193 | -4669e532d5b2c093a78eca010077e708a071bb64 | |
194 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
194 | +58e24f733a964da346e2407a2bee99d9001184f5 | |
195 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 |
|
195 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 | |
196 | $ hg status -A large1 |
|
196 | $ hg status -A large1 | |
197 | M large1 |
|
197 | M large1 | |
198 | $ cat large1 |
|
198 | $ cat large1 | |
199 | large1 in #1 |
|
199 | large1 in #1 | |
200 | $ cat .hglf/large1 |
|
200 | $ cat .hglf/large1 | |
201 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
201 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
202 |
|
202 | |||
203 | Test that "hg rollback" restores status of largefiles correctly |
|
203 | Test that "hg rollback" restores status of largefiles correctly | |
204 |
|
204 | |||
205 | $ hg update -C -q |
|
205 | $ hg update -C -q | |
206 | $ hg remove large1 |
|
206 | $ hg remove large1 | |
207 | $ test -f .hglf/large1 |
|
207 | $ test -f .hglf/large1 | |
208 | [1] |
|
208 | [1] | |
209 | $ hg forget large2 |
|
209 | $ hg forget large2 | |
210 | $ test -f .hglf/large2 |
|
210 | $ test -f .hglf/large2 | |
211 | [1] |
|
211 | [1] | |
212 | $ echo largeX > largeX |
|
212 | $ echo largeX > largeX | |
213 | $ hg add --large largeX |
|
213 | $ hg add --large largeX | |
214 | $ cat .hglf/largeX |
|
214 | $ cat .hglf/largeX | |
215 |
|
215 | |||
216 | $ hg commit -m 'will be rollback-ed soon' |
|
216 | $ hg commit -m 'will be rollback-ed soon' | |
217 | $ echo largeY > largeY |
|
217 | $ echo largeY > largeY | |
218 | $ hg add --large largeY |
|
218 | $ hg add --large largeY | |
219 |
|
219 | |||
220 | $ hg status -A large1 |
|
220 | $ hg status -A large1 | |
221 | large1: $ENOENT$ |
|
221 | large1: $ENOENT$ | |
222 |
|
222 | |||
223 | $ hg status -A large2 |
|
223 | $ hg status -A large2 | |
224 | ? large2 |
|
224 | ? large2 | |
225 | $ hg status -A largeX |
|
225 | $ hg status -A largeX | |
226 | C largeX |
|
226 | C largeX | |
227 | $ hg status -A largeY |
|
227 | $ hg status -A largeY | |
228 | A largeY |
|
228 | A largeY | |
229 | $ hg rollback |
|
229 | $ hg rollback | |
230 | repository tip rolled back to revision 3 (undo commit) |
|
230 | repository tip rolled back to revision 3 (undo commit) | |
231 | working directory now based on revision 3 |
|
231 | working directory now based on revision 3 | |
232 | $ hg status -A large1 |
|
232 | $ hg status -A large1 | |
233 | R large1 |
|
233 | R large1 | |
234 | $ test -f .hglf/large1 |
|
234 | $ test -f .hglf/large1 | |
235 | [1] |
|
235 | [1] | |
236 | $ hg status -A large2 |
|
236 | $ hg status -A large2 | |
237 | R large2 |
|
237 | R large2 | |
238 | $ test -f .hglf/large2 |
|
238 | $ test -f .hglf/large2 | |
239 | [1] |
|
239 | [1] | |
240 | $ hg status -A largeX |
|
240 | $ hg status -A largeX | |
241 | A largeX |
|
241 | A largeX | |
242 | $ cat .hglf/largeX |
|
242 | $ cat .hglf/largeX | |
243 |
|
243 | |||
244 | $ hg status -A largeY |
|
244 | $ hg status -A largeY | |
245 | ? largeY |
|
245 | ? largeY | |
246 | $ test -f .hglf/largeY |
|
246 | $ test -f .hglf/largeY | |
247 | [1] |
|
247 | [1] | |
248 | $ rm largeY |
|
248 | $ rm largeY | |
249 |
|
249 | |||
250 | Test that "hg rollback" restores standins correctly |
|
250 | Test that "hg rollback" restores standins correctly | |
251 |
|
251 | |||
252 | $ hg commit -m 'will be rollback-ed soon' |
|
252 | $ hg commit -m 'will be rollback-ed soon' | |
253 | $ hg update -q -C 2 |
|
253 | $ hg update -q -C 2 | |
254 | $ cat large1 |
|
254 | $ cat large1 | |
255 | large1 |
|
255 | large1 | |
256 | $ cat .hglf/large1 |
|
256 | $ cat .hglf/large1 | |
257 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
257 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
258 | $ cat large2 |
|
258 | $ cat large2 | |
259 | large2 in #2 |
|
259 | large2 in #2 | |
260 | $ cat .hglf/large2 |
|
260 | $ cat .hglf/large2 | |
261 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
261 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 | |
262 |
|
262 | |||
263 | $ hg rollback -q -f |
|
263 | $ hg rollback -q -f | |
264 | $ cat large1 |
|
264 | $ cat large1 | |
265 | large1 |
|
265 | large1 | |
266 | $ cat .hglf/large1 |
|
266 | $ cat .hglf/large1 | |
267 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
267 | 4669e532d5b2c093a78eca010077e708a071bb64 | |
268 | $ cat large2 |
|
268 | $ cat large2 | |
269 | large2 in #2 |
|
269 | large2 in #2 | |
270 | $ cat .hglf/large2 |
|
270 | $ cat .hglf/large2 | |
271 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
271 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 | |
272 |
|
272 | |||
273 | (rollback the parent of the working directory, when the parent of it |
|
273 | (rollback the parent of the working directory, when the parent of it | |
274 | is not branch-tip) |
|
274 | is not branch-tip) | |
275 |
|
275 | |||
276 | $ hg update -q -C 1 |
|
276 | $ hg update -q -C 1 | |
277 | $ cat .hglf/large1 |
|
277 | $ cat .hglf/large1 | |
278 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
278 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
279 | $ cat .hglf/large2 |
|
279 | $ cat .hglf/large2 | |
280 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
280 | 1deebade43c8c498a3c8daddac0244dc55d1331d | |
281 |
|
281 | |||
282 | $ echo normalX > normalX |
|
282 | $ echo normalX > normalX | |
283 | $ hg add normalX |
|
283 | $ hg add normalX | |
284 | $ hg commit -m 'will be rollback-ed soon' |
|
284 | $ hg commit -m 'will be rollback-ed soon' | |
285 | $ hg rollback -q |
|
285 | $ hg rollback -q | |
286 |
|
286 | |||
287 | $ cat .hglf/large1 |
|
287 | $ cat .hglf/large1 | |
288 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
288 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
289 | $ cat .hglf/large2 |
|
289 | $ cat .hglf/large2 | |
290 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
290 | 1deebade43c8c498a3c8daddac0244dc55d1331d | |
291 | $ rm normalX |
|
291 | $ rm normalX | |
292 |
|
292 | |||
293 | Test that "hg status" shows status of largefiles correctly just after |
|
293 | Test that "hg status" shows status of largefiles correctly just after | |
294 | automated commit like rebase/transplant |
|
294 | automated commit like rebase/transplant | |
295 |
|
295 | |||
296 | $ cat >> .hg/hgrc <<EOF |
|
296 | $ cat >> .hg/hgrc <<EOF | |
297 | > [extensions] |
|
297 | > [extensions] | |
298 | > rebase = |
|
298 | > rebase = | |
299 | > strip = |
|
299 | > strip = | |
300 | > transplant = |
|
300 | > transplant = | |
301 | > EOF |
|
301 | > EOF | |
302 | $ hg update -q -C 1 |
|
302 | $ hg update -q -C 1 | |
303 | $ hg remove large1 |
|
303 | $ hg remove large1 | |
304 | $ echo largeX > largeX |
|
304 | $ echo largeX > largeX | |
305 | $ hg add --large largeX |
|
305 | $ hg add --large largeX | |
306 | $ hg commit -m '#4' |
|
306 | $ hg commit -m '#4' | |
307 |
|
307 | |||
308 | $ hg rebase -s 1 -d 2 --keep |
|
308 | $ hg rebase -s 1 -d 2 --keep | |
309 | rebasing 1:72518492caa6 "#1" |
|
309 | rebasing 1:72518492caa6 "#1" | |
310 | rebasing 4:07d6153b5c04 "#4" (tip) |
|
310 | rebasing 4:07d6153b5c04 "#4" (tip) | |
311 |
|
311 | |||
312 | $ hg status -A large1 |
|
312 | $ hg status -A large1 | |
313 | large1: $ENOENT$ |
|
313 | large1: $ENOENT$ | |
314 |
|
314 | |||
315 | $ hg status -A largeX |
|
315 | $ hg status -A largeX | |
316 | C largeX |
|
316 | C largeX | |
317 | $ hg strip -q 5 |
|
317 | $ hg strip -q 5 | |
318 |
|
318 | |||
319 | $ hg update -q -C 2 |
|
319 | $ hg update -q -C 2 | |
320 | $ hg transplant -q 1 4 |
|
320 | $ hg transplant -q 1 4 | |
321 |
|
321 | |||
322 | $ hg status -A large1 |
|
322 | $ hg status -A large1 | |
323 | large1: $ENOENT$ |
|
323 | large1: $ENOENT$ | |
324 |
|
324 | |||
325 | $ hg status -A largeX |
|
325 | $ hg status -A largeX | |
326 | C largeX |
|
326 | C largeX | |
327 | $ hg strip -q 5 |
|
327 | $ hg strip -q 5 | |
328 |
|
328 | |||
329 | $ hg update -q -C 2 |
|
329 | $ hg update -q -C 2 | |
330 | $ hg transplant -q --merge 1 --merge 4 |
|
330 | $ hg transplant -q --merge 1 --merge 4 | |
331 |
|
331 | |||
332 | $ hg status -A large1 |
|
332 | $ hg status -A large1 | |
333 | large1: $ENOENT$ |
|
333 | large1: $ENOENT$ | |
334 |
|
334 | |||
335 | $ hg status -A largeX |
|
335 | $ hg status -A largeX | |
336 | C largeX |
|
336 | C largeX | |
337 | $ hg strip -q 5 |
|
337 | $ hg strip -q 5 | |
338 |
|
338 | |||
339 | Test that linear merge can detect modification (and conflict) correctly |
|
339 | Test that linear merge can detect modification (and conflict) correctly | |
340 |
|
340 | |||
341 | (linear merge without conflict) |
|
341 | (linear merge without conflict) | |
342 |
|
342 | |||
343 | $ echo 'large2 for linear merge (no conflict)' > large2 |
|
343 | $ echo 'large2 for linear merge (no conflict)' > large2 | |
344 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
344 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |
345 | getting changed largefiles |
|
345 | getting changed largefiles | |
346 | 1 largefiles updated, 0 removed |
|
346 | 1 largefiles updated, 0 removed | |
347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | $ hg status -A large2 |
|
348 | $ hg status -A large2 | |
349 | M large2 |
|
349 | M large2 | |
350 | $ cat large2 |
|
350 | $ cat large2 | |
351 | large2 for linear merge (no conflict) |
|
351 | large2 for linear merge (no conflict) | |
352 | $ cat .hglf/large2 |
|
352 | $ cat .hglf/large2 | |
353 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 |
|
353 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 | |
354 |
|
354 | |||
355 | (linear merge with conflict, choosing "other") |
|
355 | (linear merge with conflict, choosing "other") | |
356 |
|
356 | |||
357 | $ hg update -q -C 2 |
|
357 | $ hg update -q -C 2 | |
358 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
358 | $ echo 'large1 for linear merge (conflict)' > large1 | |
359 | $ hg update 3 --config ui.interactive=True <<EOF |
|
359 | $ hg update 3 --config ui.interactive=True <<EOF | |
360 | > o |
|
360 | > o | |
361 | > EOF |
|
361 | > EOF | |
362 | largefile large1 has a merge conflict |
|
362 | largefile large1 has a merge conflict | |
363 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
363 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
364 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
364 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
365 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o |
|
365 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o | |
366 | getting changed largefiles |
|
366 | getting changed largefiles | |
367 | 1 largefiles updated, 0 removed |
|
367 | 1 largefiles updated, 0 removed | |
368 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
368 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
369 | $ hg status -A large1 |
|
369 | $ hg status -A large1 | |
370 | C large1 |
|
370 | C large1 | |
371 | $ cat large1 |
|
371 | $ cat large1 | |
372 | large1 in #3 |
|
372 | large1 in #3 | |
373 | $ cat .hglf/large1 |
|
373 | $ cat .hglf/large1 | |
374 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
374 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
375 |
|
375 | |||
376 | (linear merge with conflict, choosing "local") |
|
376 | (linear merge with conflict, choosing "local") | |
377 |
|
377 | |||
378 | $ hg update -q -C 2 |
|
378 | $ hg update -q -C 2 | |
379 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
379 | $ echo 'large1 for linear merge (conflict)' > large1 | |
380 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
380 | $ hg update 3 --config debug.dirstate.delaywrite=2 | |
381 | largefile large1 has a merge conflict |
|
381 | largefile large1 has a merge conflict | |
382 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
382 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
383 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
383 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
384 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
384 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
385 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
385 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
386 | $ hg status -A large1 |
|
386 | $ hg status -A large1 | |
387 | M large1 |
|
387 | M large1 | |
388 | $ cat large1 |
|
388 | $ cat large1 | |
389 | large1 for linear merge (conflict) |
|
389 | large1 for linear merge (conflict) | |
390 | $ cat .hglf/large1 |
|
390 | $ cat .hglf/large1 | |
391 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
391 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
392 |
|
392 | |||
393 | Test a linear merge to a revision containing same-name normal file |
|
393 | Test a linear merge to a revision containing same-name normal file | |
394 |
|
394 | |||
395 | $ hg update -q -C 3 |
|
395 | $ hg update -q -C 3 | |
396 | $ hg remove large2 |
|
396 | $ hg remove large2 | |
397 | $ echo 'large2 as normal file' > large2 |
|
397 | $ echo 'large2 as normal file' > large2 | |
398 | $ hg add large2 |
|
398 | $ hg add large2 | |
399 | $ echo 'large3 as normal file' > large3 |
|
399 | $ echo 'large3 as normal file' > large3 | |
400 | $ hg add large3 |
|
400 | $ hg add large3 | |
401 | $ hg commit -m '#5' |
|
401 | $ hg commit -m '#5' | |
402 | $ hg manifest |
|
402 | $ hg manifest | |
403 | .hglf/large1 |
|
403 | .hglf/large1 | |
404 | large2 |
|
404 | large2 | |
405 | large3 |
|
405 | large3 | |
406 | normal1 |
|
406 | normal1 | |
407 |
|
407 | |||
408 | (modified largefile is already switched to normal) |
|
408 | (modified largefile is already switched to normal) | |
409 |
|
409 | |||
410 | $ hg update -q -C 2 |
|
410 | $ hg update -q -C 2 | |
411 | $ echo 'modified large2 for linear merge' > large2 |
|
411 | $ echo 'modified large2 for linear merge' > large2 | |
412 | $ hg update -q 5 |
|
412 | $ hg update -q 5 | |
413 | remote turned local largefile large2 into a normal file |
|
413 | remote turned local largefile large2 into a normal file | |
414 | keep (l)argefile or use (n)ormal file? l |
|
414 | keep (l)argefile or use (n)ormal file? l | |
415 | $ hg debugdirstate --nodates | grep large2 |
|
415 | $ hg debugdirstate --nodates | grep large2 | |
416 | a 0 -1 unset .hglf/large2 |
|
416 | a 0 -1 unset .hglf/large2 | |
417 | r 0 0 set large2 |
|
417 | r 0 0 set large2 | |
418 | $ hg status -A large2 |
|
418 | $ hg status -A large2 | |
419 | A large2 |
|
419 | A large2 | |
420 | $ cat large2 |
|
420 | $ cat large2 | |
421 | modified large2 for linear merge |
|
421 | modified large2 for linear merge | |
422 |
|
422 | |||
423 | (added largefile is already committed as normal) |
|
423 | (added largefile is already committed as normal) | |
424 |
|
424 | |||
425 | $ hg update -q -C 2 |
|
425 | $ hg update -q -C 2 | |
426 | $ echo 'large3 as large file for linear merge' > large3 |
|
426 | $ echo 'large3 as large file for linear merge' > large3 | |
427 | $ hg add --large large3 |
|
427 | $ hg add --large large3 | |
428 | $ hg update -q 5 |
|
428 | $ hg update -q 5 | |
429 | remote turned local largefile large3 into a normal file |
|
429 | remote turned local largefile large3 into a normal file | |
430 | keep (l)argefile or use (n)ormal file? l |
|
430 | keep (l)argefile or use (n)ormal file? l | |
431 | $ hg debugdirstate --nodates | grep large3 |
|
431 | $ hg debugdirstate --nodates | grep large3 | |
432 | a 0 -1 unset .hglf/large3 |
|
432 | a 0 -1 unset .hglf/large3 | |
433 | r 0 0 set large3 |
|
433 | r 0 0 set large3 | |
434 | $ hg status -A large3 |
|
434 | $ hg status -A large3 | |
435 | A large3 |
|
435 | A large3 | |
436 | $ cat large3 |
|
436 | $ cat large3 | |
437 | large3 as large file for linear merge |
|
437 | large3 as large file for linear merge | |
438 | $ rm -f large3 .hglf/large3 |
|
438 | $ rm -f large3 .hglf/large3 | |
439 |
|
439 | |||
440 | Test that the internal linear merging works correctly |
|
440 | Test that the internal linear merging works correctly | |
441 | (both heads are stripped to keep pairing of revision number and commit log) |
|
441 | (both heads are stripped to keep pairing of revision number and commit log) | |
442 |
|
442 | |||
443 | $ hg update -q -C 2 |
|
443 | $ hg update -q -C 2 | |
444 | $ hg strip 3 4 |
|
444 | $ hg strip 3 4 | |
445 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg |
|
445 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg | |
446 | $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP |
|
446 | $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP | |
447 |
|
447 | |||
448 | (internal linear merging at "hg pull --update") |
|
448 | (internal linear merging at "hg pull --update") | |
449 |
|
449 | |||
450 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
450 | $ echo 'large1 for linear merge (conflict)' > large1 | |
451 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
451 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 | |
452 | $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
452 | $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
453 | pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
453 | pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
454 | searching for changes |
|
454 | searching for changes | |
455 | adding changesets |
|
455 | adding changesets | |
456 | adding manifests |
|
456 | adding manifests | |
457 | adding file changes |
|
457 | adding file changes | |
458 | added 3 changesets with 5 changes to 5 files |
|
458 | added 3 changesets with 5 changes to 5 files | |
459 | new changesets 9530e27857f7:d65e59e952a9 |
|
459 | new changesets 9530e27857f7:d65e59e952a9 | |
460 | remote turned local largefile large2 into a normal file |
|
460 | remote turned local largefile large2 into a normal file | |
461 | keep (l)argefile or use (n)ormal file? l |
|
461 | keep (l)argefile or use (n)ormal file? l | |
462 | largefile large1 has a merge conflict |
|
462 | largefile large1 has a merge conflict | |
463 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
463 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
464 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
464 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
465 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
465 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
466 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
466 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
467 | updated to "d65e59e952a9: #5" |
|
467 | updated to "d65e59e952a9: #5" | |
468 | 1 other heads for branch "default" |
|
468 | 1 other heads for branch "default" | |
469 |
|
469 | |||
470 | $ hg status -A large1 |
|
470 | $ hg status -A large1 | |
471 | M large1 |
|
471 | M large1 | |
472 | $ cat large1 |
|
472 | $ cat large1 | |
473 | large1 for linear merge (conflict) |
|
473 | large1 for linear merge (conflict) | |
474 | $ cat .hglf/large1 |
|
474 | $ cat .hglf/large1 | |
475 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
475 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
476 | $ hg status -A large2 |
|
476 | $ hg status -A large2 | |
477 | A large2 |
|
477 | A large2 | |
478 | $ cat large2 |
|
478 | $ cat large2 | |
479 | large2 for linear merge (conflict with normal file) |
|
479 | large2 for linear merge (conflict with normal file) | |
480 | $ cat .hglf/large2 |
|
480 | $ cat .hglf/large2 | |
481 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
481 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
482 |
|
482 | |||
483 | (internal linear merging at "hg unbundle --update") |
|
483 | (internal linear merging at "hg unbundle --update") | |
484 |
|
484 | |||
485 | $ hg update -q -C 2 |
|
485 | $ hg update -q -C 2 | |
486 | $ hg rollback -q |
|
486 | $ hg rollback -q | |
487 |
|
487 | |||
488 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
488 | $ echo 'large1 for linear merge (conflict)' > large1 | |
489 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
489 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 | |
490 | $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg |
|
490 | $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg | |
491 | adding changesets |
|
491 | adding changesets | |
492 | adding manifests |
|
492 | adding manifests | |
493 | adding file changes |
|
493 | adding file changes | |
494 | added 3 changesets with 5 changes to 5 files |
|
494 | added 3 changesets with 5 changes to 5 files | |
495 | new changesets 9530e27857f7:d65e59e952a9 |
|
495 | new changesets 9530e27857f7:d65e59e952a9 | |
496 | remote turned local largefile large2 into a normal file |
|
496 | remote turned local largefile large2 into a normal file | |
497 | keep (l)argefile or use (n)ormal file? l |
|
497 | keep (l)argefile or use (n)ormal file? l | |
498 | largefile large1 has a merge conflict |
|
498 | largefile large1 has a merge conflict | |
499 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
499 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
500 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
500 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
501 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
501 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
502 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
502 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
503 | updated to "d65e59e952a9: #5" |
|
503 | updated to "d65e59e952a9: #5" | |
504 | 1 other heads for branch "default" |
|
504 | 1 other heads for branch "default" | |
505 |
|
505 | |||
506 | $ hg status -A large1 |
|
506 | $ hg status -A large1 | |
507 | M large1 |
|
507 | M large1 | |
508 | $ cat large1 |
|
508 | $ cat large1 | |
509 | large1 for linear merge (conflict) |
|
509 | large1 for linear merge (conflict) | |
510 | $ cat .hglf/large1 |
|
510 | $ cat .hglf/large1 | |
511 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
511 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
512 | $ hg status -A large2 |
|
512 | $ hg status -A large2 | |
513 | A large2 |
|
513 | A large2 | |
514 | $ cat large2 |
|
514 | $ cat large2 | |
515 | large2 for linear merge (conflict with normal file) |
|
515 | large2 for linear merge (conflict with normal file) | |
516 | $ cat .hglf/large2 |
|
516 | $ cat .hglf/large2 | |
517 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
517 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
518 |
|
518 | |||
519 | (internal linear merging in subrepo at "hg update") |
|
519 | (internal linear merging in subrepo at "hg update") | |
520 |
|
520 | |||
521 | $ cd .. |
|
521 | $ cd .. | |
522 | $ hg init subparent |
|
522 | $ hg init subparent | |
523 | $ cd subparent |
|
523 | $ cd subparent | |
524 |
|
524 | |||
525 | $ hg clone -q -u 2 ../repo sub |
|
525 | $ hg clone -q -u 2 ../repo sub | |
526 | $ cat > .hgsub <<EOF |
|
526 | $ cat > .hgsub <<EOF | |
527 | > sub = sub |
|
527 | > sub = sub | |
528 | > EOF |
|
528 | > EOF | |
529 | $ hg add .hgsub |
|
529 | $ hg add .hgsub | |
530 | $ hg commit -m '#0@parent' |
|
530 | $ hg commit -m '#0@parent' | |
531 | $ cat .hgsubstate |
|
531 | $ cat .hgsubstate | |
532 | f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub |
|
532 | f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub | |
533 | $ hg -R sub update -q |
|
533 | $ hg -R sub update -q | |
534 | $ hg commit -m '#1@parent' |
|
534 | $ hg commit -m '#1@parent' | |
535 | $ cat .hgsubstate |
|
535 | $ cat .hgsubstate | |
536 | d65e59e952a9638e2ce863b41a420ca723dd3e8d sub |
|
536 | d65e59e952a9638e2ce863b41a420ca723dd3e8d sub | |
537 | $ hg update -q 0 |
|
537 | $ hg update -q 0 | |
538 |
|
538 | |||
539 | $ echo 'large1 for linear merge (conflict)' > sub/large1 |
|
539 | $ echo 'large1 for linear merge (conflict)' > sub/large1 | |
540 | $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2 |
|
540 | $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2 | |
541 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF |
|
541 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF | |
542 | > m |
|
542 | > m | |
543 | > r |
|
543 | > r | |
544 | > l |
|
544 | > l | |
545 | > l |
|
545 | > l | |
546 | > EOF |
|
546 | > EOF | |
547 | subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9) |
|
547 | subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9) | |
548 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
548 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
549 | subrepository sources for sub differ (in checked out version) |
|
549 | subrepository sources for sub differ (in checked out version) | |
550 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r |
|
550 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r | |
551 | remote turned local largefile large2 into a normal file |
|
551 | remote turned local largefile large2 into a normal file | |
552 | keep (l)argefile or use (n)ormal file? l |
|
552 | keep (l)argefile or use (n)ormal file? l | |
553 | largefile large1 has a merge conflict |
|
553 | largefile large1 has a merge conflict | |
554 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
554 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
555 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
555 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or | |
556 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
556 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l | |
557 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
557 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
558 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
558 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
559 |
|
559 | |||
560 | $ hg -R sub status -A sub/large1 |
|
560 | $ hg -R sub status -A sub/large1 | |
561 | M sub/large1 |
|
561 | M sub/large1 | |
562 | $ cat sub/large1 |
|
562 | $ cat sub/large1 | |
563 | large1 for linear merge (conflict) |
|
563 | large1 for linear merge (conflict) | |
564 | $ cat sub/.hglf/large1 |
|
564 | $ cat sub/.hglf/large1 | |
565 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
565 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 | |
566 | $ hg -R sub status -A sub/large2 |
|
566 | $ hg -R sub status -A sub/large2 | |
567 | A sub/large2 |
|
567 | A sub/large2 | |
568 | $ cat sub/large2 |
|
568 | $ cat sub/large2 | |
569 | large2 for linear merge (conflict with normal file) |
|
569 | large2 for linear merge (conflict with normal file) | |
570 | $ cat sub/.hglf/large2 |
|
570 | $ cat sub/.hglf/large2 | |
571 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
571 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 | |
572 |
|
572 | |||
573 | $ cd .. |
|
573 | $ cd .. | |
574 | $ cd repo |
|
574 | $ cd repo | |
575 |
|
575 | |||
576 | Test that rebase updates largefiles in the working directory even if |
|
576 | Test that rebase updates largefiles in the working directory even if | |
577 | it is aborted by conflict. |
|
577 | it is aborted by conflict. | |
578 |
|
578 | |||
579 | $ hg update -q -C 3 |
|
579 | $ hg update -q -C 3 | |
580 | $ cat .hglf/large1 |
|
580 | $ cat .hglf/large1 | |
581 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
581 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
582 | $ cat large1 |
|
582 | $ cat large1 | |
583 | large1 in #3 |
|
583 | large1 in #3 | |
584 | $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF |
|
584 | $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF | |
585 | > o |
|
585 | > o | |
586 | > EOF |
|
586 | > EOF | |
587 | rebasing 1:72518492caa6 "#1" |
|
587 | rebasing 1:72518492caa6 "#1" | |
588 | largefile large1 has a merge conflict |
|
588 | largefile large1 has a merge conflict | |
589 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
589 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 | |
590 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
590 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or | |
591 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
591 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o | |
592 | merging normal1 |
|
592 | merging normal1 | |
593 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') |
|
593 | warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark') | |
594 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
594 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
595 | [1] |
|
595 | [1] | |
596 | $ cat .hglf/large1 |
|
596 | $ cat .hglf/large1 | |
597 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
597 | 58e24f733a964da346e2407a2bee99d9001184f5 | |
598 | $ cat large1 |
|
598 | $ cat large1 | |
599 | large1 in #1 |
|
599 | large1 in #1 | |
600 | $ rm normal1.orig |
|
600 | $ rm normal1.orig | |
601 |
|
601 | |||
602 | Test that rebase updates standins for manually modified largefiles at |
|
602 | Test that rebase updates standins for manually modified largefiles at | |
603 | the 1st commit of resuming. |
|
603 | the 1st commit of resuming. | |
604 |
|
604 | |||
605 | $ echo "manually modified before 'hg rebase --continue'" > large1 |
|
605 | $ echo "manually modified before 'hg rebase --continue'" > large1 | |
606 | $ hg resolve -m normal1 |
|
606 | $ hg resolve -m normal1 | |
607 | (no more unresolved files) |
|
607 | (no more unresolved files) | |
608 | continue: hg rebase --continue |
|
608 | continue: hg rebase --continue | |
609 | $ hg rebase --continue --config ui.interactive=True <<EOF |
|
609 | $ hg rebase --continue --config ui.interactive=True <<EOF | |
610 | > c |
|
610 | > c | |
611 | > EOF |
|
611 | > EOF | |
612 | rebasing 1:72518492caa6 "#1" |
|
612 | rebasing 1:72518492caa6 "#1" | |
613 | rebasing 4:07d6153b5c04 "#4" |
|
613 | rebasing 4:07d6153b5c04 "#4" | |
614 | local [dest] changed .hglf/large1 which other [source] deleted |
|
614 | file .hglf/large1 was deleted in local [dest] but was modified in other [source]. | |
|
615 | What do you want to do? | |||
615 |
|
|
616 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
616 |
|
617 | |||
617 | $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
618 | $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]' | |
618 | -e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
619 | -e5bb990443d6a92aaf7223813720f7566c9dd05b | |
619 | +8a4f783556e7dea21139ca0466eafce954c75c13 |
|
620 | +8a4f783556e7dea21139ca0466eafce954c75c13 | |
620 | $ rm -f large1 |
|
621 | $ rm -f large1 | |
621 | $ hg update -q -C tip |
|
622 | $ hg update -q -C tip | |
622 | $ cat large1 |
|
623 | $ cat large1 | |
623 | manually modified before 'hg rebase --continue' |
|
624 | manually modified before 'hg rebase --continue' | |
624 |
|
625 | |||
625 | Test that transplant updates largefiles, of which standins are safely |
|
626 | Test that transplant updates largefiles, of which standins are safely | |
626 | changed, even if it is aborted by conflict of other. |
|
627 | changed, even if it is aborted by conflict of other. | |
627 |
|
628 | |||
628 | $ hg update -q -C 5 |
|
629 | $ hg update -q -C 5 | |
629 | $ cat .hglf/large1 |
|
630 | $ cat .hglf/large1 | |
630 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
631 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
631 | $ cat large1 |
|
632 | $ cat large1 | |
632 | large1 in #3 |
|
633 | large1 in #3 | |
633 | $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' |
|
634 | $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' | |
634 | +fa44618ea25181aff4f48b70428294790cec9f61 |
|
635 | +fa44618ea25181aff4f48b70428294790cec9f61 | |
635 | $ hg transplant 4 |
|
636 | $ hg transplant 4 | |
636 | applying 07d6153b5c04 |
|
637 | applying 07d6153b5c04 | |
637 | patching file .hglf/large1 |
|
638 | patching file .hglf/large1 | |
638 | Hunk #1 FAILED at 0 |
|
639 | Hunk #1 FAILED at 0 | |
639 | 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej |
|
640 | 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej | |
640 | patch failed to apply |
|
641 | patch failed to apply | |
641 | abort: fix up the working directory and run hg transplant --continue |
|
642 | abort: fix up the working directory and run hg transplant --continue | |
642 | [255] |
|
643 | [255] | |
643 | $ hg status -A large1 |
|
644 | $ hg status -A large1 | |
644 | C large1 |
|
645 | C large1 | |
645 | $ cat .hglf/large1 |
|
646 | $ cat .hglf/large1 | |
646 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
647 | e5bb990443d6a92aaf7223813720f7566c9dd05b | |
647 | $ cat large1 |
|
648 | $ cat large1 | |
648 | large1 in #3 |
|
649 | large1 in #3 | |
649 | $ hg status -A largeX |
|
650 | $ hg status -A largeX | |
650 | A largeX |
|
651 | A largeX | |
651 | $ cat .hglf/largeX |
|
652 | $ cat .hglf/largeX | |
652 | fa44618ea25181aff4f48b70428294790cec9f61 |
|
653 | fa44618ea25181aff4f48b70428294790cec9f61 | |
653 | $ cat largeX |
|
654 | $ cat largeX | |
654 | largeX |
|
655 | largeX | |
655 |
|
656 | |||
656 | Test that transplant updates standins for manually modified largefiles |
|
657 | Test that transplant updates standins for manually modified largefiles | |
657 | at the 1st commit of resuming. |
|
658 | at the 1st commit of resuming. | |
658 |
|
659 | |||
659 | $ echo "manually modified before 'hg transplant --continue'" > large1 |
|
660 | $ echo "manually modified before 'hg transplant --continue'" > large1 | |
660 | $ hg transplant --continue |
|
661 | $ hg transplant --continue | |
661 | 07d6153b5c04 transplanted as f1bf30eb88cc |
|
662 | 07d6153b5c04 transplanted as f1bf30eb88cc | |
662 | $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]' |
|
663 | $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]' | |
663 | -e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
664 | -e5bb990443d6a92aaf7223813720f7566c9dd05b | |
664 | +6a4f36d4075fbe0f30ec1d26ca44e63c05903671 |
|
665 | +6a4f36d4075fbe0f30ec1d26ca44e63c05903671 | |
665 | $ rm -f large1 |
|
666 | $ rm -f large1 | |
666 | $ hg update -q -C tip |
|
667 | $ hg update -q -C tip | |
667 | $ cat large1 |
|
668 | $ cat large1 | |
668 | manually modified before 'hg transplant --continue' |
|
669 | manually modified before 'hg transplant --continue' | |
669 |
|
670 | |||
670 | Test that "hg status" doesn't show removal of largefiles not managed |
|
671 | Test that "hg status" doesn't show removal of largefiles not managed | |
671 | in the target context. |
|
672 | in the target context. | |
672 |
|
673 | |||
673 | $ hg update -q -C 4 |
|
674 | $ hg update -q -C 4 | |
674 | $ hg remove largeX |
|
675 | $ hg remove largeX | |
675 | $ hg status -A largeX |
|
676 | $ hg status -A largeX | |
676 | R largeX |
|
677 | R largeX | |
677 | $ hg status -A --rev '.^1' largeX |
|
678 | $ hg status -A --rev '.^1' largeX | |
678 |
|
679 | |||
679 | #if execbit |
|
680 | #if execbit | |
680 |
|
681 | |||
681 | Test that "hg status" against revisions other than parent notices exec |
|
682 | Test that "hg status" against revisions other than parent notices exec | |
682 | bit changes of largefiles. |
|
683 | bit changes of largefiles. | |
683 |
|
684 | |||
684 | $ hg update -q -C 4 |
|
685 | $ hg update -q -C 4 | |
685 |
|
686 | |||
686 | (the case that large2 doesn't have exec bit in the target context but |
|
687 | (the case that large2 doesn't have exec bit in the target context but | |
687 | in the working context) |
|
688 | in the working context) | |
688 |
|
689 | |||
689 | $ chmod +x large2 |
|
690 | $ chmod +x large2 | |
690 | $ hg status -A --rev 0 large2 |
|
691 | $ hg status -A --rev 0 large2 | |
691 | M large2 |
|
692 | M large2 | |
692 | $ hg commit -m 'chmod +x large2' |
|
693 | $ hg commit -m 'chmod +x large2' | |
693 |
|
694 | |||
694 | (the case that large2 has exec bit in the target context but not in |
|
695 | (the case that large2 has exec bit in the target context but not in | |
695 | the working context) |
|
696 | the working context) | |
696 |
|
697 | |||
697 | $ echo dummy > dummy |
|
698 | $ echo dummy > dummy | |
698 | $ hg add dummy |
|
699 | $ hg add dummy | |
699 | $ hg commit -m 'revision for separation' |
|
700 | $ hg commit -m 'revision for separation' | |
700 | $ chmod -x large2 |
|
701 | $ chmod -x large2 | |
701 | $ hg status -A --rev '.^1' large2 |
|
702 | $ hg status -A --rev '.^1' large2 | |
702 | M large2 |
|
703 | M large2 | |
703 |
|
704 | |||
704 | #else |
|
705 | #else | |
705 |
|
706 | |||
706 | Test that "hg status" against revisions other than parent ignores exec |
|
707 | Test that "hg status" against revisions other than parent ignores exec | |
707 | bit correctly on the platform being unaware of it. |
|
708 | bit correctly on the platform being unaware of it. | |
708 |
|
709 | |||
709 | $ hg update -q -C 4 |
|
710 | $ hg update -q -C 4 | |
710 |
|
711 | |||
711 | $ cat > ../exec-bit.patch <<EOF |
|
712 | $ cat > ../exec-bit.patch <<EOF | |
712 | > # HG changeset patch |
|
713 | > # HG changeset patch | |
713 | > # User test |
|
714 | > # User test | |
714 | > # Date 0 0 |
|
715 | > # Date 0 0 | |
715 | > # Thu Jan 01 00:00:00 1970 +0000 |
|
716 | > # Thu Jan 01 00:00:00 1970 +0000 | |
716 | > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90 |
|
717 | > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90 | |
717 | > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727 |
|
718 | > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727 | |
718 | > chmod +x large2 |
|
719 | > chmod +x large2 | |
719 | > |
|
720 | > | |
720 | > diff --git a/.hglf/large2 b/.hglf/large2 |
|
721 | > diff --git a/.hglf/large2 b/.hglf/large2 | |
721 | > old mode 100644 |
|
722 | > old mode 100644 | |
722 | > new mode 100755 |
|
723 | > new mode 100755 | |
723 | > EOF |
|
724 | > EOF | |
724 | $ hg import --exact --bypass ../exec-bit.patch |
|
725 | $ hg import --exact --bypass ../exec-bit.patch | |
725 | applying ../exec-bit.patch |
|
726 | applying ../exec-bit.patch | |
726 | $ hg status -A --rev tip large2 |
|
727 | $ hg status -A --rev tip large2 | |
727 | C large2 |
|
728 | C large2 | |
728 |
|
729 | |||
729 | #endif |
|
730 | #endif | |
730 |
|
731 | |||
731 | The fileset revset is evaluated for each revision, instead of once on wdir(), |
|
732 | The fileset revset is evaluated for each revision, instead of once on wdir(), | |
732 | and then patterns matched on each revision. Here, no exec bits are set in |
|
733 | and then patterns matched on each revision. Here, no exec bits are set in | |
733 | wdir(), but a matching revision is detected. |
|
734 | wdir(), but a matching revision is detected. | |
734 |
|
735 | |||
735 | (Teach large2 is not an executable. Maybe this is a bug of largefiles.) |
|
736 | (Teach large2 is not an executable. Maybe this is a bug of largefiles.) | |
736 | #if execbit |
|
737 | #if execbit | |
737 | $ chmod -x .hglf/large2 |
|
738 | $ chmod -x .hglf/large2 | |
738 | #endif |
|
739 | #endif | |
739 |
|
740 | |||
740 | $ hg files 'set:exec()' |
|
741 | $ hg files 'set:exec()' | |
741 | [1] |
|
742 | [1] | |
742 | $ hg log -qr 'file("set:exec()")' |
|
743 | $ hg log -qr 'file("set:exec()")' | |
743 | 9:be1b433a65b1 |
|
744 | 9:be1b433a65b1 | |
744 |
|
745 | |||
745 | Test a fatal error interrupting an update. Verify that status report dirty |
|
746 | Test a fatal error interrupting an update. Verify that status report dirty | |
746 | files correctly after an interrupted update. Also verify that checking all |
|
747 | files correctly after an interrupted update. Also verify that checking all | |
747 | hashes reveals it isn't clean. |
|
748 | hashes reveals it isn't clean. | |
748 |
|
749 | |||
749 | Start with clean dirstates: |
|
750 | Start with clean dirstates: | |
750 | $ hg up --quiet --clean --rev "8^" |
|
751 | $ hg up --quiet --clean --rev "8^" | |
751 | $ sleep 1 |
|
752 | $ sleep 1 | |
752 | $ hg st |
|
753 | $ hg st | |
753 | Update standins without updating largefiles - large1 is modified and largeX is |
|
754 | Update standins without updating largefiles - large1 is modified and largeX is | |
754 | added: |
|
755 | added: | |
755 | $ cat << EOF > ../crashupdatelfiles.py |
|
756 | $ cat << EOF > ../crashupdatelfiles.py | |
756 | > import hgext.largefiles.lfutil |
|
757 | > import hgext.largefiles.lfutil | |
757 | > def getlfilestoupdate(oldstandins, newstandins): |
|
758 | > def getlfilestoupdate(oldstandins, newstandins): | |
758 | > raise SystemExit(7) |
|
759 | > raise SystemExit(7) | |
759 | > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate |
|
760 | > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate | |
760 | > EOF |
|
761 | > EOF | |
761 | $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py |
|
762 | $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py | |
762 | [7] |
|
763 | [7] | |
763 | Check large1 content and status ... and that update will undo modifications: |
|
764 | Check large1 content and status ... and that update will undo modifications: | |
764 | $ cat large1 |
|
765 | $ cat large1 | |
765 | large1 in #3 |
|
766 | large1 in #3 | |
766 | $ hg st |
|
767 | $ hg st | |
767 | M large1 |
|
768 | M large1 | |
768 | ! largeX |
|
769 | ! largeX | |
769 | $ hg up -Cr . |
|
770 | $ hg up -Cr . | |
770 | getting changed largefiles |
|
771 | getting changed largefiles | |
771 | 2 largefiles updated, 0 removed |
|
772 | 2 largefiles updated, 0 removed | |
772 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
773 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
773 | $ cat large1 |
|
774 | $ cat large1 | |
774 | manually modified before 'hg transplant --continue' |
|
775 | manually modified before 'hg transplant --continue' | |
775 | $ hg st |
|
776 | $ hg st | |
776 | Force largefiles rehashing and check that all changes have been caught by |
|
777 | Force largefiles rehashing and check that all changes have been caught by | |
777 | status and update: |
|
778 | status and update: | |
778 | $ rm .hg/largefiles/dirstate |
|
779 | $ rm .hg/largefiles/dirstate | |
779 | $ hg st |
|
780 | $ hg st | |
780 |
|
781 | |||
781 | $ cd .. |
|
782 | $ cd .. | |
782 |
|
783 | |||
783 | Test that "hg convert" avoids copying largefiles from the working |
|
784 | Test that "hg convert" avoids copying largefiles from the working | |
784 | directory into store, because "hg convert" doesn't update largefiles |
|
785 | directory into store, because "hg convert" doesn't update largefiles | |
785 | in the working directory (removing files under ".cache/largefiles" |
|
786 | in the working directory (removing files under ".cache/largefiles" | |
786 | forces "hg convert" to copy corresponding largefiles) |
|
787 | forces "hg convert" to copy corresponding largefiles) | |
787 |
|
788 | |||
788 | $ cat >> $HGRCPATH <<EOF |
|
789 | $ cat >> $HGRCPATH <<EOF | |
789 | > [extensions] |
|
790 | > [extensions] | |
790 | > convert = |
|
791 | > convert = | |
791 | > EOF |
|
792 | > EOF | |
792 |
|
793 | |||
793 | $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671 |
|
794 | $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671 | |
794 | $ hg convert -q repo repo.converted |
|
795 | $ hg convert -q repo repo.converted |
@@ -1,1095 +1,1130 b'' | |||||
1 | Tests for change/delete conflicts, including: |
|
1 | Tests for change/delete conflicts, including: | |
2 | b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again |
|
2 | b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again | |
3 | (issue897) |
|
3 | (issue897) | |
4 |
|
4 | |||
5 | 840e2b315c1f: Fix misleading error and prompts during update/merge |
|
5 | 840e2b315c1f: Fix misleading error and prompts during update/merge | |
6 | (issue556) |
|
6 | (issue556) | |
7 |
|
7 | |||
8 | Make sure HGMERGE doesn't interfere with the test |
|
8 | Make sure HGMERGE doesn't interfere with the test | |
9 | $ unset HGMERGE |
|
9 | $ unset HGMERGE | |
10 |
|
10 | |||
11 | $ status() { |
|
11 | $ status() { | |
12 | > echo "--- status ---" |
|
12 | > echo "--- status ---" | |
13 | > hg st -A file1 file2 file3 |
|
13 | > hg st -A file1 file2 file3 | |
14 | > echo "--- resolve --list ---" |
|
14 | > echo "--- resolve --list ---" | |
15 | > hg resolve --list file1 file2 file3 |
|
15 | > hg resolve --list file1 file2 file3 | |
16 | > echo "--- debugmergestate ---" |
|
16 | > echo "--- debugmergestate ---" | |
17 | > hg debugmergestate |
|
17 | > hg debugmergestate | |
18 | > for file in file1 file2 file3; do |
|
18 | > for file in file1 file2 file3; do | |
19 | > if [ -f $file ]; then |
|
19 | > if [ -f $file ]; then | |
20 | > echo "--- $file ---" |
|
20 | > echo "--- $file ---" | |
21 | > cat $file |
|
21 | > cat $file | |
22 | > else |
|
22 | > else | |
23 | > echo "*** $file does not exist" |
|
23 | > echo "*** $file does not exist" | |
24 | > fi |
|
24 | > fi | |
25 | > done |
|
25 | > done | |
26 | > } |
|
26 | > } | |
27 |
|
27 | |||
28 | $ hg init repo |
|
28 | $ hg init repo | |
29 | $ cd repo |
|
29 | $ cd repo | |
30 |
|
30 | |||
31 | $ echo 1 > file1 |
|
31 | $ echo 1 > file1 | |
32 | $ echo 2 > file2 |
|
32 | $ echo 2 > file2 | |
33 | $ echo 3 > file3 |
|
33 | $ echo 3 > file3 | |
34 | $ hg ci -Am 'added files' |
|
34 | $ hg ci -Am 'added files' | |
35 | adding file1 |
|
35 | adding file1 | |
36 | adding file2 |
|
36 | adding file2 | |
37 | adding file3 |
|
37 | adding file3 | |
38 |
|
38 | |||
39 | $ hg rm file1 |
|
39 | $ hg rm file1 | |
40 | $ echo changed >> file2 |
|
40 | $ echo changed >> file2 | |
41 | $ echo changed1 >> file3 |
|
41 | $ echo changed1 >> file3 | |
42 | $ hg ci -m 'removed file1, changed file2, changed file3' |
|
42 | $ hg ci -m 'removed file1, changed file2, changed file3' | |
43 |
|
43 | |||
44 | $ hg co 0 |
|
44 | $ hg co 0 | |
45 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 |
|
46 | |||
47 | $ echo changed >> file1 |
|
47 | $ echo changed >> file1 | |
48 | $ hg rm file2 |
|
48 | $ hg rm file2 | |
49 | $ echo changed2 >> file3 |
|
49 | $ echo changed2 >> file3 | |
50 | $ hg ci -m 'changed file1, removed file2, changed file3' |
|
50 | $ hg ci -m 'changed file1, removed file2, changed file3' | |
51 | created new head |
|
51 | created new head | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | Non-interactive merge: |
|
54 | Non-interactive merge: | |
55 |
|
55 | |||
56 | $ hg merge -y |
|
56 | $ hg merge -y | |
57 | local [working copy] changed file1 which other [merge rev] deleted |
|
57 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
58 | What do you want to do? | |||
58 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
59 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
59 | other [merge rev] changed file2 which local [working copy] deleted |
|
60 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
61 | What do you want to do? | |||
60 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
62 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
61 | merging file3 |
|
63 | merging file3 | |
62 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
64 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
63 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
|
65 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | |
64 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
66 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
65 | [1] |
|
67 | [1] | |
66 |
|
68 | |||
67 | $ status |
|
69 | $ status | |
68 | --- status --- |
|
70 | --- status --- | |
69 | M file2 |
|
71 | M file2 | |
70 | M file3 |
|
72 | M file3 | |
71 | C file1 |
|
73 | C file1 | |
72 | --- resolve --list --- |
|
74 | --- resolve --list --- | |
73 | U file1 |
|
75 | U file1 | |
74 | U file2 |
|
76 | U file2 | |
75 | U file3 |
|
77 | U file3 | |
76 | --- debugmergestate --- |
|
78 | --- debugmergestate --- | |
77 | * version 2 records |
|
79 | * version 2 records | |
78 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
80 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
79 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
81 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
80 | labels: |
|
82 | labels: | |
81 | local: working copy |
|
83 | local: working copy | |
82 | other: merge rev |
|
84 | other: merge rev | |
83 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
85 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
84 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
86 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
85 | local path: file1 (flags "") |
|
87 | local path: file1 (flags "") | |
86 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
88 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
87 | other path: file1 (node null) |
|
89 | other path: file1 (node null) | |
88 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
90 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
89 | file: file2 (record type "C", state "u", hash null) |
|
91 | file: file2 (record type "C", state "u", hash null) | |
90 | local path: file2 (flags "") |
|
92 | local path: file2 (flags "") | |
91 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
93 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
92 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
94 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
93 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
95 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
94 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
96 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
95 | local path: file3 (flags "") |
|
97 | local path: file3 (flags "") | |
96 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
98 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
97 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
99 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
98 | --- file1 --- |
|
100 | --- file1 --- | |
99 | 1 |
|
101 | 1 | |
100 | changed |
|
102 | changed | |
101 | --- file2 --- |
|
103 | --- file2 --- | |
102 | 2 |
|
104 | 2 | |
103 | changed |
|
105 | changed | |
104 | --- file3 --- |
|
106 | --- file3 --- | |
105 | 3 |
|
107 | 3 | |
106 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... |
|
108 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... | |
107 | changed2 |
|
109 | changed2 | |
108 | ======= |
|
110 | ======= | |
109 | changed1 |
|
111 | changed1 | |
110 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... |
|
112 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... | |
111 |
|
113 | |||
112 |
|
114 | |||
113 | Interactive merge: |
|
115 | Interactive merge: | |
114 |
|
116 | |||
115 | $ hg co -C |
|
117 | $ hg co -C | |
116 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
118 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
117 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
119 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
118 | 1 other heads for branch "default" |
|
120 | 1 other heads for branch "default" | |
119 |
|
121 | |||
120 | $ hg merge --config ui.interactive=true <<EOF |
|
122 | $ hg merge --config ui.interactive=true <<EOF | |
121 | > c |
|
123 | > c | |
122 | > d |
|
124 | > d | |
123 | > EOF |
|
125 | > EOF | |
124 | local [working copy] changed file1 which other [merge rev] deleted |
|
126 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
127 | What do you want to do? | |||
125 |
|
|
128 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
126 | other [merge rev] changed file2 which local [working copy] deleted |
|
129 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
130 | What do you want to do? | |||
127 |
|
|
131 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d | |
128 | merging file3 |
|
132 | merging file3 | |
129 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
133 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
130 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved |
|
134 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved | |
131 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
135 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
132 | [1] |
|
136 | [1] | |
133 |
|
137 | |||
134 | $ status |
|
138 | $ status | |
135 | --- status --- |
|
139 | --- status --- | |
136 | file2: * (glob) |
|
140 | file2: * (glob) | |
137 | M file3 |
|
141 | M file3 | |
138 | C file1 |
|
142 | C file1 | |
139 | --- resolve --list --- |
|
143 | --- resolve --list --- | |
140 | R file1 |
|
144 | R file1 | |
141 | R file2 |
|
145 | R file2 | |
142 | U file3 |
|
146 | U file3 | |
143 | --- debugmergestate --- |
|
147 | --- debugmergestate --- | |
144 | * version 2 records |
|
148 | * version 2 records | |
145 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
149 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
146 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
150 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
147 | labels: |
|
151 | labels: | |
148 | local: working copy |
|
152 | local: working copy | |
149 | other: merge rev |
|
153 | other: merge rev | |
150 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
154 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
151 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
155 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
152 | local path: file1 (flags "") |
|
156 | local path: file1 (flags "") | |
153 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
157 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
154 | other path: file1 (node null) |
|
158 | other path: file1 (node null) | |
155 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
159 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
156 | file: file2 (record type "C", state "r", hash null) |
|
160 | file: file2 (record type "C", state "r", hash null) | |
157 | local path: file2 (flags "") |
|
161 | local path: file2 (flags "") | |
158 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
162 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
159 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
163 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
160 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
164 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
161 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
165 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
162 | local path: file3 (flags "") |
|
166 | local path: file3 (flags "") | |
163 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
167 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
164 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
168 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
165 | --- file1 --- |
|
169 | --- file1 --- | |
166 | 1 |
|
170 | 1 | |
167 | changed |
|
171 | changed | |
168 | *** file2 does not exist |
|
172 | *** file2 does not exist | |
169 | --- file3 --- |
|
173 | --- file3 --- | |
170 | 3 |
|
174 | 3 | |
171 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... |
|
175 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... | |
172 | changed2 |
|
176 | changed2 | |
173 | ======= |
|
177 | ======= | |
174 | changed1 |
|
178 | changed1 | |
175 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... |
|
179 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... | |
176 |
|
180 | |||
177 |
|
181 | |||
178 | Interactive merge with bad input: |
|
182 | Interactive merge with bad input: | |
179 |
|
183 | |||
180 | $ hg co -C |
|
184 | $ hg co -C | |
181 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
185 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
182 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
186 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
183 | 1 other heads for branch "default" |
|
187 | 1 other heads for branch "default" | |
184 |
|
188 | |||
185 | $ hg merge --config ui.interactive=true <<EOF |
|
189 | $ hg merge --config ui.interactive=true <<EOF | |
186 | > foo |
|
190 | > foo | |
187 | > bar |
|
191 | > bar | |
188 | > d |
|
192 | > d | |
189 | > baz |
|
193 | > baz | |
190 | > c |
|
194 | > c | |
191 | > EOF |
|
195 | > EOF | |
192 | local [working copy] changed file1 which other [merge rev] deleted |
|
196 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
197 | What do you want to do? | |||
193 |
|
|
198 | use (c)hanged version, (d)elete, or leave (u)nresolved? foo | |
194 | unrecognized response |
|
199 | unrecognized response | |
195 | local [working copy] changed file1 which other [merge rev] deleted |
|
200 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
201 | What do you want to do? | |||
196 |
|
|
202 | use (c)hanged version, (d)elete, or leave (u)nresolved? bar | |
197 | unrecognized response |
|
203 | unrecognized response | |
198 | local [working copy] changed file1 which other [merge rev] deleted |
|
204 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
205 | What do you want to do? | |||
199 |
|
|
206 | use (c)hanged version, (d)elete, or leave (u)nresolved? d | |
200 | other [merge rev] changed file2 which local [working copy] deleted |
|
207 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
208 | What do you want to do? | |||
201 |
|
|
209 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz | |
202 | unrecognized response |
|
210 | unrecognized response | |
203 | other [merge rev] changed file2 which local [working copy] deleted |
|
211 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
212 | What do you want to do? | |||
204 |
|
|
213 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
205 | merging file3 |
|
214 | merging file3 | |
206 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
215 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
207 | 0 files updated, 1 files merged, 1 files removed, 1 files unresolved |
|
216 | 0 files updated, 1 files merged, 1 files removed, 1 files unresolved | |
208 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
217 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
209 | [1] |
|
218 | [1] | |
210 |
|
219 | |||
211 | $ status |
|
220 | $ status | |
212 | --- status --- |
|
221 | --- status --- | |
213 | M file2 |
|
222 | M file2 | |
214 | M file3 |
|
223 | M file3 | |
215 | R file1 |
|
224 | R file1 | |
216 | --- resolve --list --- |
|
225 | --- resolve --list --- | |
217 | R file1 |
|
226 | R file1 | |
218 | R file2 |
|
227 | R file2 | |
219 | U file3 |
|
228 | U file3 | |
220 | --- debugmergestate --- |
|
229 | --- debugmergestate --- | |
221 | * version 2 records |
|
230 | * version 2 records | |
222 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
231 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
223 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
232 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
224 | labels: |
|
233 | labels: | |
225 | local: working copy |
|
234 | local: working copy | |
226 | other: merge rev |
|
235 | other: merge rev | |
227 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
236 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
228 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
237 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
229 | local path: file1 (flags "") |
|
238 | local path: file1 (flags "") | |
230 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
239 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
231 | other path: file1 (node null) |
|
240 | other path: file1 (node null) | |
232 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
241 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
233 | file: file2 (record type "C", state "r", hash null) |
|
242 | file: file2 (record type "C", state "r", hash null) | |
234 | local path: file2 (flags "") |
|
243 | local path: file2 (flags "") | |
235 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
244 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
236 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
245 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
237 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
246 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
238 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
247 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
239 | local path: file3 (flags "") |
|
248 | local path: file3 (flags "") | |
240 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
249 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
241 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
250 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
242 | *** file1 does not exist |
|
251 | *** file1 does not exist | |
243 | --- file2 --- |
|
252 | --- file2 --- | |
244 | 2 |
|
253 | 2 | |
245 | changed |
|
254 | changed | |
246 | --- file3 --- |
|
255 | --- file3 --- | |
247 | 3 |
|
256 | 3 | |
248 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... |
|
257 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... | |
249 | changed2 |
|
258 | changed2 | |
250 | ======= |
|
259 | ======= | |
251 | changed1 |
|
260 | changed1 | |
252 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... |
|
261 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... | |
253 |
|
262 | |||
254 |
|
263 | |||
255 | Interactive merge with not enough input: |
|
264 | Interactive merge with not enough input: | |
256 |
|
265 | |||
257 | $ hg co -C |
|
266 | $ hg co -C | |
258 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
267 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
259 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
268 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
260 | 1 other heads for branch "default" |
|
269 | 1 other heads for branch "default" | |
261 |
|
270 | |||
262 | $ hg merge --config ui.interactive=true <<EOF |
|
271 | $ hg merge --config ui.interactive=true <<EOF | |
263 | > d |
|
272 | > d | |
264 | > EOF |
|
273 | > EOF | |
265 | local [working copy] changed file1 which other [merge rev] deleted |
|
274 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
275 | What do you want to do? | |||
266 |
|
|
276 | use (c)hanged version, (d)elete, or leave (u)nresolved? d | |
267 | other [merge rev] changed file2 which local [working copy] deleted |
|
277 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
278 | What do you want to do? | |||
268 |
|
|
279 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
269 | merging file3 |
|
280 | merging file3 | |
270 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
281 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
271 | 0 files updated, 0 files merged, 1 files removed, 2 files unresolved |
|
282 | 0 files updated, 0 files merged, 1 files removed, 2 files unresolved | |
272 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
283 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
273 | [1] |
|
284 | [1] | |
274 |
|
285 | |||
275 | $ status |
|
286 | $ status | |
276 | --- status --- |
|
287 | --- status --- | |
277 | M file2 |
|
288 | M file2 | |
278 | M file3 |
|
289 | M file3 | |
279 | R file1 |
|
290 | R file1 | |
280 | --- resolve --list --- |
|
291 | --- resolve --list --- | |
281 | R file1 |
|
292 | R file1 | |
282 | U file2 |
|
293 | U file2 | |
283 | U file3 |
|
294 | U file3 | |
284 | --- debugmergestate --- |
|
295 | --- debugmergestate --- | |
285 | * version 2 records |
|
296 | * version 2 records | |
286 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
297 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
287 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
298 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
288 | labels: |
|
299 | labels: | |
289 | local: working copy |
|
300 | local: working copy | |
290 | other: merge rev |
|
301 | other: merge rev | |
291 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
302 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
292 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
303 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
293 | local path: file1 (flags "") |
|
304 | local path: file1 (flags "") | |
294 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
305 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
295 | other path: file1 (node null) |
|
306 | other path: file1 (node null) | |
296 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
307 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
297 | file: file2 (record type "C", state "u", hash null) |
|
308 | file: file2 (record type "C", state "u", hash null) | |
298 | local path: file2 (flags "") |
|
309 | local path: file2 (flags "") | |
299 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
310 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
300 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
311 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
301 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
312 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
302 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
313 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
303 | local path: file3 (flags "") |
|
314 | local path: file3 (flags "") | |
304 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
315 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
305 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
316 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
306 | *** file1 does not exist |
|
317 | *** file1 does not exist | |
307 | --- file2 --- |
|
318 | --- file2 --- | |
308 | 2 |
|
319 | 2 | |
309 | changed |
|
320 | changed | |
310 | --- file3 --- |
|
321 | --- file3 --- | |
311 | 3 |
|
322 | 3 | |
312 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... |
|
323 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... | |
313 | changed2 |
|
324 | changed2 | |
314 | ======= |
|
325 | ======= | |
315 | changed1 |
|
326 | changed1 | |
316 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... |
|
327 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... | |
317 |
|
328 | |||
318 | Choose local versions of files |
|
329 | Choose local versions of files | |
319 |
|
330 | |||
320 | $ hg co -C |
|
331 | $ hg co -C | |
321 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
332 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
322 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
333 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
323 | 1 other heads for branch "default" |
|
334 | 1 other heads for branch "default" | |
324 |
|
335 | |||
325 | $ hg merge --tool :local |
|
336 | $ hg merge --tool :local | |
326 | 0 files updated, 3 files merged, 0 files removed, 0 files unresolved |
|
337 | 0 files updated, 3 files merged, 0 files removed, 0 files unresolved | |
327 | (branch merge, don't forget to commit) |
|
338 | (branch merge, don't forget to commit) | |
328 | $ status 2>&1 | tee $TESTTMP/local.status |
|
339 | $ status 2>&1 | tee $TESTTMP/local.status | |
329 | --- status --- |
|
340 | --- status --- | |
330 | file2: * (glob) |
|
341 | file2: * (glob) | |
331 | M file3 |
|
342 | M file3 | |
332 | C file1 |
|
343 | C file1 | |
333 | --- resolve --list --- |
|
344 | --- resolve --list --- | |
334 | R file1 |
|
345 | R file1 | |
335 | R file2 |
|
346 | R file2 | |
336 | R file3 |
|
347 | R file3 | |
337 | --- debugmergestate --- |
|
348 | --- debugmergestate --- | |
338 | * version 2 records |
|
349 | * version 2 records | |
339 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
350 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
340 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
351 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
341 | labels: |
|
352 | labels: | |
342 | local: working copy |
|
353 | local: working copy | |
343 | other: merge rev |
|
354 | other: merge rev | |
344 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
355 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
345 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
356 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
346 | local path: file1 (flags "") |
|
357 | local path: file1 (flags "") | |
347 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
358 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
348 | other path: file1 (node null) |
|
359 | other path: file1 (node null) | |
349 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
360 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
350 | file: file2 (record type "C", state "r", hash null) |
|
361 | file: file2 (record type "C", state "r", hash null) | |
351 | local path: file2 (flags "") |
|
362 | local path: file2 (flags "") | |
352 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
363 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
353 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
364 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
354 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
365 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
355 | file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
366 | file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
356 | local path: file3 (flags "") |
|
367 | local path: file3 (flags "") | |
357 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
368 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
358 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
369 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
359 | --- file1 --- |
|
370 | --- file1 --- | |
360 | 1 |
|
371 | 1 | |
361 | changed |
|
372 | changed | |
362 | *** file2 does not exist |
|
373 | *** file2 does not exist | |
363 | --- file3 --- |
|
374 | --- file3 --- | |
364 | 3 |
|
375 | 3 | |
365 | changed2 |
|
376 | changed2 | |
366 |
|
377 | |||
367 | Choose other versions of files |
|
378 | Choose other versions of files | |
368 |
|
379 | |||
369 | $ hg co -C |
|
380 | $ hg co -C | |
370 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
381 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
371 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
382 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
372 | 1 other heads for branch "default" |
|
383 | 1 other heads for branch "default" | |
373 |
|
384 | |||
374 | $ hg merge --tool :other |
|
385 | $ hg merge --tool :other | |
375 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
386 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
376 | (branch merge, don't forget to commit) |
|
387 | (branch merge, don't forget to commit) | |
377 | $ status 2>&1 | tee $TESTTMP/other.status |
|
388 | $ status 2>&1 | tee $TESTTMP/other.status | |
378 | --- status --- |
|
389 | --- status --- | |
379 | M file2 |
|
390 | M file2 | |
380 | M file3 |
|
391 | M file3 | |
381 | R file1 |
|
392 | R file1 | |
382 | --- resolve --list --- |
|
393 | --- resolve --list --- | |
383 | R file1 |
|
394 | R file1 | |
384 | R file2 |
|
395 | R file2 | |
385 | R file3 |
|
396 | R file3 | |
386 | --- debugmergestate --- |
|
397 | --- debugmergestate --- | |
387 | * version 2 records |
|
398 | * version 2 records | |
388 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
399 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
389 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
400 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
390 | labels: |
|
401 | labels: | |
391 | local: working copy |
|
402 | local: working copy | |
392 | other: merge rev |
|
403 | other: merge rev | |
393 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
404 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
394 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
405 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
395 | local path: file1 (flags "") |
|
406 | local path: file1 (flags "") | |
396 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
407 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
397 | other path: file1 (node null) |
|
408 | other path: file1 (node null) | |
398 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
409 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
399 | file: file2 (record type "C", state "r", hash null) |
|
410 | file: file2 (record type "C", state "r", hash null) | |
400 | local path: file2 (flags "") |
|
411 | local path: file2 (flags "") | |
401 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
412 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
402 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
413 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
403 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
414 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
404 | file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
415 | file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
405 | local path: file3 (flags "") |
|
416 | local path: file3 (flags "") | |
406 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
417 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
407 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
418 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
408 | *** file1 does not exist |
|
419 | *** file1 does not exist | |
409 | --- file2 --- |
|
420 | --- file2 --- | |
410 | 2 |
|
421 | 2 | |
411 | changed |
|
422 | changed | |
412 | --- file3 --- |
|
423 | --- file3 --- | |
413 | 3 |
|
424 | 3 | |
414 | changed1 |
|
425 | changed1 | |
415 |
|
426 | |||
416 | Fail |
|
427 | Fail | |
417 |
|
428 | |||
418 | $ hg co -C |
|
429 | $ hg co -C | |
419 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
430 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
420 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
431 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
421 | 1 other heads for branch "default" |
|
432 | 1 other heads for branch "default" | |
422 |
|
433 | |||
423 | $ hg merge --tool :fail |
|
434 | $ hg merge --tool :fail | |
424 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
|
435 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | |
425 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
436 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
426 | [1] |
|
437 | [1] | |
427 | $ status 2>&1 | tee $TESTTMP/fail.status |
|
438 | $ status 2>&1 | tee $TESTTMP/fail.status | |
428 | --- status --- |
|
439 | --- status --- | |
429 | M file2 |
|
440 | M file2 | |
430 | M file3 |
|
441 | M file3 | |
431 | C file1 |
|
442 | C file1 | |
432 | --- resolve --list --- |
|
443 | --- resolve --list --- | |
433 | U file1 |
|
444 | U file1 | |
434 | U file2 |
|
445 | U file2 | |
435 | U file3 |
|
446 | U file3 | |
436 | --- debugmergestate --- |
|
447 | --- debugmergestate --- | |
437 | * version 2 records |
|
448 | * version 2 records | |
438 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
449 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
439 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
450 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
440 | labels: |
|
451 | labels: | |
441 | local: working copy |
|
452 | local: working copy | |
442 | other: merge rev |
|
453 | other: merge rev | |
443 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
454 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
444 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
455 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
445 | local path: file1 (flags "") |
|
456 | local path: file1 (flags "") | |
446 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
457 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
447 | other path: file1 (node null) |
|
458 | other path: file1 (node null) | |
448 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
459 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
449 | file: file2 (record type "C", state "u", hash null) |
|
460 | file: file2 (record type "C", state "u", hash null) | |
450 | local path: file2 (flags "") |
|
461 | local path: file2 (flags "") | |
451 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
462 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
452 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
463 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
453 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
464 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
454 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
465 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
455 | local path: file3 (flags "") |
|
466 | local path: file3 (flags "") | |
456 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
467 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
457 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
468 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
458 | --- file1 --- |
|
469 | --- file1 --- | |
459 | 1 |
|
470 | 1 | |
460 | changed |
|
471 | changed | |
461 | --- file2 --- |
|
472 | --- file2 --- | |
462 | 2 |
|
473 | 2 | |
463 | changed |
|
474 | changed | |
464 | --- file3 --- |
|
475 | --- file3 --- | |
465 | 3 |
|
476 | 3 | |
466 | changed2 |
|
477 | changed2 | |
467 |
|
478 | |||
468 | Force prompts with no input (should be similar to :fail) |
|
479 | Force prompts with no input (should be similar to :fail) | |
469 |
|
480 | |||
470 | $ hg co -C |
|
481 | $ hg co -C | |
471 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
482 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
472 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
483 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
473 | 1 other heads for branch "default" |
|
484 | 1 other heads for branch "default" | |
474 |
|
485 | |||
475 | $ hg merge --config ui.interactive=True --tool :prompt |
|
486 | $ hg merge --config ui.interactive=True --tool :prompt | |
476 | local [working copy] changed file1 which other [merge rev] deleted |
|
487 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
488 | What do you want to do? | |||
477 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
489 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
478 | other [merge rev] changed file2 which local [working copy] deleted |
|
490 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
491 | What do you want to do? | |||
479 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
492 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
480 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
|
493 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | |
481 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
|
494 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | |
482 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
495 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
483 | [1] |
|
496 | [1] | |
484 | $ status 2>&1 | tee $TESTTMP/prompt.status |
|
497 | $ status 2>&1 | tee $TESTTMP/prompt.status | |
485 | --- status --- |
|
498 | --- status --- | |
486 | M file2 |
|
499 | M file2 | |
487 | M file3 |
|
500 | M file3 | |
488 | C file1 |
|
501 | C file1 | |
489 | --- resolve --list --- |
|
502 | --- resolve --list --- | |
490 | U file1 |
|
503 | U file1 | |
491 | U file2 |
|
504 | U file2 | |
492 | U file3 |
|
505 | U file3 | |
493 | --- debugmergestate --- |
|
506 | --- debugmergestate --- | |
494 | * version 2 records |
|
507 | * version 2 records | |
495 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
508 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
496 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
509 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
497 | labels: |
|
510 | labels: | |
498 | local: working copy |
|
511 | local: working copy | |
499 | other: merge rev |
|
512 | other: merge rev | |
500 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
513 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
501 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
514 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
502 | local path: file1 (flags "") |
|
515 | local path: file1 (flags "") | |
503 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
516 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
504 | other path: file1 (node null) |
|
517 | other path: file1 (node null) | |
505 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
518 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
506 | file: file2 (record type "C", state "u", hash null) |
|
519 | file: file2 (record type "C", state "u", hash null) | |
507 | local path: file2 (flags "") |
|
520 | local path: file2 (flags "") | |
508 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
521 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
509 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
522 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
510 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
523 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
511 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
524 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
512 | local path: file3 (flags "") |
|
525 | local path: file3 (flags "") | |
513 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
526 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
514 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
527 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
515 | --- file1 --- |
|
528 | --- file1 --- | |
516 | 1 |
|
529 | 1 | |
517 | changed |
|
530 | changed | |
518 | --- file2 --- |
|
531 | --- file2 --- | |
519 | 2 |
|
532 | 2 | |
520 | changed |
|
533 | changed | |
521 | --- file3 --- |
|
534 | --- file3 --- | |
522 | 3 |
|
535 | 3 | |
523 | changed2 |
|
536 | changed2 | |
524 | $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status |
|
537 | $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status | |
525 |
|
538 | |||
526 |
|
539 | |||
527 | Force prompts |
|
540 | Force prompts | |
528 |
|
541 | |||
529 | $ hg co -C |
|
542 | $ hg co -C | |
530 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
543 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
531 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
544 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
532 | 1 other heads for branch "default" |
|
545 | 1 other heads for branch "default" | |
533 |
|
546 | |||
534 | $ hg merge --tool :prompt |
|
547 | $ hg merge --tool :prompt | |
535 | local [working copy] changed file1 which other [merge rev] deleted |
|
548 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
549 | What do you want to do? | |||
536 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
550 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
537 | other [merge rev] changed file2 which local [working copy] deleted |
|
551 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
552 | What do you want to do? | |||
538 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
553 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
539 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u |
|
554 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u | |
540 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
|
555 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | |
541 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
556 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
542 | [1] |
|
557 | [1] | |
543 | $ status |
|
558 | $ status | |
544 | --- status --- |
|
559 | --- status --- | |
545 | M file2 |
|
560 | M file2 | |
546 | M file3 |
|
561 | M file3 | |
547 | C file1 |
|
562 | C file1 | |
548 | --- resolve --list --- |
|
563 | --- resolve --list --- | |
549 | U file1 |
|
564 | U file1 | |
550 | U file2 |
|
565 | U file2 | |
551 | U file3 |
|
566 | U file3 | |
552 | --- debugmergestate --- |
|
567 | --- debugmergestate --- | |
553 | * version 2 records |
|
568 | * version 2 records | |
554 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
569 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
555 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
570 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
556 | labels: |
|
571 | labels: | |
557 | local: working copy |
|
572 | local: working copy | |
558 | other: merge rev |
|
573 | other: merge rev | |
559 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
574 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
560 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
575 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
561 | local path: file1 (flags "") |
|
576 | local path: file1 (flags "") | |
562 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
577 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
563 | other path: file1 (node null) |
|
578 | other path: file1 (node null) | |
564 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
579 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
565 | file: file2 (record type "C", state "u", hash null) |
|
580 | file: file2 (record type "C", state "u", hash null) | |
566 | local path: file2 (flags "") |
|
581 | local path: file2 (flags "") | |
567 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
582 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
568 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
583 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
569 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
584 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
570 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
585 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
571 | local path: file3 (flags "") |
|
586 | local path: file3 (flags "") | |
572 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
587 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
573 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
588 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
574 | --- file1 --- |
|
589 | --- file1 --- | |
575 | 1 |
|
590 | 1 | |
576 | changed |
|
591 | changed | |
577 | --- file2 --- |
|
592 | --- file2 --- | |
578 | 2 |
|
593 | 2 | |
579 | changed |
|
594 | changed | |
580 | --- file3 --- |
|
595 | --- file3 --- | |
581 | 3 |
|
596 | 3 | |
582 | changed2 |
|
597 | changed2 | |
583 |
|
598 | |||
584 | Choose to merge all files |
|
599 | Choose to merge all files | |
585 |
|
600 | |||
586 | $ hg co -C |
|
601 | $ hg co -C | |
587 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
602 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
588 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
|
603 | updated to "13910f48cf7b: changed file1, removed file2, changed file3" | |
589 | 1 other heads for branch "default" |
|
604 | 1 other heads for branch "default" | |
590 |
|
605 | |||
591 | $ hg merge --tool :merge3 |
|
606 | $ hg merge --tool :merge3 | |
592 | local [working copy] changed file1 which other [merge rev] deleted |
|
607 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
608 | What do you want to do? | |||
593 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
609 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
594 | other [merge rev] changed file2 which local [working copy] deleted |
|
610 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
611 | What do you want to do? | |||
595 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
612 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
596 | merging file3 |
|
613 | merging file3 | |
597 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
614 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
598 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
|
615 | 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | |
599 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
616 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
600 | [1] |
|
617 | [1] | |
601 | $ status |
|
618 | $ status | |
602 | --- status --- |
|
619 | --- status --- | |
603 | M file2 |
|
620 | M file2 | |
604 | M file3 |
|
621 | M file3 | |
605 | C file1 |
|
622 | C file1 | |
606 | --- resolve --list --- |
|
623 | --- resolve --list --- | |
607 | U file1 |
|
624 | U file1 | |
608 | U file2 |
|
625 | U file2 | |
609 | U file3 |
|
626 | U file3 | |
610 | --- debugmergestate --- |
|
627 | --- debugmergestate --- | |
611 | * version 2 records |
|
628 | * version 2 records | |
612 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 |
|
629 | local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4 | |
613 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
630 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
614 | labels: |
|
631 | labels: | |
615 | local: working copy |
|
632 | local: working copy | |
616 | other: merge rev |
|
633 | other: merge rev | |
617 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
634 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
618 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
635 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
619 | local path: file1 (flags "") |
|
636 | local path: file1 (flags "") | |
620 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
637 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
621 | other path: file1 (node null) |
|
638 | other path: file1 (node null) | |
622 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
639 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
623 | file: file2 (record type "C", state "u", hash null) |
|
640 | file: file2 (record type "C", state "u", hash null) | |
624 | local path: file2 (flags "") |
|
641 | local path: file2 (flags "") | |
625 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
642 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
626 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
643 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
627 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
644 | file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
628 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) |
|
645 | file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11) | |
629 | local path: file3 (flags "") |
|
646 | local path: file3 (flags "") | |
630 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) |
|
647 | ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4) | |
631 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) |
|
648 | other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb) | |
632 | --- file1 --- |
|
649 | --- file1 --- | |
633 | 1 |
|
650 | 1 | |
634 | changed |
|
651 | changed | |
635 | --- file2 --- |
|
652 | --- file2 --- | |
636 | 2 |
|
653 | 2 | |
637 | changed |
|
654 | changed | |
638 | --- file3 --- |
|
655 | --- file3 --- | |
639 | 3 |
|
656 | 3 | |
640 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... |
|
657 | <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan... | |
641 | changed2 |
|
658 | changed2 | |
642 | ||||||| base |
|
659 | ||||||| base | |
643 | ======= |
|
660 | ======= | |
644 | changed1 |
|
661 | changed1 | |
645 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... |
|
662 | >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan... | |
646 |
|
663 | |||
647 | Exercise transitions between local, other, fail and prompt, and make sure the |
|
664 | Exercise transitions between local, other, fail and prompt, and make sure the | |
648 | dirstate stays consistent. (Compare with each other and to the above |
|
665 | dirstate stays consistent. (Compare with each other and to the above | |
649 | invocations.) |
|
666 | invocations.) | |
650 |
|
667 | |||
651 | $ testtransitions() { |
|
668 | $ testtransitions() { | |
652 | > # this traversal order covers every transition |
|
669 | > # this traversal order covers every transition | |
653 | > tools="local other prompt local fail other local prompt other fail prompt fail local" |
|
670 | > tools="local other prompt local fail other local prompt other fail prompt fail local" | |
654 | > lasttool="merge3" |
|
671 | > lasttool="merge3" | |
655 | > for tool in $tools; do |
|
672 | > for tool in $tools; do | |
656 | > echo "=== :$lasttool -> :$tool ===" |
|
673 | > echo "=== :$lasttool -> :$tool ===" | |
657 | > ref="$TESTTMP/$tool.status" |
|
674 | > ref="$TESTTMP/$tool.status" | |
658 | > hg resolve --unmark --all |
|
675 | > hg resolve --unmark --all | |
659 | > hg resolve --tool ":$tool" --all --config ui.interactive=True |
|
676 | > hg resolve --tool ":$tool" --all --config ui.interactive=True | |
660 | > status > "$TESTTMP/compare.status" 2>&1 |
|
677 | > status > "$TESTTMP/compare.status" 2>&1 | |
661 | > echo '--- diff of status ---' |
|
678 | > echo '--- diff of status ---' | |
662 | > if cmp "$TESTTMP/$tool.status" "$TESTTMP/compare.status" || diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then |
|
679 | > if cmp "$TESTTMP/$tool.status" "$TESTTMP/compare.status" || diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then | |
663 | > echo '(status identical)' |
|
680 | > echo '(status identical)' | |
664 | > fi |
|
681 | > fi | |
665 | > lasttool="$tool" |
|
682 | > lasttool="$tool" | |
666 | > echo |
|
683 | > echo | |
667 | > done |
|
684 | > done | |
668 | > } |
|
685 | > } | |
669 |
|
686 | |||
670 | $ testtransitions |
|
687 | $ testtransitions | |
671 | === :merge3 -> :local === |
|
688 | === :merge3 -> :local === | |
672 | (no more unresolved files) |
|
689 | (no more unresolved files) | |
673 | --- diff of status --- |
|
690 | --- diff of status --- | |
674 | (status identical) |
|
691 | (status identical) | |
675 |
|
692 | |||
676 | === :local -> :other === |
|
693 | === :local -> :other === | |
677 | (no more unresolved files) |
|
694 | (no more unresolved files) | |
678 | --- diff of status --- |
|
695 | --- diff of status --- | |
679 | (status identical) |
|
696 | (status identical) | |
680 |
|
697 | |||
681 | === :other -> :prompt === |
|
698 | === :other -> :prompt === | |
682 | local [working copy] changed file1 which other [merge rev] deleted |
|
699 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
700 | What do you want to do? | |||
683 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
701 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
684 | other [merge rev] changed file2 which local [working copy] deleted |
|
702 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
703 | What do you want to do? | |||
685 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
704 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
686 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
|
705 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | |
687 | --- diff of status --- |
|
706 | --- diff of status --- | |
688 | (status identical) |
|
707 | (status identical) | |
689 |
|
708 | |||
690 | === :prompt -> :local === |
|
709 | === :prompt -> :local === | |
691 | (no more unresolved files) |
|
710 | (no more unresolved files) | |
692 | --- diff of status --- |
|
711 | --- diff of status --- | |
693 | (status identical) |
|
712 | (status identical) | |
694 |
|
713 | |||
695 | === :local -> :fail === |
|
714 | === :local -> :fail === | |
696 | --- diff of status --- |
|
715 | --- diff of status --- | |
697 | (status identical) |
|
716 | (status identical) | |
698 |
|
717 | |||
699 | === :fail -> :other === |
|
718 | === :fail -> :other === | |
700 | (no more unresolved files) |
|
719 | (no more unresolved files) | |
701 | --- diff of status --- |
|
720 | --- diff of status --- | |
702 | (status identical) |
|
721 | (status identical) | |
703 |
|
722 | |||
704 | === :other -> :local === |
|
723 | === :other -> :local === | |
705 | (no more unresolved files) |
|
724 | (no more unresolved files) | |
706 | --- diff of status --- |
|
725 | --- diff of status --- | |
707 | (status identical) |
|
726 | (status identical) | |
708 |
|
727 | |||
709 | === :local -> :prompt === |
|
728 | === :local -> :prompt === | |
710 | local [working copy] changed file1 which other [merge rev] deleted |
|
729 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
730 | What do you want to do? | |||
711 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
731 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
712 | other [merge rev] changed file2 which local [working copy] deleted |
|
732 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
733 | What do you want to do? | |||
713 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
734 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
714 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
|
735 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | |
715 | --- diff of status --- |
|
736 | --- diff of status --- | |
716 | (status identical) |
|
737 | (status identical) | |
717 |
|
738 | |||
718 | === :prompt -> :other === |
|
739 | === :prompt -> :other === | |
719 | (no more unresolved files) |
|
740 | (no more unresolved files) | |
720 | --- diff of status --- |
|
741 | --- diff of status --- | |
721 | (status identical) |
|
742 | (status identical) | |
722 |
|
743 | |||
723 | === :other -> :fail === |
|
744 | === :other -> :fail === | |
724 | --- diff of status --- |
|
745 | --- diff of status --- | |
725 | (status identical) |
|
746 | (status identical) | |
726 |
|
747 | |||
727 | === :fail -> :prompt === |
|
748 | === :fail -> :prompt === | |
728 | local [working copy] changed file1 which other [merge rev] deleted |
|
749 | file file1 was deleted in local [working copy] but was modified in other [merge rev]. | |
|
750 | What do you want to do? | |||
729 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
751 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
730 | other [merge rev] changed file2 which local [working copy] deleted |
|
752 | file file2 was deleted in other [merge rev] but was modified in local [working copy]. | |
|
753 | What do you want to do? | |||
731 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
754 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
732 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
|
755 | keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | |
733 | --- diff of status --- |
|
756 | --- diff of status --- | |
734 | (status identical) |
|
757 | (status identical) | |
735 |
|
758 | |||
736 | === :prompt -> :fail === |
|
759 | === :prompt -> :fail === | |
737 | --- diff of status --- |
|
760 | --- diff of status --- | |
738 | (status identical) |
|
761 | (status identical) | |
739 |
|
762 | |||
740 | === :fail -> :local === |
|
763 | === :fail -> :local === | |
741 | (no more unresolved files) |
|
764 | (no more unresolved files) | |
742 | --- diff of status --- |
|
765 | --- diff of status --- | |
743 | (status identical) |
|
766 | (status identical) | |
744 |
|
767 | |||
745 |
|
768 | |||
746 |
|
769 | |||
747 | Non-interactive linear update |
|
770 | Non-interactive linear update | |
748 |
|
771 | |||
749 | $ hg co -C 0 |
|
772 | $ hg co -C 0 | |
750 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
773 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
751 | $ echo changed >> file1 |
|
774 | $ echo changed >> file1 | |
752 | $ hg rm file2 |
|
775 | $ hg rm file2 | |
753 | $ hg update 1 -y |
|
776 | $ hg update 1 -y | |
754 |
local [working copy] |
|
777 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
778 | What do you want to do? | |||
755 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
779 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
756 |
other [destination] |
|
780 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
781 | What do you want to do? | |||
757 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
782 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
758 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
783 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
759 | use 'hg resolve' to retry unresolved file merges |
|
784 | use 'hg resolve' to retry unresolved file merges | |
760 | [1] |
|
785 | [1] | |
761 | $ status |
|
786 | $ status | |
762 | --- status --- |
|
787 | --- status --- | |
763 | A file1 |
|
788 | A file1 | |
764 | C file2 |
|
789 | C file2 | |
765 | C file3 |
|
790 | C file3 | |
766 | --- resolve --list --- |
|
791 | --- resolve --list --- | |
767 | U file1 |
|
792 | U file1 | |
768 | U file2 |
|
793 | U file2 | |
769 | --- debugmergestate --- |
|
794 | --- debugmergestate --- | |
770 | * version 2 records |
|
795 | * version 2 records | |
771 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
796 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
772 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
797 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
773 | labels: |
|
798 | labels: | |
774 | local: working copy |
|
799 | local: working copy | |
775 | other: destination |
|
800 | other: destination | |
776 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
801 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
777 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
802 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
778 | local path: file1 (flags "") |
|
803 | local path: file1 (flags "") | |
779 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
804 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
780 | other path: file1 (node null) |
|
805 | other path: file1 (node null) | |
781 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
806 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
782 | file: file2 (record type "C", state "u", hash null) |
|
807 | file: file2 (record type "C", state "u", hash null) | |
783 | local path: file2 (flags "") |
|
808 | local path: file2 (flags "") | |
784 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
809 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
785 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
810 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
786 | --- file1 --- |
|
811 | --- file1 --- | |
787 | 1 |
|
812 | 1 | |
788 | changed |
|
813 | changed | |
789 | --- file2 --- |
|
814 | --- file2 --- | |
790 | 2 |
|
815 | 2 | |
791 | changed |
|
816 | changed | |
792 | --- file3 --- |
|
817 | --- file3 --- | |
793 | 3 |
|
818 | 3 | |
794 | changed1 |
|
819 | changed1 | |
795 |
|
820 | |||
796 | Choose local versions of files |
|
821 | Choose local versions of files | |
797 |
|
822 | |||
798 | $ hg co -C 0 |
|
823 | $ hg co -C 0 | |
799 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
824 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
800 | $ echo changed >> file1 |
|
825 | $ echo changed >> file1 | |
801 | $ hg rm file2 |
|
826 | $ hg rm file2 | |
802 | $ hg update 1 --tool :local |
|
827 | $ hg update 1 --tool :local | |
803 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
828 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
804 | $ status 2>&1 | tee $TESTTMP/local.status |
|
829 | $ status 2>&1 | tee $TESTTMP/local.status | |
805 | --- status --- |
|
830 | --- status --- | |
806 | file2: * (glob) |
|
831 | file2: * (glob) | |
807 | A file1 |
|
832 | A file1 | |
808 | C file3 |
|
833 | C file3 | |
809 | --- resolve --list --- |
|
834 | --- resolve --list --- | |
810 | R file1 |
|
835 | R file1 | |
811 | R file2 |
|
836 | R file2 | |
812 | --- debugmergestate --- |
|
837 | --- debugmergestate --- | |
813 | * version 2 records |
|
838 | * version 2 records | |
814 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
839 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
815 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
840 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
816 | labels: |
|
841 | labels: | |
817 | local: working copy |
|
842 | local: working copy | |
818 | other: destination |
|
843 | other: destination | |
819 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
844 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
820 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
845 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
821 | local path: file1 (flags "") |
|
846 | local path: file1 (flags "") | |
822 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
847 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
823 | other path: file1 (node null) |
|
848 | other path: file1 (node null) | |
824 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
849 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
825 | file: file2 (record type "C", state "r", hash null) |
|
850 | file: file2 (record type "C", state "r", hash null) | |
826 | local path: file2 (flags "") |
|
851 | local path: file2 (flags "") | |
827 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
852 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
828 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
853 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
829 | --- file1 --- |
|
854 | --- file1 --- | |
830 | 1 |
|
855 | 1 | |
831 | changed |
|
856 | changed | |
832 | *** file2 does not exist |
|
857 | *** file2 does not exist | |
833 | --- file3 --- |
|
858 | --- file3 --- | |
834 | 3 |
|
859 | 3 | |
835 | changed1 |
|
860 | changed1 | |
836 |
|
861 | |||
837 | Choose other versions of files |
|
862 | Choose other versions of files | |
838 |
|
863 | |||
839 | $ hg co -C 0 |
|
864 | $ hg co -C 0 | |
840 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
865 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
841 | $ echo changed >> file1 |
|
866 | $ echo changed >> file1 | |
842 | $ hg rm file2 |
|
867 | $ hg rm file2 | |
843 | $ hg update 1 --tool :other |
|
868 | $ hg update 1 --tool :other | |
844 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
869 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
845 | $ status 2>&1 | tee $TESTTMP/other.status |
|
870 | $ status 2>&1 | tee $TESTTMP/other.status | |
846 | --- status --- |
|
871 | --- status --- | |
847 | file1: * (glob) |
|
872 | file1: * (glob) | |
848 | C file2 |
|
873 | C file2 | |
849 | C file3 |
|
874 | C file3 | |
850 | --- resolve --list --- |
|
875 | --- resolve --list --- | |
851 | R file1 |
|
876 | R file1 | |
852 | R file2 |
|
877 | R file2 | |
853 | --- debugmergestate --- |
|
878 | --- debugmergestate --- | |
854 | * version 2 records |
|
879 | * version 2 records | |
855 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
880 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
856 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
881 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
857 | labels: |
|
882 | labels: | |
858 | local: working copy |
|
883 | local: working copy | |
859 | other: destination |
|
884 | other: destination | |
860 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
885 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
861 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
886 | file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
862 | local path: file1 (flags "") |
|
887 | local path: file1 (flags "") | |
863 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
888 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
864 | other path: file1 (node null) |
|
889 | other path: file1 (node null) | |
865 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
890 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
866 | file: file2 (record type "C", state "r", hash null) |
|
891 | file: file2 (record type "C", state "r", hash null) | |
867 | local path: file2 (flags "") |
|
892 | local path: file2 (flags "") | |
868 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
893 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
869 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
894 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
870 | *** file1 does not exist |
|
895 | *** file1 does not exist | |
871 | --- file2 --- |
|
896 | --- file2 --- | |
872 | 2 |
|
897 | 2 | |
873 | changed |
|
898 | changed | |
874 | --- file3 --- |
|
899 | --- file3 --- | |
875 | 3 |
|
900 | 3 | |
876 | changed1 |
|
901 | changed1 | |
877 |
|
902 | |||
878 | Fail |
|
903 | Fail | |
879 |
|
904 | |||
880 | $ hg co -C 0 |
|
905 | $ hg co -C 0 | |
881 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
906 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
882 | $ echo changed >> file1 |
|
907 | $ echo changed >> file1 | |
883 | $ hg rm file2 |
|
908 | $ hg rm file2 | |
884 | $ hg update 1 --tool :fail |
|
909 | $ hg update 1 --tool :fail | |
885 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
910 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
886 | use 'hg resolve' to retry unresolved file merges |
|
911 | use 'hg resolve' to retry unresolved file merges | |
887 | [1] |
|
912 | [1] | |
888 | $ status 2>&1 | tee $TESTTMP/fail.status |
|
913 | $ status 2>&1 | tee $TESTTMP/fail.status | |
889 | --- status --- |
|
914 | --- status --- | |
890 | A file1 |
|
915 | A file1 | |
891 | C file2 |
|
916 | C file2 | |
892 | C file3 |
|
917 | C file3 | |
893 | --- resolve --list --- |
|
918 | --- resolve --list --- | |
894 | U file1 |
|
919 | U file1 | |
895 | U file2 |
|
920 | U file2 | |
896 | --- debugmergestate --- |
|
921 | --- debugmergestate --- | |
897 | * version 2 records |
|
922 | * version 2 records | |
898 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
923 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
899 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
924 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
900 | labels: |
|
925 | labels: | |
901 | local: working copy |
|
926 | local: working copy | |
902 | other: destination |
|
927 | other: destination | |
903 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
928 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
904 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
929 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
905 | local path: file1 (flags "") |
|
930 | local path: file1 (flags "") | |
906 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
931 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
907 | other path: file1 (node null) |
|
932 | other path: file1 (node null) | |
908 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
933 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
909 | file: file2 (record type "C", state "u", hash null) |
|
934 | file: file2 (record type "C", state "u", hash null) | |
910 | local path: file2 (flags "") |
|
935 | local path: file2 (flags "") | |
911 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
936 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
912 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
937 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
913 | --- file1 --- |
|
938 | --- file1 --- | |
914 | 1 |
|
939 | 1 | |
915 | changed |
|
940 | changed | |
916 | --- file2 --- |
|
941 | --- file2 --- | |
917 | 2 |
|
942 | 2 | |
918 | changed |
|
943 | changed | |
919 | --- file3 --- |
|
944 | --- file3 --- | |
920 | 3 |
|
945 | 3 | |
921 | changed1 |
|
946 | changed1 | |
922 |
|
947 | |||
923 | Force prompts with no input |
|
948 | Force prompts with no input | |
924 |
|
949 | |||
925 | $ hg co -C 0 |
|
950 | $ hg co -C 0 | |
926 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
951 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
927 | $ echo changed >> file1 |
|
952 | $ echo changed >> file1 | |
928 | $ hg rm file2 |
|
953 | $ hg rm file2 | |
929 | $ hg update 1 --config ui.interactive=True --tool :prompt |
|
954 | $ hg update 1 --config ui.interactive=True --tool :prompt | |
930 |
local [working copy] |
|
955 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
956 | What do you want to do? | |||
931 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
957 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
932 |
other [destination] |
|
958 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
959 | What do you want to do? | |||
933 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
960 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
934 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
961 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
935 | use 'hg resolve' to retry unresolved file merges |
|
962 | use 'hg resolve' to retry unresolved file merges | |
936 | [1] |
|
963 | [1] | |
937 | $ status 2>&1 | tee $TESTTMP/prompt.status |
|
964 | $ status 2>&1 | tee $TESTTMP/prompt.status | |
938 | --- status --- |
|
965 | --- status --- | |
939 | A file1 |
|
966 | A file1 | |
940 | C file2 |
|
967 | C file2 | |
941 | C file3 |
|
968 | C file3 | |
942 | --- resolve --list --- |
|
969 | --- resolve --list --- | |
943 | U file1 |
|
970 | U file1 | |
944 | U file2 |
|
971 | U file2 | |
945 | --- debugmergestate --- |
|
972 | --- debugmergestate --- | |
946 | * version 2 records |
|
973 | * version 2 records | |
947 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
974 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
948 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
975 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
949 | labels: |
|
976 | labels: | |
950 | local: working copy |
|
977 | local: working copy | |
951 | other: destination |
|
978 | other: destination | |
952 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
979 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
953 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
980 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
954 | local path: file1 (flags "") |
|
981 | local path: file1 (flags "") | |
955 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
982 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
956 | other path: file1 (node null) |
|
983 | other path: file1 (node null) | |
957 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
984 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
958 | file: file2 (record type "C", state "u", hash null) |
|
985 | file: file2 (record type "C", state "u", hash null) | |
959 | local path: file2 (flags "") |
|
986 | local path: file2 (flags "") | |
960 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
987 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
961 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
988 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
962 | --- file1 --- |
|
989 | --- file1 --- | |
963 | 1 |
|
990 | 1 | |
964 | changed |
|
991 | changed | |
965 | --- file2 --- |
|
992 | --- file2 --- | |
966 | 2 |
|
993 | 2 | |
967 | changed |
|
994 | changed | |
968 | --- file3 --- |
|
995 | --- file3 --- | |
969 | 3 |
|
996 | 3 | |
970 | changed1 |
|
997 | changed1 | |
971 | $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status |
|
998 | $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status | |
972 |
|
999 | |||
973 | Choose to merge all files |
|
1000 | Choose to merge all files | |
974 |
|
1001 | |||
975 | $ hg co -C 0 |
|
1002 | $ hg co -C 0 | |
976 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1003 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
977 | $ echo changed >> file1 |
|
1004 | $ echo changed >> file1 | |
978 | $ hg rm file2 |
|
1005 | $ hg rm file2 | |
979 | $ hg update 1 --tool :merge3 |
|
1006 | $ hg update 1 --tool :merge3 | |
980 |
local [working copy] |
|
1007 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
1008 | What do you want to do? | |||
981 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
1009 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
982 |
other [destination] |
|
1010 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
1011 | What do you want to do? | |||
983 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
1012 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
984 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
1013 | 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
985 | use 'hg resolve' to retry unresolved file merges |
|
1014 | use 'hg resolve' to retry unresolved file merges | |
986 | [1] |
|
1015 | [1] | |
987 | $ status |
|
1016 | $ status | |
988 | --- status --- |
|
1017 | --- status --- | |
989 | A file1 |
|
1018 | A file1 | |
990 | C file2 |
|
1019 | C file2 | |
991 | C file3 |
|
1020 | C file3 | |
992 | --- resolve --list --- |
|
1021 | --- resolve --list --- | |
993 | U file1 |
|
1022 | U file1 | |
994 | U file2 |
|
1023 | U file2 | |
995 | --- debugmergestate --- |
|
1024 | --- debugmergestate --- | |
996 | * version 2 records |
|
1025 | * version 2 records | |
997 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff |
|
1026 | local: ab57bf49aa276a22d35a473592d4c34b5abc3eff | |
998 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 |
|
1027 | other: 10f9a0a634e82080907e62f075ab119cbc565ea6 | |
999 | labels: |
|
1028 | labels: | |
1000 | local: working copy |
|
1029 | local: working copy | |
1001 | other: destination |
|
1030 | other: destination | |
1002 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
1031 | file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
1003 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) |
|
1032 | file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390) | |
1004 | local path: file1 (flags "") |
|
1033 | local path: file1 (flags "") | |
1005 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) |
|
1034 | ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be) | |
1006 | other path: file1 (node null) |
|
1035 | other path: file1 (node null) | |
1007 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) |
|
1036 | file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff) | |
1008 | file: file2 (record type "C", state "u", hash null) |
|
1037 | file: file2 (record type "C", state "u", hash null) | |
1009 | local path: file2 (flags "") |
|
1038 | local path: file2 (flags "") | |
1010 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) |
|
1039 | ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e) | |
1011 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) |
|
1040 | other path: file2 (node e7c1328648519852e723de86c0c0525acd779257) | |
1012 | --- file1 --- |
|
1041 | --- file1 --- | |
1013 | 1 |
|
1042 | 1 | |
1014 | changed |
|
1043 | changed | |
1015 | --- file2 --- |
|
1044 | --- file2 --- | |
1016 | 2 |
|
1045 | 2 | |
1017 | changed |
|
1046 | changed | |
1018 | --- file3 --- |
|
1047 | --- file3 --- | |
1019 | 3 |
|
1048 | 3 | |
1020 | changed1 |
|
1049 | changed1 | |
1021 |
|
1050 | |||
1022 | Test transitions between different merge tools |
|
1051 | Test transitions between different merge tools | |
1023 |
|
1052 | |||
1024 | $ testtransitions |
|
1053 | $ testtransitions | |
1025 | === :merge3 -> :local === |
|
1054 | === :merge3 -> :local === | |
1026 | (no more unresolved files) |
|
1055 | (no more unresolved files) | |
1027 | --- diff of status --- |
|
1056 | --- diff of status --- | |
1028 | (status identical) |
|
1057 | (status identical) | |
1029 |
|
1058 | |||
1030 | === :local -> :other === |
|
1059 | === :local -> :other === | |
1031 | (no more unresolved files) |
|
1060 | (no more unresolved files) | |
1032 | --- diff of status --- |
|
1061 | --- diff of status --- | |
1033 | (status identical) |
|
1062 | (status identical) | |
1034 |
|
1063 | |||
1035 | === :other -> :prompt === |
|
1064 | === :other -> :prompt === | |
1036 |
local [working copy] |
|
1065 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
1066 | What do you want to do? | |||
1037 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
1067 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
1038 |
other [destination] |
|
1068 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
1069 | What do you want to do? | |||
1039 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
1070 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
1040 | --- diff of status --- |
|
1071 | --- diff of status --- | |
1041 | (status identical) |
|
1072 | (status identical) | |
1042 |
|
1073 | |||
1043 | === :prompt -> :local === |
|
1074 | === :prompt -> :local === | |
1044 | (no more unresolved files) |
|
1075 | (no more unresolved files) | |
1045 | --- diff of status --- |
|
1076 | --- diff of status --- | |
1046 | (status identical) |
|
1077 | (status identical) | |
1047 |
|
1078 | |||
1048 | === :local -> :fail === |
|
1079 | === :local -> :fail === | |
1049 | --- diff of status --- |
|
1080 | --- diff of status --- | |
1050 | (status identical) |
|
1081 | (status identical) | |
1051 |
|
1082 | |||
1052 | === :fail -> :other === |
|
1083 | === :fail -> :other === | |
1053 | (no more unresolved files) |
|
1084 | (no more unresolved files) | |
1054 | --- diff of status --- |
|
1085 | --- diff of status --- | |
1055 | (status identical) |
|
1086 | (status identical) | |
1056 |
|
1087 | |||
1057 | === :other -> :local === |
|
1088 | === :other -> :local === | |
1058 | (no more unresolved files) |
|
1089 | (no more unresolved files) | |
1059 | --- diff of status --- |
|
1090 | --- diff of status --- | |
1060 | (status identical) |
|
1091 | (status identical) | |
1061 |
|
1092 | |||
1062 | === :local -> :prompt === |
|
1093 | === :local -> :prompt === | |
1063 |
local [working copy] |
|
1094 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
1095 | What do you want to do? | |||
1064 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
1096 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
1065 |
other [destination] |
|
1097 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
1098 | What do you want to do? | |||
1066 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
1099 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
1067 | --- diff of status --- |
|
1100 | --- diff of status --- | |
1068 | (status identical) |
|
1101 | (status identical) | |
1069 |
|
1102 | |||
1070 | === :prompt -> :other === |
|
1103 | === :prompt -> :other === | |
1071 | (no more unresolved files) |
|
1104 | (no more unresolved files) | |
1072 | --- diff of status --- |
|
1105 | --- diff of status --- | |
1073 | (status identical) |
|
1106 | (status identical) | |
1074 |
|
1107 | |||
1075 | === :other -> :fail === |
|
1108 | === :other -> :fail === | |
1076 | --- diff of status --- |
|
1109 | --- diff of status --- | |
1077 | (status identical) |
|
1110 | (status identical) | |
1078 |
|
1111 | |||
1079 | === :fail -> :prompt === |
|
1112 | === :fail -> :prompt === | |
1080 |
local [working copy] |
|
1113 | file file1 was deleted in local [working copy] but was modified in other [destination]. | |
|
1114 | What do you want to do? | |||
1081 | use (c)hanged version, (d)elete, or leave (u)nresolved? |
|
1115 | use (c)hanged version, (d)elete, or leave (u)nresolved? | |
1082 |
other [destination] |
|
1116 | file file2 was deleted in other [destination] but was modified in local [working copy]. | |
|
1117 | What do you want to do? | |||
1083 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
|
1118 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | |
1084 | --- diff of status --- |
|
1119 | --- diff of status --- | |
1085 | (status identical) |
|
1120 | (status identical) | |
1086 |
|
1121 | |||
1087 | === :prompt -> :fail === |
|
1122 | === :prompt -> :fail === | |
1088 | --- diff of status --- |
|
1123 | --- diff of status --- | |
1089 | (status identical) |
|
1124 | (status identical) | |
1090 |
|
1125 | |||
1091 | === :fail -> :local === |
|
1126 | === :fail -> :local === | |
1092 | (no more unresolved files) |
|
1127 | (no more unresolved files) | |
1093 | --- diff of status --- |
|
1128 | --- diff of status --- | |
1094 | (status identical) |
|
1129 | (status identical) | |
1095 |
|
1130 |
@@ -1,795 +1,845 b'' | |||||
1 | Set up a base, local, and remote changeset, as well as the working copy state. |
|
1 | Set up a base, local, and remote changeset, as well as the working copy state. | |
2 | Files names are of the form base_remote_local_working-copy. For example, |
|
2 | Files names are of the form base_remote_local_working-copy. For example, | |
3 | content1_content2_content1_content2-untracked represents a |
|
3 | content1_content2_content1_content2-untracked represents a | |
4 | file that was modified in the remote changeset, left untouched in the |
|
4 | file that was modified in the remote changeset, left untouched in the | |
5 | local changeset, and then modified in the working copy to match the |
|
5 | local changeset, and then modified in the working copy to match the | |
6 | remote content, then finally forgotten. |
|
6 | remote content, then finally forgotten. | |
7 |
|
7 | |||
8 | $ hg init repo |
|
8 | $ hg init repo | |
9 | $ cd repo |
|
9 | $ cd repo | |
10 |
|
10 | |||
11 | Create base changeset |
|
11 | Create base changeset | |
12 |
|
12 | |||
13 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 1 |
|
13 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 1 | |
14 | $ hg addremove -q --similarity 0 |
|
14 | $ hg addremove -q --similarity 0 | |
15 | $ hg commit -qm 'base' |
|
15 | $ hg commit -qm 'base' | |
16 |
|
16 | |||
17 | Create remote changeset |
|
17 | Create remote changeset | |
18 |
|
18 | |||
19 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 2 |
|
19 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 2 | |
20 | $ hg addremove -q --similarity 0 |
|
20 | $ hg addremove -q --similarity 0 | |
21 | $ hg commit -qm 'remote' |
|
21 | $ hg commit -qm 'remote' | |
22 |
|
22 | |||
23 | Create local changeset |
|
23 | Create local changeset | |
24 |
|
24 | |||
25 | $ hg update -q 0 |
|
25 | $ hg update -q 0 | |
26 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 3 |
|
26 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 3 | |
27 | $ hg addremove -q --similarity 0 |
|
27 | $ hg addremove -q --similarity 0 | |
28 | $ hg commit -qm 'local' |
|
28 | $ hg commit -qm 'local' | |
29 |
|
29 | |||
30 | Set up working directory |
|
30 | Set up working directory | |
31 |
|
31 | |||
32 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc |
|
32 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc | |
33 | $ hg addremove -q --similarity 0 |
|
33 | $ hg addremove -q --similarity 0 | |
34 | $ hg forget *_*_*_*-untracked |
|
34 | $ hg forget *_*_*_*-untracked | |
35 | $ rm *_*_*_missing-* |
|
35 | $ rm *_*_*_missing-* | |
36 |
|
36 | |||
37 | $ hg status -A |
|
37 | $ hg status -A | |
38 | M content1_content1_content1_content4-tracked |
|
38 | M content1_content1_content1_content4-tracked | |
39 | M content1_content1_content3_content1-tracked |
|
39 | M content1_content1_content3_content1-tracked | |
40 | M content1_content1_content3_content4-tracked |
|
40 | M content1_content1_content3_content4-tracked | |
41 | M content1_content2_content1_content2-tracked |
|
41 | M content1_content2_content1_content2-tracked | |
42 | M content1_content2_content1_content4-tracked |
|
42 | M content1_content2_content1_content4-tracked | |
43 | M content1_content2_content2_content1-tracked |
|
43 | M content1_content2_content2_content1-tracked | |
44 | M content1_content2_content2_content4-tracked |
|
44 | M content1_content2_content2_content4-tracked | |
45 | M content1_content2_content3_content1-tracked |
|
45 | M content1_content2_content3_content1-tracked | |
46 | M content1_content2_content3_content2-tracked |
|
46 | M content1_content2_content3_content2-tracked | |
47 | M content1_content2_content3_content4-tracked |
|
47 | M content1_content2_content3_content4-tracked | |
48 | M content1_missing_content1_content4-tracked |
|
48 | M content1_missing_content1_content4-tracked | |
49 | M content1_missing_content3_content1-tracked |
|
49 | M content1_missing_content3_content1-tracked | |
50 | M content1_missing_content3_content4-tracked |
|
50 | M content1_missing_content3_content4-tracked | |
51 | M missing_content2_content2_content4-tracked |
|
51 | M missing_content2_content2_content4-tracked | |
52 | M missing_content2_content3_content2-tracked |
|
52 | M missing_content2_content3_content2-tracked | |
53 | M missing_content2_content3_content4-tracked |
|
53 | M missing_content2_content3_content4-tracked | |
54 | M missing_missing_content3_content4-tracked |
|
54 | M missing_missing_content3_content4-tracked | |
55 | A content1_content1_missing_content1-tracked |
|
55 | A content1_content1_missing_content1-tracked | |
56 | A content1_content1_missing_content4-tracked |
|
56 | A content1_content1_missing_content4-tracked | |
57 | A content1_content2_missing_content1-tracked |
|
57 | A content1_content2_missing_content1-tracked | |
58 | A content1_content2_missing_content2-tracked |
|
58 | A content1_content2_missing_content2-tracked | |
59 | A content1_content2_missing_content4-tracked |
|
59 | A content1_content2_missing_content4-tracked | |
60 | A content1_missing_missing_content1-tracked |
|
60 | A content1_missing_missing_content1-tracked | |
61 | A content1_missing_missing_content4-tracked |
|
61 | A content1_missing_missing_content4-tracked | |
62 | A missing_content2_missing_content2-tracked |
|
62 | A missing_content2_missing_content2-tracked | |
63 | A missing_content2_missing_content4-tracked |
|
63 | A missing_content2_missing_content4-tracked | |
64 | A missing_missing_missing_content4-tracked |
|
64 | A missing_missing_missing_content4-tracked | |
65 | R content1_content1_content1_content1-untracked |
|
65 | R content1_content1_content1_content1-untracked | |
66 | R content1_content1_content1_content4-untracked |
|
66 | R content1_content1_content1_content4-untracked | |
67 | R content1_content1_content1_missing-untracked |
|
67 | R content1_content1_content1_missing-untracked | |
68 | R content1_content1_content3_content1-untracked |
|
68 | R content1_content1_content3_content1-untracked | |
69 | R content1_content1_content3_content3-untracked |
|
69 | R content1_content1_content3_content3-untracked | |
70 | R content1_content1_content3_content4-untracked |
|
70 | R content1_content1_content3_content4-untracked | |
71 | R content1_content1_content3_missing-untracked |
|
71 | R content1_content1_content3_missing-untracked | |
72 | R content1_content2_content1_content1-untracked |
|
72 | R content1_content2_content1_content1-untracked | |
73 | R content1_content2_content1_content2-untracked |
|
73 | R content1_content2_content1_content2-untracked | |
74 | R content1_content2_content1_content4-untracked |
|
74 | R content1_content2_content1_content4-untracked | |
75 | R content1_content2_content1_missing-untracked |
|
75 | R content1_content2_content1_missing-untracked | |
76 | R content1_content2_content2_content1-untracked |
|
76 | R content1_content2_content2_content1-untracked | |
77 | R content1_content2_content2_content2-untracked |
|
77 | R content1_content2_content2_content2-untracked | |
78 | R content1_content2_content2_content4-untracked |
|
78 | R content1_content2_content2_content4-untracked | |
79 | R content1_content2_content2_missing-untracked |
|
79 | R content1_content2_content2_missing-untracked | |
80 | R content1_content2_content3_content1-untracked |
|
80 | R content1_content2_content3_content1-untracked | |
81 | R content1_content2_content3_content2-untracked |
|
81 | R content1_content2_content3_content2-untracked | |
82 | R content1_content2_content3_content3-untracked |
|
82 | R content1_content2_content3_content3-untracked | |
83 | R content1_content2_content3_content4-untracked |
|
83 | R content1_content2_content3_content4-untracked | |
84 | R content1_content2_content3_missing-untracked |
|
84 | R content1_content2_content3_missing-untracked | |
85 | R content1_missing_content1_content1-untracked |
|
85 | R content1_missing_content1_content1-untracked | |
86 | R content1_missing_content1_content4-untracked |
|
86 | R content1_missing_content1_content4-untracked | |
87 | R content1_missing_content1_missing-untracked |
|
87 | R content1_missing_content1_missing-untracked | |
88 | R content1_missing_content3_content1-untracked |
|
88 | R content1_missing_content3_content1-untracked | |
89 | R content1_missing_content3_content3-untracked |
|
89 | R content1_missing_content3_content3-untracked | |
90 | R content1_missing_content3_content4-untracked |
|
90 | R content1_missing_content3_content4-untracked | |
91 | R content1_missing_content3_missing-untracked |
|
91 | R content1_missing_content3_missing-untracked | |
92 | R missing_content2_content2_content2-untracked |
|
92 | R missing_content2_content2_content2-untracked | |
93 | R missing_content2_content2_content4-untracked |
|
93 | R missing_content2_content2_content4-untracked | |
94 | R missing_content2_content2_missing-untracked |
|
94 | R missing_content2_content2_missing-untracked | |
95 | R missing_content2_content3_content2-untracked |
|
95 | R missing_content2_content3_content2-untracked | |
96 | R missing_content2_content3_content3-untracked |
|
96 | R missing_content2_content3_content3-untracked | |
97 | R missing_content2_content3_content4-untracked |
|
97 | R missing_content2_content3_content4-untracked | |
98 | R missing_content2_content3_missing-untracked |
|
98 | R missing_content2_content3_missing-untracked | |
99 | R missing_missing_content3_content3-untracked |
|
99 | R missing_missing_content3_content3-untracked | |
100 | R missing_missing_content3_content4-untracked |
|
100 | R missing_missing_content3_content4-untracked | |
101 | R missing_missing_content3_missing-untracked |
|
101 | R missing_missing_content3_missing-untracked | |
102 | ! content1_content1_content1_missing-tracked |
|
102 | ! content1_content1_content1_missing-tracked | |
103 | ! content1_content1_content3_missing-tracked |
|
103 | ! content1_content1_content3_missing-tracked | |
104 | ! content1_content1_missing_missing-tracked |
|
104 | ! content1_content1_missing_missing-tracked | |
105 | ! content1_content2_content1_missing-tracked |
|
105 | ! content1_content2_content1_missing-tracked | |
106 | ! content1_content2_content2_missing-tracked |
|
106 | ! content1_content2_content2_missing-tracked | |
107 | ! content1_content2_content3_missing-tracked |
|
107 | ! content1_content2_content3_missing-tracked | |
108 | ! content1_content2_missing_missing-tracked |
|
108 | ! content1_content2_missing_missing-tracked | |
109 | ! content1_missing_content1_missing-tracked |
|
109 | ! content1_missing_content1_missing-tracked | |
110 | ! content1_missing_content3_missing-tracked |
|
110 | ! content1_missing_content3_missing-tracked | |
111 | ! content1_missing_missing_missing-tracked |
|
111 | ! content1_missing_missing_missing-tracked | |
112 | ! missing_content2_content2_missing-tracked |
|
112 | ! missing_content2_content2_missing-tracked | |
113 | ! missing_content2_content3_missing-tracked |
|
113 | ! missing_content2_content3_missing-tracked | |
114 | ! missing_content2_missing_missing-tracked |
|
114 | ! missing_content2_missing_missing-tracked | |
115 | ! missing_missing_content3_missing-tracked |
|
115 | ! missing_missing_content3_missing-tracked | |
116 | ! missing_missing_missing_missing-tracked |
|
116 | ! missing_missing_missing_missing-tracked | |
117 | ? content1_content1_missing_content1-untracked |
|
117 | ? content1_content1_missing_content1-untracked | |
118 | ? content1_content1_missing_content4-untracked |
|
118 | ? content1_content1_missing_content4-untracked | |
119 | ? content1_content2_missing_content1-untracked |
|
119 | ? content1_content2_missing_content1-untracked | |
120 | ? content1_content2_missing_content2-untracked |
|
120 | ? content1_content2_missing_content2-untracked | |
121 | ? content1_content2_missing_content4-untracked |
|
121 | ? content1_content2_missing_content4-untracked | |
122 | ? content1_missing_missing_content1-untracked |
|
122 | ? content1_missing_missing_content1-untracked | |
123 | ? content1_missing_missing_content4-untracked |
|
123 | ? content1_missing_missing_content4-untracked | |
124 | ? missing_content2_missing_content2-untracked |
|
124 | ? missing_content2_missing_content2-untracked | |
125 | ? missing_content2_missing_content4-untracked |
|
125 | ? missing_content2_missing_content4-untracked | |
126 | ? missing_missing_missing_content4-untracked |
|
126 | ? missing_missing_missing_content4-untracked | |
127 | C content1_content1_content1_content1-tracked |
|
127 | C content1_content1_content1_content1-tracked | |
128 | C content1_content1_content3_content3-tracked |
|
128 | C content1_content1_content3_content3-tracked | |
129 | C content1_content2_content1_content1-tracked |
|
129 | C content1_content2_content1_content1-tracked | |
130 | C content1_content2_content2_content2-tracked |
|
130 | C content1_content2_content2_content2-tracked | |
131 | C content1_content2_content3_content3-tracked |
|
131 | C content1_content2_content3_content3-tracked | |
132 | C content1_missing_content1_content1-tracked |
|
132 | C content1_missing_content1_content1-tracked | |
133 | C content1_missing_content3_content3-tracked |
|
133 | C content1_missing_content3_content3-tracked | |
134 | C missing_content2_content2_content2-tracked |
|
134 | C missing_content2_content2_content2-tracked | |
135 | C missing_content2_content3_content3-tracked |
|
135 | C missing_content2_content3_content3-tracked | |
136 | C missing_missing_content3_content3-tracked |
|
136 | C missing_missing_content3_content3-tracked | |
137 |
|
137 | |||
138 | Merge with remote |
|
138 | Merge with remote | |
139 |
|
139 | |||
140 | # Notes: |
|
140 | # Notes: | |
141 | # - local and remote changed content1_content2_*_content2-untracked |
|
141 | # - local and remote changed content1_content2_*_content2-untracked | |
142 | # in the same way, so it could potentially be left alone |
|
142 | # in the same way, so it could potentially be left alone | |
143 |
|
143 | |||
144 | $ hg merge -f --tool internal:merge3 'desc("remote")' 2>&1 | tee $TESTTMP/merge-output-1 |
|
144 | $ hg merge -f --tool internal:merge3 'desc("remote")' 2>&1 | tee $TESTTMP/merge-output-1 | |
145 |
local [working copy] |
|
145 | file content1_missing_content1_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
146 | What do you want to do? | |||
146 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
147 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
147 |
local [working copy] |
|
148 | file content1_missing_content3_content3-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
149 | What do you want to do? | |||
148 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
150 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
149 |
local [working copy] |
|
151 | file content1_missing_content3_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
152 | What do you want to do? | |||
150 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
153 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
151 | local [working copy] changed content1_missing_missing_content4-tracked which other [merge rev] deleted |
|
154 | file content1_missing_missing_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
155 | What do you want to do? | |||
152 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
156 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
153 |
other [merge rev] |
|
157 | file content1_content2_content1_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
158 | What do you want to do? | |||
154 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
159 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
155 |
other [merge rev] |
|
160 | file content1_content2_content1_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
161 | What do you want to do? | |||
156 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
162 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
157 |
other [merge rev] |
|
163 | file content1_content2_content1_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
164 | What do you want to do? | |||
158 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
165 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
159 |
other [merge rev] |
|
166 | file content1_content2_content1_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
167 | What do you want to do? | |||
160 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
161 |
other [merge rev] |
|
169 | file content1_content2_content1_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
170 | What do you want to do? | |||
162 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
171 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
163 |
other [merge rev] |
|
172 | file content1_content2_content2_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
173 | What do you want to do? | |||
164 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
174 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
165 |
other [merge rev] |
|
175 | file content1_content2_content2_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
176 | What do you want to do? | |||
166 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
177 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
167 |
other [merge rev] |
|
178 | file content1_content2_content2_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
179 | What do you want to do? | |||
168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
180 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
169 |
other [merge rev] |
|
181 | file content1_content2_content2_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
182 | What do you want to do? | |||
170 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
183 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
171 |
other [merge rev] |
|
184 | file content1_content2_content2_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
185 | What do you want to do? | |||
172 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
186 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
173 |
other [merge rev] |
|
187 | file content1_content2_content3_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
188 | What do you want to do? | |||
174 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
189 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
175 |
other [merge rev] |
|
190 | file content1_content2_content3_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
191 | What do you want to do? | |||
176 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
192 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
177 |
other [merge rev] |
|
193 | file content1_content2_content3_content3-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
194 | What do you want to do? | |||
178 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
195 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
179 |
other [merge rev] |
|
196 | file content1_content2_content3_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
197 | What do you want to do? | |||
180 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
198 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
181 |
other [merge rev] |
|
199 | file content1_content2_content3_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
200 | What do you want to do? | |||
182 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
201 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
183 |
other [merge rev] |
|
202 | file content1_content2_content3_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
203 | What do you want to do? | |||
184 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
204 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
185 |
other [merge rev] |
|
205 | file content1_content2_missing_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
206 | What do you want to do? | |||
186 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
207 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
187 |
other [merge rev] |
|
208 | file content1_content2_missing_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
209 | What do you want to do? | |||
188 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
210 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
189 |
other [merge rev] |
|
211 | file content1_content2_missing_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
212 | What do you want to do? | |||
190 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
213 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
191 |
other [merge rev] |
|
214 | file content1_content2_missing_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
215 | What do you want to do? | |||
192 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
216 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
193 |
other [merge rev] |
|
217 | file content1_content2_missing_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
218 | What do you want to do? | |||
194 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
219 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
195 | merging content1_content2_content1_content4-tracked |
|
220 | merging content1_content2_content1_content4-tracked | |
196 | merging content1_content2_content2_content1-tracked |
|
221 | merging content1_content2_content2_content1-tracked | |
197 | merging content1_content2_content2_content4-tracked |
|
222 | merging content1_content2_content2_content4-tracked | |
198 | merging content1_content2_content3_content1-tracked |
|
223 | merging content1_content2_content3_content1-tracked | |
199 | merging content1_content2_content3_content3-tracked |
|
224 | merging content1_content2_content3_content3-tracked | |
200 | merging content1_content2_content3_content4-tracked |
|
225 | merging content1_content2_content3_content4-tracked | |
201 | merging content1_content2_missing_content1-tracked |
|
226 | merging content1_content2_missing_content1-tracked | |
202 | merging content1_content2_missing_content4-tracked |
|
227 | merging content1_content2_missing_content4-tracked | |
203 | merging missing_content2_content2_content4-tracked |
|
228 | merging missing_content2_content2_content4-tracked | |
204 | merging missing_content2_content3_content3-tracked |
|
229 | merging missing_content2_content3_content3-tracked | |
205 | merging missing_content2_content3_content4-tracked |
|
230 | merging missing_content2_content3_content4-tracked | |
206 | merging missing_content2_missing_content4-tracked |
|
231 | merging missing_content2_missing_content4-tracked | |
207 | merging missing_content2_missing_content4-untracked |
|
232 | merging missing_content2_missing_content4-untracked | |
208 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') |
|
233 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') | |
209 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
234 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
210 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
235 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
211 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
236 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
212 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
237 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
213 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
238 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
214 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
239 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
215 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
240 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
216 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
241 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
217 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') |
|
242 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') | |
218 | 18 files updated, 3 files merged, 8 files removed, 35 files unresolved |
|
243 | 18 files updated, 3 files merged, 8 files removed, 35 files unresolved | |
219 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
244 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
220 |
|
245 | |||
221 | Check which files need to be resolved (should correspond to the output above). |
|
246 | Check which files need to be resolved (should correspond to the output above). | |
222 | This should be the files for which the base (1st filename segment), the remote |
|
247 | This should be the files for which the base (1st filename segment), the remote | |
223 | (2nd segment) and the working copy (4th segment) are all different. |
|
248 | (2nd segment) and the working copy (4th segment) are all different. | |
224 |
|
249 | |||
225 | Interestingly, one untracked file got merged and added, which corresponds to the |
|
250 | Interestingly, one untracked file got merged and added, which corresponds to the | |
226 | odd 'if force and branchmerge and different' case in manifestmerge(). |
|
251 | odd 'if force and branchmerge and different' case in manifestmerge(). | |
227 |
|
252 | |||
228 | $ hg resolve -l |
|
253 | $ hg resolve -l | |
229 | U content1_content2_content1_content1-untracked |
|
254 | U content1_content2_content1_content1-untracked | |
230 | U content1_content2_content1_content2-untracked |
|
255 | U content1_content2_content1_content2-untracked | |
231 | U content1_content2_content1_content4-tracked |
|
256 | U content1_content2_content1_content4-tracked | |
232 | U content1_content2_content1_content4-untracked |
|
257 | U content1_content2_content1_content4-untracked | |
233 | U content1_content2_content1_missing-tracked |
|
258 | U content1_content2_content1_missing-tracked | |
234 | U content1_content2_content1_missing-untracked |
|
259 | U content1_content2_content1_missing-untracked | |
235 | R content1_content2_content2_content1-tracked |
|
260 | R content1_content2_content2_content1-tracked | |
236 | U content1_content2_content2_content1-untracked |
|
261 | U content1_content2_content2_content1-untracked | |
237 | U content1_content2_content2_content2-untracked |
|
262 | U content1_content2_content2_content2-untracked | |
238 | U content1_content2_content2_content4-tracked |
|
263 | U content1_content2_content2_content4-tracked | |
239 | U content1_content2_content2_content4-untracked |
|
264 | U content1_content2_content2_content4-untracked | |
240 | U content1_content2_content2_missing-tracked |
|
265 | U content1_content2_content2_missing-tracked | |
241 | U content1_content2_content2_missing-untracked |
|
266 | U content1_content2_content2_missing-untracked | |
242 | R content1_content2_content3_content1-tracked |
|
267 | R content1_content2_content3_content1-tracked | |
243 | U content1_content2_content3_content1-untracked |
|
268 | U content1_content2_content3_content1-untracked | |
244 | U content1_content2_content3_content2-untracked |
|
269 | U content1_content2_content3_content2-untracked | |
245 | U content1_content2_content3_content3-tracked |
|
270 | U content1_content2_content3_content3-tracked | |
246 | U content1_content2_content3_content3-untracked |
|
271 | U content1_content2_content3_content3-untracked | |
247 | U content1_content2_content3_content4-tracked |
|
272 | U content1_content2_content3_content4-tracked | |
248 | U content1_content2_content3_content4-untracked |
|
273 | U content1_content2_content3_content4-untracked | |
249 | U content1_content2_content3_missing-tracked |
|
274 | U content1_content2_content3_missing-tracked | |
250 | U content1_content2_content3_missing-untracked |
|
275 | U content1_content2_content3_missing-untracked | |
251 | R content1_content2_missing_content1-tracked |
|
276 | R content1_content2_missing_content1-tracked | |
252 | U content1_content2_missing_content1-untracked |
|
277 | U content1_content2_missing_content1-untracked | |
253 | U content1_content2_missing_content2-untracked |
|
278 | U content1_content2_missing_content2-untracked | |
254 | U content1_content2_missing_content4-tracked |
|
279 | U content1_content2_missing_content4-tracked | |
255 | U content1_content2_missing_content4-untracked |
|
280 | U content1_content2_missing_content4-untracked | |
256 | U content1_content2_missing_missing-tracked |
|
281 | U content1_content2_missing_missing-tracked | |
257 | U content1_content2_missing_missing-untracked |
|
282 | U content1_content2_missing_missing-untracked | |
258 | U content1_missing_content1_content4-tracked |
|
283 | U content1_missing_content1_content4-tracked | |
259 | U content1_missing_content3_content3-tracked |
|
284 | U content1_missing_content3_content3-tracked | |
260 | U content1_missing_content3_content4-tracked |
|
285 | U content1_missing_content3_content4-tracked | |
261 | U content1_missing_missing_content4-tracked |
|
286 | U content1_missing_missing_content4-tracked | |
262 | U missing_content2_content2_content4-tracked |
|
287 | U missing_content2_content2_content4-tracked | |
263 | U missing_content2_content3_content3-tracked |
|
288 | U missing_content2_content3_content3-tracked | |
264 | U missing_content2_content3_content4-tracked |
|
289 | U missing_content2_content3_content4-tracked | |
265 | U missing_content2_missing_content4-tracked |
|
290 | U missing_content2_missing_content4-tracked | |
266 | U missing_content2_missing_content4-untracked |
|
291 | U missing_content2_missing_content4-untracked | |
267 |
|
292 | |||
268 | Check status and file content |
|
293 | Check status and file content | |
269 |
|
294 | |||
270 | Some files get added (e.g. content1_content2_content1_content1-untracked) |
|
295 | Some files get added (e.g. content1_content2_content1_content1-untracked) | |
271 |
|
296 | |||
272 | It is not intuitive that content1_content2_content1_content4-tracked gets |
|
297 | It is not intuitive that content1_content2_content1_content4-tracked gets | |
273 | merged while content1_content2_content1_content4-untracked gets overwritten. |
|
298 | merged while content1_content2_content1_content4-untracked gets overwritten. | |
274 | Any *_content2_*-untracked triggers the modified/deleted prompt and then gets |
|
299 | Any *_content2_*-untracked triggers the modified/deleted prompt and then gets | |
275 | overwritten. |
|
300 | overwritten. | |
276 |
|
301 | |||
277 | A lot of untracked files become tracked, for example |
|
302 | A lot of untracked files become tracked, for example | |
278 | content1_content2_content2_content2-untracked. |
|
303 | content1_content2_content2_content2-untracked. | |
279 |
|
304 | |||
280 | *_missing_missing_missing-tracked is reported as removed ('R'), which |
|
305 | *_missing_missing_missing-tracked is reported as removed ('R'), which | |
281 | doesn't make sense since the file did not exist in the parent, but on the |
|
306 | doesn't make sense since the file did not exist in the parent, but on the | |
282 | other hand, merged-in additions are reported as modifications, which is |
|
307 | other hand, merged-in additions are reported as modifications, which is | |
283 | almost as strange. |
|
308 | almost as strange. | |
284 |
|
309 | |||
285 | missing_missing_content3_missing-tracked becomes removed ('R'), even though |
|
310 | missing_missing_content3_missing-tracked becomes removed ('R'), even though | |
286 | the remote side did not touch the file |
|
311 | the remote side did not touch the file | |
287 |
|
312 | |||
288 | $ checkstatus() { |
|
313 | $ checkstatus() { | |
289 | > for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3` |
|
314 | > for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3` | |
290 | > do |
|
315 | > do | |
291 | > echo |
|
316 | > echo | |
292 | > hg status -A $f |
|
317 | > hg status -A $f | |
293 | > if test -f $f |
|
318 | > if test -f $f | |
294 | > then |
|
319 | > then | |
295 | > cat $f |
|
320 | > cat $f | |
296 | > else |
|
321 | > else | |
297 | > echo '<missing>' |
|
322 | > echo '<missing>' | |
298 | > fi |
|
323 | > fi | |
299 | > done |
|
324 | > done | |
300 | > } |
|
325 | > } | |
301 | $ checkstatus 2>&1 | tee $TESTTMP/status1 |
|
326 | $ checkstatus 2>&1 | tee $TESTTMP/status1 | |
302 |
|
327 | |||
303 | C content1_content1_content1_content1-tracked |
|
328 | C content1_content1_content1_content1-tracked | |
304 | content1 |
|
329 | content1 | |
305 |
|
330 | |||
306 | R content1_content1_content1_content1-untracked |
|
331 | R content1_content1_content1_content1-untracked | |
307 | content1 |
|
332 | content1 | |
308 |
|
333 | |||
309 | M content1_content1_content1_content4-tracked |
|
334 | M content1_content1_content1_content4-tracked | |
310 | content4 |
|
335 | content4 | |
311 |
|
336 | |||
312 | R content1_content1_content1_content4-untracked |
|
337 | R content1_content1_content1_content4-untracked | |
313 | content4 |
|
338 | content4 | |
314 |
|
339 | |||
315 | ! content1_content1_content1_missing-tracked |
|
340 | ! content1_content1_content1_missing-tracked | |
316 | <missing> |
|
341 | <missing> | |
317 |
|
342 | |||
318 | R content1_content1_content1_missing-untracked |
|
343 | R content1_content1_content1_missing-untracked | |
319 | <missing> |
|
344 | <missing> | |
320 |
|
345 | |||
321 | M content1_content1_content3_content1-tracked |
|
346 | M content1_content1_content3_content1-tracked | |
322 | content1 |
|
347 | content1 | |
323 |
|
348 | |||
324 | R content1_content1_content3_content1-untracked |
|
349 | R content1_content1_content3_content1-untracked | |
325 | content1 |
|
350 | content1 | |
326 |
|
351 | |||
327 | C content1_content1_content3_content3-tracked |
|
352 | C content1_content1_content3_content3-tracked | |
328 | content3 |
|
353 | content3 | |
329 |
|
354 | |||
330 | R content1_content1_content3_content3-untracked |
|
355 | R content1_content1_content3_content3-untracked | |
331 | content3 |
|
356 | content3 | |
332 |
|
357 | |||
333 | M content1_content1_content3_content4-tracked |
|
358 | M content1_content1_content3_content4-tracked | |
334 | content4 |
|
359 | content4 | |
335 |
|
360 | |||
336 | R content1_content1_content3_content4-untracked |
|
361 | R content1_content1_content3_content4-untracked | |
337 | content4 |
|
362 | content4 | |
338 |
|
363 | |||
339 | ! content1_content1_content3_missing-tracked |
|
364 | ! content1_content1_content3_missing-tracked | |
340 | <missing> |
|
365 | <missing> | |
341 |
|
366 | |||
342 | R content1_content1_content3_missing-untracked |
|
367 | R content1_content1_content3_missing-untracked | |
343 | <missing> |
|
368 | <missing> | |
344 |
|
369 | |||
345 | A content1_content1_missing_content1-tracked |
|
370 | A content1_content1_missing_content1-tracked | |
346 | content1 |
|
371 | content1 | |
347 |
|
372 | |||
348 | ? content1_content1_missing_content1-untracked |
|
373 | ? content1_content1_missing_content1-untracked | |
349 | content1 |
|
374 | content1 | |
350 |
|
375 | |||
351 | A content1_content1_missing_content4-tracked |
|
376 | A content1_content1_missing_content4-tracked | |
352 | content4 |
|
377 | content4 | |
353 |
|
378 | |||
354 | ? content1_content1_missing_content4-untracked |
|
379 | ? content1_content1_missing_content4-untracked | |
355 | content4 |
|
380 | content4 | |
356 |
|
381 | |||
357 | ! content1_content1_missing_missing-tracked |
|
382 | ! content1_content1_missing_missing-tracked | |
358 | <missing> |
|
383 | <missing> | |
359 |
|
384 | |||
360 | content1_content1_missing_missing-untracked: * (glob) |
|
385 | content1_content1_missing_missing-untracked: * (glob) | |
361 | <missing> |
|
386 | <missing> | |
362 |
|
387 | |||
363 | M content1_content2_content1_content1-tracked |
|
388 | M content1_content2_content1_content1-tracked | |
364 | content2 |
|
389 | content2 | |
365 |
|
390 | |||
366 | M content1_content2_content1_content1-untracked |
|
391 | M content1_content2_content1_content1-untracked | |
367 | content2 |
|
392 | content2 | |
368 |
|
393 | |||
369 | M content1_content2_content1_content2-tracked |
|
394 | M content1_content2_content1_content2-tracked | |
370 | content2 |
|
395 | content2 | |
371 |
|
396 | |||
372 | M content1_content2_content1_content2-untracked |
|
397 | M content1_content2_content1_content2-untracked | |
373 | content2 |
|
398 | content2 | |
374 |
|
399 | |||
375 | M content1_content2_content1_content4-tracked |
|
400 | M content1_content2_content1_content4-tracked | |
376 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
401 | <<<<<<< working copy: 0447570f1af6 - test: local | |
377 | content4 |
|
402 | content4 | |
378 | ||||||| base |
|
403 | ||||||| base | |
379 | content1 |
|
404 | content1 | |
380 | ======= |
|
405 | ======= | |
381 | content2 |
|
406 | content2 | |
382 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
407 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
383 |
|
408 | |||
384 | M content1_content2_content1_content4-untracked |
|
409 | M content1_content2_content1_content4-untracked | |
385 | content2 |
|
410 | content2 | |
386 |
|
411 | |||
387 | M content1_content2_content1_missing-tracked |
|
412 | M content1_content2_content1_missing-tracked | |
388 | content2 |
|
413 | content2 | |
389 |
|
414 | |||
390 | M content1_content2_content1_missing-untracked |
|
415 | M content1_content2_content1_missing-untracked | |
391 | content2 |
|
416 | content2 | |
392 |
|
417 | |||
393 | M content1_content2_content2_content1-tracked |
|
418 | M content1_content2_content2_content1-tracked | |
394 | content2 |
|
419 | content2 | |
395 |
|
420 | |||
396 | M content1_content2_content2_content1-untracked |
|
421 | M content1_content2_content2_content1-untracked | |
397 | content2 |
|
422 | content2 | |
398 |
|
423 | |||
399 | C content1_content2_content2_content2-tracked |
|
424 | C content1_content2_content2_content2-tracked | |
400 | content2 |
|
425 | content2 | |
401 |
|
426 | |||
402 | M content1_content2_content2_content2-untracked |
|
427 | M content1_content2_content2_content2-untracked | |
403 | content2 |
|
428 | content2 | |
404 |
|
429 | |||
405 | M content1_content2_content2_content4-tracked |
|
430 | M content1_content2_content2_content4-tracked | |
406 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
431 | <<<<<<< working copy: 0447570f1af6 - test: local | |
407 | content4 |
|
432 | content4 | |
408 | ||||||| base |
|
433 | ||||||| base | |
409 | content1 |
|
434 | content1 | |
410 | ======= |
|
435 | ======= | |
411 | content2 |
|
436 | content2 | |
412 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
437 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
413 |
|
438 | |||
414 | M content1_content2_content2_content4-untracked |
|
439 | M content1_content2_content2_content4-untracked | |
415 | content2 |
|
440 | content2 | |
416 |
|
441 | |||
417 | M content1_content2_content2_missing-tracked |
|
442 | M content1_content2_content2_missing-tracked | |
418 | content2 |
|
443 | content2 | |
419 |
|
444 | |||
420 | M content1_content2_content2_missing-untracked |
|
445 | M content1_content2_content2_missing-untracked | |
421 | content2 |
|
446 | content2 | |
422 |
|
447 | |||
423 | M content1_content2_content3_content1-tracked |
|
448 | M content1_content2_content3_content1-tracked | |
424 | content2 |
|
449 | content2 | |
425 |
|
450 | |||
426 | M content1_content2_content3_content1-untracked |
|
451 | M content1_content2_content3_content1-untracked | |
427 | content2 |
|
452 | content2 | |
428 |
|
453 | |||
429 | M content1_content2_content3_content2-tracked |
|
454 | M content1_content2_content3_content2-tracked | |
430 | content2 |
|
455 | content2 | |
431 |
|
456 | |||
432 | M content1_content2_content3_content2-untracked |
|
457 | M content1_content2_content3_content2-untracked | |
433 | content2 |
|
458 | content2 | |
434 |
|
459 | |||
435 | M content1_content2_content3_content3-tracked |
|
460 | M content1_content2_content3_content3-tracked | |
436 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
461 | <<<<<<< working copy: 0447570f1af6 - test: local | |
437 | content3 |
|
462 | content3 | |
438 | ||||||| base |
|
463 | ||||||| base | |
439 | content1 |
|
464 | content1 | |
440 | ======= |
|
465 | ======= | |
441 | content2 |
|
466 | content2 | |
442 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
467 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
443 |
|
468 | |||
444 | M content1_content2_content3_content3-untracked |
|
469 | M content1_content2_content3_content3-untracked | |
445 | content2 |
|
470 | content2 | |
446 |
|
471 | |||
447 | M content1_content2_content3_content4-tracked |
|
472 | M content1_content2_content3_content4-tracked | |
448 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
473 | <<<<<<< working copy: 0447570f1af6 - test: local | |
449 | content4 |
|
474 | content4 | |
450 | ||||||| base |
|
475 | ||||||| base | |
451 | content1 |
|
476 | content1 | |
452 | ======= |
|
477 | ======= | |
453 | content2 |
|
478 | content2 | |
454 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
479 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
455 |
|
480 | |||
456 | M content1_content2_content3_content4-untracked |
|
481 | M content1_content2_content3_content4-untracked | |
457 | content2 |
|
482 | content2 | |
458 |
|
483 | |||
459 | M content1_content2_content3_missing-tracked |
|
484 | M content1_content2_content3_missing-tracked | |
460 | content2 |
|
485 | content2 | |
461 |
|
486 | |||
462 | M content1_content2_content3_missing-untracked |
|
487 | M content1_content2_content3_missing-untracked | |
463 | content2 |
|
488 | content2 | |
464 |
|
489 | |||
465 | M content1_content2_missing_content1-tracked |
|
490 | M content1_content2_missing_content1-tracked | |
466 | content2 |
|
491 | content2 | |
467 |
|
492 | |||
468 | M content1_content2_missing_content1-untracked |
|
493 | M content1_content2_missing_content1-untracked | |
469 | content2 |
|
494 | content2 | |
470 |
|
495 | |||
471 | M content1_content2_missing_content2-tracked |
|
496 | M content1_content2_missing_content2-tracked | |
472 | content2 |
|
497 | content2 | |
473 |
|
498 | |||
474 | M content1_content2_missing_content2-untracked |
|
499 | M content1_content2_missing_content2-untracked | |
475 | content2 |
|
500 | content2 | |
476 |
|
501 | |||
477 | M content1_content2_missing_content4-tracked |
|
502 | M content1_content2_missing_content4-tracked | |
478 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
503 | <<<<<<< working copy: 0447570f1af6 - test: local | |
479 | content4 |
|
504 | content4 | |
480 | ||||||| base |
|
505 | ||||||| base | |
481 | content1 |
|
506 | content1 | |
482 | ======= |
|
507 | ======= | |
483 | content2 |
|
508 | content2 | |
484 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
509 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
485 |
|
510 | |||
486 | M content1_content2_missing_content4-untracked |
|
511 | M content1_content2_missing_content4-untracked | |
487 | content2 |
|
512 | content2 | |
488 |
|
513 | |||
489 | M content1_content2_missing_missing-tracked |
|
514 | M content1_content2_missing_missing-tracked | |
490 | content2 |
|
515 | content2 | |
491 |
|
516 | |||
492 | M content1_content2_missing_missing-untracked |
|
517 | M content1_content2_missing_missing-untracked | |
493 | content2 |
|
518 | content2 | |
494 |
|
519 | |||
495 | R content1_missing_content1_content1-tracked |
|
520 | R content1_missing_content1_content1-tracked | |
496 | <missing> |
|
521 | <missing> | |
497 |
|
522 | |||
498 | R content1_missing_content1_content1-untracked |
|
523 | R content1_missing_content1_content1-untracked | |
499 | content1 |
|
524 | content1 | |
500 |
|
525 | |||
501 | M content1_missing_content1_content4-tracked |
|
526 | M content1_missing_content1_content4-tracked | |
502 | content4 |
|
527 | content4 | |
503 |
|
528 | |||
504 | R content1_missing_content1_content4-untracked |
|
529 | R content1_missing_content1_content4-untracked | |
505 | content4 |
|
530 | content4 | |
506 |
|
531 | |||
507 | R content1_missing_content1_missing-tracked |
|
532 | R content1_missing_content1_missing-tracked | |
508 | <missing> |
|
533 | <missing> | |
509 |
|
534 | |||
510 | R content1_missing_content1_missing-untracked |
|
535 | R content1_missing_content1_missing-untracked | |
511 | <missing> |
|
536 | <missing> | |
512 |
|
537 | |||
513 | R content1_missing_content3_content1-tracked |
|
538 | R content1_missing_content3_content1-tracked | |
514 | <missing> |
|
539 | <missing> | |
515 |
|
540 | |||
516 | R content1_missing_content3_content1-untracked |
|
541 | R content1_missing_content3_content1-untracked | |
517 | content1 |
|
542 | content1 | |
518 |
|
543 | |||
519 | C content1_missing_content3_content3-tracked |
|
544 | C content1_missing_content3_content3-tracked | |
520 | content3 |
|
545 | content3 | |
521 |
|
546 | |||
522 | R content1_missing_content3_content3-untracked |
|
547 | R content1_missing_content3_content3-untracked | |
523 | content3 |
|
548 | content3 | |
524 |
|
549 | |||
525 | M content1_missing_content3_content4-tracked |
|
550 | M content1_missing_content3_content4-tracked | |
526 | content4 |
|
551 | content4 | |
527 |
|
552 | |||
528 | R content1_missing_content3_content4-untracked |
|
553 | R content1_missing_content3_content4-untracked | |
529 | content4 |
|
554 | content4 | |
530 |
|
555 | |||
531 | R content1_missing_content3_missing-tracked |
|
556 | R content1_missing_content3_missing-tracked | |
532 | <missing> |
|
557 | <missing> | |
533 |
|
558 | |||
534 | R content1_missing_content3_missing-untracked |
|
559 | R content1_missing_content3_missing-untracked | |
535 | <missing> |
|
560 | <missing> | |
536 |
|
561 | |||
537 | R content1_missing_missing_content1-tracked |
|
562 | R content1_missing_missing_content1-tracked | |
538 | <missing> |
|
563 | <missing> | |
539 |
|
564 | |||
540 | ? content1_missing_missing_content1-untracked |
|
565 | ? content1_missing_missing_content1-untracked | |
541 | content1 |
|
566 | content1 | |
542 |
|
567 | |||
543 | A content1_missing_missing_content4-tracked |
|
568 | A content1_missing_missing_content4-tracked | |
544 | content4 |
|
569 | content4 | |
545 |
|
570 | |||
546 | ? content1_missing_missing_content4-untracked |
|
571 | ? content1_missing_missing_content4-untracked | |
547 | content4 |
|
572 | content4 | |
548 |
|
573 | |||
549 | R content1_missing_missing_missing-tracked |
|
574 | R content1_missing_missing_missing-tracked | |
550 | <missing> |
|
575 | <missing> | |
551 |
|
576 | |||
552 | content1_missing_missing_missing-untracked: * (glob) |
|
577 | content1_missing_missing_missing-untracked: * (glob) | |
553 | <missing> |
|
578 | <missing> | |
554 |
|
579 | |||
555 | C missing_content2_content2_content2-tracked |
|
580 | C missing_content2_content2_content2-tracked | |
556 | content2 |
|
581 | content2 | |
557 |
|
582 | |||
558 | M missing_content2_content2_content2-untracked |
|
583 | M missing_content2_content2_content2-untracked | |
559 | content2 |
|
584 | content2 | |
560 |
|
585 | |||
561 | M missing_content2_content2_content4-tracked |
|
586 | M missing_content2_content2_content4-tracked | |
562 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
587 | <<<<<<< working copy: 0447570f1af6 - test: local | |
563 | content4 |
|
588 | content4 | |
564 | ||||||| base |
|
589 | ||||||| base | |
565 | ======= |
|
590 | ======= | |
566 | content2 |
|
591 | content2 | |
567 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
592 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
568 |
|
593 | |||
569 | M missing_content2_content2_content4-untracked |
|
594 | M missing_content2_content2_content4-untracked | |
570 | content2 |
|
595 | content2 | |
571 |
|
596 | |||
572 | M missing_content2_content2_missing-tracked |
|
597 | M missing_content2_content2_missing-tracked | |
573 | content2 |
|
598 | content2 | |
574 |
|
599 | |||
575 | M missing_content2_content2_missing-untracked |
|
600 | M missing_content2_content2_missing-untracked | |
576 | content2 |
|
601 | content2 | |
577 |
|
602 | |||
578 | M missing_content2_content3_content2-tracked |
|
603 | M missing_content2_content3_content2-tracked | |
579 | content2 |
|
604 | content2 | |
580 |
|
605 | |||
581 | M missing_content2_content3_content2-untracked |
|
606 | M missing_content2_content3_content2-untracked | |
582 | content2 |
|
607 | content2 | |
583 |
|
608 | |||
584 | M missing_content2_content3_content3-tracked |
|
609 | M missing_content2_content3_content3-tracked | |
585 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
610 | <<<<<<< working copy: 0447570f1af6 - test: local | |
586 | content3 |
|
611 | content3 | |
587 | ||||||| base |
|
612 | ||||||| base | |
588 | ======= |
|
613 | ======= | |
589 | content2 |
|
614 | content2 | |
590 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
615 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
591 |
|
616 | |||
592 | M missing_content2_content3_content3-untracked |
|
617 | M missing_content2_content3_content3-untracked | |
593 | content2 |
|
618 | content2 | |
594 |
|
619 | |||
595 | M missing_content2_content3_content4-tracked |
|
620 | M missing_content2_content3_content4-tracked | |
596 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
621 | <<<<<<< working copy: 0447570f1af6 - test: local | |
597 | content4 |
|
622 | content4 | |
598 | ||||||| base |
|
623 | ||||||| base | |
599 | ======= |
|
624 | ======= | |
600 | content2 |
|
625 | content2 | |
601 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
626 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
602 |
|
627 | |||
603 | M missing_content2_content3_content4-untracked |
|
628 | M missing_content2_content3_content4-untracked | |
604 | content2 |
|
629 | content2 | |
605 |
|
630 | |||
606 | M missing_content2_content3_missing-tracked |
|
631 | M missing_content2_content3_missing-tracked | |
607 | content2 |
|
632 | content2 | |
608 |
|
633 | |||
609 | M missing_content2_content3_missing-untracked |
|
634 | M missing_content2_content3_missing-untracked | |
610 | content2 |
|
635 | content2 | |
611 |
|
636 | |||
612 | M missing_content2_missing_content2-tracked |
|
637 | M missing_content2_missing_content2-tracked | |
613 | content2 |
|
638 | content2 | |
614 |
|
639 | |||
615 | M missing_content2_missing_content2-untracked |
|
640 | M missing_content2_missing_content2-untracked | |
616 | content2 |
|
641 | content2 | |
617 |
|
642 | |||
618 | M missing_content2_missing_content4-tracked |
|
643 | M missing_content2_missing_content4-tracked | |
619 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
644 | <<<<<<< working copy: 0447570f1af6 - test: local | |
620 | content4 |
|
645 | content4 | |
621 | ||||||| base |
|
646 | ||||||| base | |
622 | ======= |
|
647 | ======= | |
623 | content2 |
|
648 | content2 | |
624 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
649 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
625 |
|
650 | |||
626 | M missing_content2_missing_content4-untracked |
|
651 | M missing_content2_missing_content4-untracked | |
627 | <<<<<<< working copy: 0447570f1af6 - test: local |
|
652 | <<<<<<< working copy: 0447570f1af6 - test: local | |
628 | content4 |
|
653 | content4 | |
629 | ||||||| base |
|
654 | ||||||| base | |
630 | ======= |
|
655 | ======= | |
631 | content2 |
|
656 | content2 | |
632 | >>>>>>> merge rev: 85100b8c675b - test: remote |
|
657 | >>>>>>> merge rev: 85100b8c675b - test: remote | |
633 |
|
658 | |||
634 | M missing_content2_missing_missing-tracked |
|
659 | M missing_content2_missing_missing-tracked | |
635 | content2 |
|
660 | content2 | |
636 |
|
661 | |||
637 | M missing_content2_missing_missing-untracked |
|
662 | M missing_content2_missing_missing-untracked | |
638 | content2 |
|
663 | content2 | |
639 |
|
664 | |||
640 | C missing_missing_content3_content3-tracked |
|
665 | C missing_missing_content3_content3-tracked | |
641 | content3 |
|
666 | content3 | |
642 |
|
667 | |||
643 | R missing_missing_content3_content3-untracked |
|
668 | R missing_missing_content3_content3-untracked | |
644 | content3 |
|
669 | content3 | |
645 |
|
670 | |||
646 | M missing_missing_content3_content4-tracked |
|
671 | M missing_missing_content3_content4-tracked | |
647 | content4 |
|
672 | content4 | |
648 |
|
673 | |||
649 | R missing_missing_content3_content4-untracked |
|
674 | R missing_missing_content3_content4-untracked | |
650 | content4 |
|
675 | content4 | |
651 |
|
676 | |||
652 | R missing_missing_content3_missing-tracked |
|
677 | R missing_missing_content3_missing-tracked | |
653 | <missing> |
|
678 | <missing> | |
654 |
|
679 | |||
655 | R missing_missing_content3_missing-untracked |
|
680 | R missing_missing_content3_missing-untracked | |
656 | <missing> |
|
681 | <missing> | |
657 |
|
682 | |||
658 | A missing_missing_missing_content4-tracked |
|
683 | A missing_missing_missing_content4-tracked | |
659 | content4 |
|
684 | content4 | |
660 |
|
685 | |||
661 | ? missing_missing_missing_content4-untracked |
|
686 | ? missing_missing_missing_content4-untracked | |
662 | content4 |
|
687 | content4 | |
663 |
|
688 | |||
664 | R missing_missing_missing_missing-tracked |
|
689 | R missing_missing_missing_missing-tracked | |
665 | <missing> |
|
690 | <missing> | |
666 |
|
691 | |||
667 | missing_missing_missing_missing-untracked: * (glob) |
|
692 | missing_missing_missing_missing-untracked: * (glob) | |
668 | <missing> |
|
693 | <missing> | |
669 |
|
694 | |||
670 | $ for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3` |
|
695 | $ for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3` | |
671 | > do |
|
696 | > do | |
672 | > if test -f ${f}.orig |
|
697 | > if test -f ${f}.orig | |
673 | > then |
|
698 | > then | |
674 | > echo ${f}.orig: |
|
699 | > echo ${f}.orig: | |
675 | > cat ${f}.orig |
|
700 | > cat ${f}.orig | |
676 | > fi |
|
701 | > fi | |
677 | > done |
|
702 | > done | |
678 | content1_content2_content1_content4-tracked.orig: |
|
703 | content1_content2_content1_content4-tracked.orig: | |
679 | content4 |
|
704 | content4 | |
680 | content1_content2_content2_content4-tracked.orig: |
|
705 | content1_content2_content2_content4-tracked.orig: | |
681 | content4 |
|
706 | content4 | |
682 | content1_content2_content3_content3-tracked.orig: |
|
707 | content1_content2_content3_content3-tracked.orig: | |
683 | content3 |
|
708 | content3 | |
684 | content1_content2_content3_content4-tracked.orig: |
|
709 | content1_content2_content3_content4-tracked.orig: | |
685 | content4 |
|
710 | content4 | |
686 | content1_content2_missing_content4-tracked.orig: |
|
711 | content1_content2_missing_content4-tracked.orig: | |
687 | content4 |
|
712 | content4 | |
688 | missing_content2_content2_content4-tracked.orig: |
|
713 | missing_content2_content2_content4-tracked.orig: | |
689 | content4 |
|
714 | content4 | |
690 | missing_content2_content3_content3-tracked.orig: |
|
715 | missing_content2_content3_content3-tracked.orig: | |
691 | content3 |
|
716 | content3 | |
692 | missing_content2_content3_content4-tracked.orig: |
|
717 | missing_content2_content3_content4-tracked.orig: | |
693 | content4 |
|
718 | content4 | |
694 | missing_content2_missing_content4-tracked.orig: |
|
719 | missing_content2_missing_content4-tracked.orig: | |
695 | content4 |
|
720 | content4 | |
696 | missing_content2_missing_content4-untracked.orig: |
|
721 | missing_content2_missing_content4-untracked.orig: | |
697 | content4 |
|
722 | content4 | |
698 |
|
723 | |||
699 | Re-resolve and check status |
|
724 | Re-resolve and check status | |
700 |
|
725 | |||
701 | $ hg resolve --unmark --all |
|
726 | $ hg resolve --unmark --all | |
702 | $ hg resolve --all --tool :local |
|
727 | $ hg resolve --all --tool :local | |
703 | (no more unresolved files) |
|
728 | (no more unresolved files) | |
704 | $ hg resolve --unmark --all |
|
729 | $ hg resolve --unmark --all | |
705 | $ hg resolve --all --tool internal:merge3 |
|
730 | $ hg resolve --all --tool internal:merge3 | |
706 |
other [merge rev] |
|
731 | file content1_content2_content1_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
732 | What do you want to do? | |||
707 |
|
|
733 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
708 |
other [merge rev] |
|
734 | file content1_content2_content1_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
735 | What do you want to do? | |||
709 |
|
|
736 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
710 | merging content1_content2_content1_content4-tracked |
|
737 | merging content1_content2_content1_content4-tracked | |
711 |
other [merge rev] |
|
738 | file content1_content2_content1_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
739 | What do you want to do? | |||
712 |
|
|
740 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
713 |
other [merge rev] |
|
741 | file content1_content2_content1_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
742 | What do you want to do? | |||
714 |
|
|
743 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
715 |
other [merge rev] |
|
744 | file content1_content2_content1_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
745 | What do you want to do? | |||
716 |
|
|
746 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
717 | merging content1_content2_content2_content1-tracked |
|
747 | merging content1_content2_content2_content1-tracked | |
718 |
other [merge rev] |
|
748 | file content1_content2_content2_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
749 | What do you want to do? | |||
719 |
|
|
750 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
720 |
other [merge rev] |
|
751 | file content1_content2_content2_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
752 | What do you want to do? | |||
721 |
|
|
753 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
722 | merging content1_content2_content2_content4-tracked |
|
754 | merging content1_content2_content2_content4-tracked | |
723 |
other [merge rev] |
|
755 | file content1_content2_content2_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
756 | What do you want to do? | |||
724 |
|
|
757 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
725 |
other [merge rev] |
|
758 | file content1_content2_content2_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
759 | What do you want to do? | |||
726 |
|
|
760 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
727 |
other [merge rev] |
|
761 | file content1_content2_content2_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
762 | What do you want to do? | |||
728 |
|
|
763 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
729 | merging content1_content2_content3_content1-tracked |
|
764 | merging content1_content2_content3_content1-tracked | |
730 |
other [merge rev] |
|
765 | file content1_content2_content3_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
766 | What do you want to do? | |||
731 |
|
|
767 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
732 |
other [merge rev] |
|
768 | file content1_content2_content3_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
769 | What do you want to do? | |||
733 |
|
|
770 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
734 | merging content1_content2_content3_content3-tracked |
|
771 | merging content1_content2_content3_content3-tracked | |
735 |
other [merge rev] |
|
772 | file content1_content2_content3_content3-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
773 | What do you want to do? | |||
736 |
|
|
774 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
737 | merging content1_content2_content3_content4-tracked |
|
775 | merging content1_content2_content3_content4-tracked | |
738 |
other [merge rev] |
|
776 | file content1_content2_content3_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
777 | What do you want to do? | |||
739 |
|
|
778 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
740 |
other [merge rev] |
|
779 | file content1_content2_content3_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
780 | What do you want to do? | |||
741 |
|
|
781 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
742 |
other [merge rev] |
|
782 | file content1_content2_content3_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
783 | What do you want to do? | |||
743 |
|
|
784 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
744 | merging content1_content2_missing_content1-tracked |
|
785 | merging content1_content2_missing_content1-tracked | |
745 |
other [merge rev] |
|
786 | file content1_content2_missing_content1-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
787 | What do you want to do? | |||
746 |
|
|
788 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
747 |
other [merge rev] |
|
789 | file content1_content2_missing_content2-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
790 | What do you want to do? | |||
748 |
|
|
791 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
749 | merging content1_content2_missing_content4-tracked |
|
792 | merging content1_content2_missing_content4-tracked | |
750 |
other [merge rev] |
|
793 | file content1_content2_missing_content4-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
794 | What do you want to do? | |||
751 |
|
|
795 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
752 |
other [merge rev] |
|
796 | file content1_content2_missing_missing-tracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
797 | What do you want to do? | |||
753 |
|
|
798 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
754 |
other [merge rev] |
|
799 | file content1_content2_missing_missing-untracked was deleted in other [merge rev] but was modified in local [working copy]. | |
|
800 | What do you want to do? | |||
755 |
|
|
801 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
756 |
local [working copy] |
|
802 | file content1_missing_content1_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
803 | What do you want to do? | |||
757 |
|
|
804 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
758 |
local [working copy] |
|
805 | file content1_missing_content3_content3-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
806 | What do you want to do? | |||
759 |
|
|
807 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
760 |
local [working copy] |
|
808 | file content1_missing_content3_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
809 | What do you want to do? | |||
761 |
|
|
810 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
762 | local [working copy] changed content1_missing_missing_content4-tracked which other [merge rev] deleted |
|
811 | file content1_missing_missing_content4-tracked was deleted in local [working copy] but was modified in other [merge rev]. | |
|
812 | What do you want to do? | |||
763 |
|
|
813 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
764 | merging missing_content2_content2_content4-tracked |
|
814 | merging missing_content2_content2_content4-tracked | |
765 | merging missing_content2_content3_content3-tracked |
|
815 | merging missing_content2_content3_content3-tracked | |
766 | merging missing_content2_content3_content4-tracked |
|
816 | merging missing_content2_content3_content4-tracked | |
767 | merging missing_content2_missing_content4-tracked |
|
817 | merging missing_content2_missing_content4-tracked | |
768 | merging missing_content2_missing_content4-untracked |
|
818 | merging missing_content2_missing_content4-untracked | |
769 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') |
|
819 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') | |
770 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
820 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
771 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
821 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
772 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
822 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
773 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
823 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
774 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
824 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
775 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
825 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
776 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
826 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
777 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
827 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
778 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') |
|
828 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') | |
779 | [1] |
|
829 | [1] | |
780 | $ checkstatus > $TESTTMP/status2 2>&1 |
|
830 | $ checkstatus > $TESTTMP/status2 2>&1 | |
781 | $ cmp $TESTTMP/status1 $TESTTMP/status2 || diff -U8 $TESTTMP/status1 $TESTTMP/status2 |
|
831 | $ cmp $TESTTMP/status1 $TESTTMP/status2 || diff -U8 $TESTTMP/status1 $TESTTMP/status2 | |
782 |
|
832 | |||
783 | Set up working directory again |
|
833 | Set up working directory again | |
784 |
|
834 | |||
785 | $ hg -q update --clean 2 |
|
835 | $ hg -q update --clean 2 | |
786 | $ hg --config extensions.purge= purge |
|
836 | $ hg --config extensions.purge= purge | |
787 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc |
|
837 | $ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc | |
788 | $ hg addremove -q --similarity 0 |
|
838 | $ hg addremove -q --similarity 0 | |
789 | $ hg forget *_*_*_*-untracked |
|
839 | $ hg forget *_*_*_*-untracked | |
790 | $ rm *_*_*_missing-* |
|
840 | $ rm *_*_*_missing-* | |
791 |
|
841 | |||
792 | Merge with checkunknown = warn, see that behavior is the same as before |
|
842 | Merge with checkunknown = warn, see that behavior is the same as before | |
793 | $ hg merge -f --tool internal:merge3 'desc("remote")' --config merge.checkunknown=warn > $TESTTMP/merge-output-2 2>&1 |
|
843 | $ hg merge -f --tool internal:merge3 'desc("remote")' --config merge.checkunknown=warn > $TESTTMP/merge-output-2 2>&1 | |
794 | [1] |
|
844 | [1] | |
795 | $ cmp $TESTTMP/merge-output-1 $TESTTMP/merge-output-2 || diff -U8 $TESTTMP/merge-output-1 $TESTTMP/merge-output-2 |
|
845 | $ cmp $TESTTMP/merge-output-1 $TESTTMP/merge-output-2 || diff -U8 $TESTTMP/merge-output-1 $TESTTMP/merge-output-2 |
@@ -1,115 +1,116 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo foo > foo |
|
3 | $ echo foo > foo | |
4 | $ echo bar > bar |
|
4 | $ echo bar > bar | |
5 | $ hg ci -qAm 'add foo bar' |
|
5 | $ hg ci -qAm 'add foo bar' | |
6 |
|
6 | |||
7 | $ echo foo2 >> foo |
|
7 | $ echo foo2 >> foo | |
8 | $ echo bleh > bar |
|
8 | $ echo bleh > bar | |
9 | $ hg ci -m 'change foo bar' |
|
9 | $ hg ci -m 'change foo bar' | |
10 |
|
10 | |||
11 | $ hg up -qC 0 |
|
11 | $ hg up -qC 0 | |
12 | $ hg mv foo foo1 |
|
12 | $ hg mv foo foo1 | |
13 | $ echo foo1 > foo1 |
|
13 | $ echo foo1 > foo1 | |
14 | $ hg cat foo >> foo1 |
|
14 | $ hg cat foo >> foo1 | |
15 | $ hg ci -m 'mv foo foo1' |
|
15 | $ hg ci -m 'mv foo foo1' | |
16 | created new head |
|
16 | created new head | |
17 |
|
17 | |||
18 | $ hg merge |
|
18 | $ hg merge | |
19 | merging foo1 and foo to foo1 |
|
19 | merging foo1 and foo to foo1 | |
20 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
20 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
21 | (branch merge, don't forget to commit) |
|
21 | (branch merge, don't forget to commit) | |
22 |
|
22 | |||
23 | $ hg debugstate --nodates |
|
23 | $ hg debugstate --nodates | |
24 | m 0 -2 unset bar |
|
24 | m 0 -2 unset bar | |
25 | m 0 -2 unset foo1 |
|
25 | m 0 -2 unset foo1 | |
26 | copy: foo -> foo1 |
|
26 | copy: foo -> foo1 | |
27 |
|
27 | |||
28 | $ hg st -q |
|
28 | $ hg st -q | |
29 | M bar |
|
29 | M bar | |
30 | M foo1 |
|
30 | M foo1 | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | Removing foo1 and bar: |
|
33 | Removing foo1 and bar: | |
34 |
|
34 | |||
35 | $ cp foo1 F |
|
35 | $ cp foo1 F | |
36 | $ cp bar B |
|
36 | $ cp bar B | |
37 | $ hg rm -f foo1 bar |
|
37 | $ hg rm -f foo1 bar | |
38 |
|
38 | |||
39 | $ hg debugstate --nodates |
|
39 | $ hg debugstate --nodates | |
40 | r 0 -1 set bar |
|
40 | r 0 -1 set bar | |
41 | r 0 -1 set foo1 |
|
41 | r 0 -1 set foo1 | |
42 | copy: foo -> foo1 |
|
42 | copy: foo -> foo1 | |
43 |
|
43 | |||
44 | $ hg st -qC |
|
44 | $ hg st -qC | |
45 | R bar |
|
45 | R bar | |
46 | R foo1 |
|
46 | R foo1 | |
47 |
|
47 | |||
48 |
|
48 | |||
49 | Re-adding foo1 and bar: |
|
49 | Re-adding foo1 and bar: | |
50 |
|
50 | |||
51 | $ cp F foo1 |
|
51 | $ cp F foo1 | |
52 | $ cp B bar |
|
52 | $ cp B bar | |
53 | $ hg add -v foo1 bar |
|
53 | $ hg add -v foo1 bar | |
54 | adding bar |
|
54 | adding bar | |
55 | adding foo1 |
|
55 | adding foo1 | |
56 |
|
56 | |||
57 | $ hg debugstate --nodates |
|
57 | $ hg debugstate --nodates | |
58 | n 0 -2 unset bar |
|
58 | n 0 -2 unset bar | |
59 | n 0 -2 unset foo1 |
|
59 | n 0 -2 unset foo1 | |
60 | copy: foo -> foo1 |
|
60 | copy: foo -> foo1 | |
61 |
|
61 | |||
62 | $ hg st -qC |
|
62 | $ hg st -qC | |
63 | M bar |
|
63 | M bar | |
64 | M foo1 |
|
64 | M foo1 | |
65 | foo |
|
65 | foo | |
66 |
|
66 | |||
67 |
|
67 | |||
68 | Reverting foo1 and bar: |
|
68 | Reverting foo1 and bar: | |
69 |
|
69 | |||
70 | $ hg revert -vr . foo1 bar |
|
70 | $ hg revert -vr . foo1 bar | |
71 | saving current version of bar as bar.orig |
|
71 | saving current version of bar as bar.orig | |
72 | reverting bar |
|
72 | reverting bar | |
73 | saving current version of foo1 as foo1.orig |
|
73 | saving current version of foo1 as foo1.orig | |
74 | reverting foo1 |
|
74 | reverting foo1 | |
75 |
|
75 | |||
76 | $ hg debugstate --nodates |
|
76 | $ hg debugstate --nodates | |
77 | n 0 -2 unset bar |
|
77 | n 0 -2 unset bar | |
78 | n 0 -2 unset foo1 |
|
78 | n 0 -2 unset foo1 | |
79 | copy: foo -> foo1 |
|
79 | copy: foo -> foo1 | |
80 |
|
80 | |||
81 | $ hg st -qC |
|
81 | $ hg st -qC | |
82 | M bar |
|
82 | M bar | |
83 | M foo1 |
|
83 | M foo1 | |
84 | foo |
|
84 | foo | |
85 |
|
85 | |||
86 | $ hg diff |
|
86 | $ hg diff | |
87 |
|
87 | |||
88 | Merge should not overwrite local file that is untracked after remove |
|
88 | Merge should not overwrite local file that is untracked after remove | |
89 |
|
89 | |||
90 | $ rm * |
|
90 | $ rm * | |
91 | $ hg up -qC |
|
91 | $ hg up -qC | |
92 | $ hg rm bar |
|
92 | $ hg rm bar | |
93 | $ hg ci -m 'remove bar' |
|
93 | $ hg ci -m 'remove bar' | |
94 | $ echo 'memories of buried pirate treasure' > bar |
|
94 | $ echo 'memories of buried pirate treasure' > bar | |
95 | $ hg merge |
|
95 | $ hg merge | |
96 | bar: untracked file differs |
|
96 | bar: untracked file differs | |
97 | abort: untracked files in working directory differ from files in requested revision |
|
97 | abort: untracked files in working directory differ from files in requested revision | |
98 | [255] |
|
98 | [255] | |
99 | $ cat bar |
|
99 | $ cat bar | |
100 | memories of buried pirate treasure |
|
100 | memories of buried pirate treasure | |
101 |
|
101 | |||
102 | Those who use force will lose |
|
102 | Those who use force will lose | |
103 |
|
103 | |||
104 | $ hg merge -f |
|
104 | $ hg merge -f | |
105 |
other [merge rev] |
|
105 | file bar was deleted in other [merge rev] but was modified in local [working copy]. | |
|
106 | What do you want to do? | |||
106 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
107 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
107 | merging foo1 and foo to foo1 |
|
108 | merging foo1 and foo to foo1 | |
108 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
109 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
109 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
110 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
110 | [1] |
|
111 | [1] | |
111 | $ cat bar |
|
112 | $ cat bar | |
112 | bleh |
|
113 | bleh | |
113 | $ hg st |
|
114 | $ hg st | |
114 | M bar |
|
115 | M bar | |
115 | M foo1 |
|
116 | M foo1 |
@@ -1,139 +1,140 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg ci -qAm 'add a' |
|
4 | $ hg ci -qAm 'add a' | |
5 |
|
5 | |||
6 | $ hg init subrepo |
|
6 | $ hg init subrepo | |
7 | $ echo 'subrepo = http://example.net/libfoo' > .hgsub |
|
7 | $ echo 'subrepo = http://example.net/libfoo' > .hgsub | |
8 | $ hg ci -qAm 'added subrepo' |
|
8 | $ hg ci -qAm 'added subrepo' | |
9 |
|
9 | |||
10 | $ hg up -qC 0 |
|
10 | $ hg up -qC 0 | |
11 | $ echo ax > a |
|
11 | $ echo ax > a | |
12 | $ hg ci -m 'changed a' |
|
12 | $ hg ci -m 'changed a' | |
13 | created new head |
|
13 | created new head | |
14 |
|
14 | |||
15 | $ hg up -qC 1 |
|
15 | $ hg up -qC 1 | |
16 | $ cd subrepo |
|
16 | $ cd subrepo | |
17 | $ echo b > b |
|
17 | $ echo b > b | |
18 | $ hg add b |
|
18 | $ hg add b | |
19 | $ cd .. |
|
19 | $ cd .. | |
20 |
|
20 | |||
21 | Should fail, since there are added files to subrepo: |
|
21 | Should fail, since there are added files to subrepo: | |
22 |
|
22 | |||
23 | $ hg merge |
|
23 | $ hg merge | |
24 | abort: uncommitted changes in subrepository "subrepo" |
|
24 | abort: uncommitted changes in subrepository "subrepo" | |
25 | [255] |
|
25 | [255] | |
26 |
|
26 | |||
27 | Deleted files trigger a '+' marker in top level repos. Deleted files are also |
|
27 | Deleted files trigger a '+' marker in top level repos. Deleted files are also | |
28 | noticed by `update --check` in the top level repo. |
|
28 | noticed by `update --check` in the top level repo. | |
29 |
|
29 | |||
30 | $ hg ci -Sqm 'add b' |
|
30 | $ hg ci -Sqm 'add b' | |
31 | $ echo change > subrepo/b |
|
31 | $ echo change > subrepo/b | |
32 |
|
32 | |||
33 | $ hg ci -Sm 'change b' |
|
33 | $ hg ci -Sm 'change b' | |
34 | committing subrepository subrepo |
|
34 | committing subrepository subrepo | |
35 |
|
35 | |||
36 | $ rm a |
|
36 | $ rm a | |
37 | $ hg id |
|
37 | $ hg id | |
38 | 9bfe45a197d7+ tip |
|
38 | 9bfe45a197d7+ tip | |
39 | $ hg sum |
|
39 | $ hg sum | |
40 | parent: 4:9bfe45a197d7 tip |
|
40 | parent: 4:9bfe45a197d7 tip | |
41 | change b |
|
41 | change b | |
42 | branch: default |
|
42 | branch: default | |
43 | commit: 1 deleted (clean) |
|
43 | commit: 1 deleted (clean) | |
44 | update: 1 new changesets, 2 branch heads (merge) |
|
44 | update: 1 new changesets, 2 branch heads (merge) | |
45 | phases: 5 draft |
|
45 | phases: 5 draft | |
46 |
|
46 | |||
47 | $ hg up --check -r '.^' |
|
47 | $ hg up --check -r '.^' | |
48 | abort: uncommitted changes |
|
48 | abort: uncommitted changes | |
49 | [255] |
|
49 | [255] | |
50 | $ hg st -S |
|
50 | $ hg st -S | |
51 | ! a |
|
51 | ! a | |
52 | $ hg up -Cq . |
|
52 | $ hg up -Cq . | |
53 |
|
53 | |||
54 | Test that dirty is consistent through subrepos |
|
54 | Test that dirty is consistent through subrepos | |
55 |
|
55 | |||
56 | $ rm subrepo/b |
|
56 | $ rm subrepo/b | |
57 |
|
57 | |||
58 | A deleted subrepo file is flagged as dirty, like the top level repo |
|
58 | A deleted subrepo file is flagged as dirty, like the top level repo | |
59 |
|
59 | |||
60 | $ hg id --config extensions.blackbox= --config blackbox.dirty=True |
|
60 | $ hg id --config extensions.blackbox= --config blackbox.dirty=True | |
61 | 9bfe45a197d7+ tip |
|
61 | 9bfe45a197d7+ tip | |
62 | $ cat .hg/blackbox.log |
|
62 | $ cat .hg/blackbox.log | |
63 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !) |
|
63 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !) | |
64 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob) |
|
64 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob) | |
65 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob) |
|
65 | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob) | |
66 |
|
66 | |||
67 | TODO: a deleted file should be listed as such, like the top level repo |
|
67 | TODO: a deleted file should be listed as such, like the top level repo | |
68 |
|
68 | |||
69 | $ hg sum |
|
69 | $ hg sum | |
70 | parent: 4:9bfe45a197d7 tip |
|
70 | parent: 4:9bfe45a197d7 tip | |
71 | change b |
|
71 | change b | |
72 | branch: default |
|
72 | branch: default | |
73 | commit: (clean) |
|
73 | commit: (clean) | |
74 | update: 1 new changesets, 2 branch heads (merge) |
|
74 | update: 1 new changesets, 2 branch heads (merge) | |
75 | phases: 5 draft |
|
75 | phases: 5 draft | |
76 |
|
76 | |||
77 | Modified subrepo files are noticed by `update --check` and `summary` |
|
77 | Modified subrepo files are noticed by `update --check` and `summary` | |
78 |
|
78 | |||
79 | $ echo mod > subrepo/b |
|
79 | $ echo mod > subrepo/b | |
80 | $ hg st -S |
|
80 | $ hg st -S | |
81 | M subrepo/b |
|
81 | M subrepo/b | |
82 |
|
82 | |||
83 | $ hg up -r '.^' --check |
|
83 | $ hg up -r '.^' --check | |
84 | abort: uncommitted changes in subrepository "subrepo" |
|
84 | abort: uncommitted changes in subrepository "subrepo" | |
85 | [255] |
|
85 | [255] | |
86 |
|
86 | |||
87 | $ hg sum |
|
87 | $ hg sum | |
88 | parent: 4:9bfe45a197d7 tip |
|
88 | parent: 4:9bfe45a197d7 tip | |
89 | change b |
|
89 | change b | |
90 | branch: default |
|
90 | branch: default | |
91 | commit: 1 subrepos |
|
91 | commit: 1 subrepos | |
92 | update: 1 new changesets, 2 branch heads (merge) |
|
92 | update: 1 new changesets, 2 branch heads (merge) | |
93 | phases: 5 draft |
|
93 | phases: 5 draft | |
94 |
|
94 | |||
95 | TODO: why is -R needed here? If it's because the subrepo is treated as a |
|
95 | TODO: why is -R needed here? If it's because the subrepo is treated as a | |
96 | discrete unit, then this should probably warn or something. |
|
96 | discrete unit, then this should probably warn or something. | |
97 | $ hg revert -R subrepo --no-backup subrepo/b -r . |
|
97 | $ hg revert -R subrepo --no-backup subrepo/b -r . | |
98 |
|
98 | |||
99 | $ rm subrepo/b |
|
99 | $ rm subrepo/b | |
100 | $ hg st -S |
|
100 | $ hg st -S | |
101 | ! subrepo/b |
|
101 | ! subrepo/b | |
102 |
|
102 | |||
103 | `hg update --check` notices a subrepo with a missing file, like it notices a |
|
103 | `hg update --check` notices a subrepo with a missing file, like it notices a | |
104 | missing file in the top level repo. |
|
104 | missing file in the top level repo. | |
105 |
|
105 | |||
106 | $ hg up -r '.^' --check |
|
106 | $ hg up -r '.^' --check | |
107 | abort: uncommitted changes in subrepository "subrepo" |
|
107 | abort: uncommitted changes in subrepository "subrepo" | |
108 | [255] |
|
108 | [255] | |
109 |
|
109 | |||
110 | $ hg up -r '.^' --config ui.interactive=True << EOF |
|
110 | $ hg up -r '.^' --config ui.interactive=True << EOF | |
111 | > d |
|
111 | > d | |
112 | > EOF |
|
112 | > EOF | |
113 |
other [destination] |
|
113 | file b was deleted in other [destination] but was modified in local [working copy]. | |
|
114 | What do you want to do? | |||
114 |
|
|
115 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d | |
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 |
|
117 | |||
117 | XXX: There's a difference between wdir() and '.', so there should be a status. |
|
118 | XXX: There's a difference between wdir() and '.', so there should be a status. | |
118 | `hg files -S` from the top is also missing 'subrepo/b'. |
|
119 | `hg files -S` from the top is also missing 'subrepo/b'. | |
119 |
|
120 | |||
120 | $ hg st -S |
|
121 | $ hg st -S | |
121 | $ hg st -R subrepo |
|
122 | $ hg st -R subrepo | |
122 | $ hg files -R subrepo |
|
123 | $ hg files -R subrepo | |
123 | [1] |
|
124 | [1] | |
124 | $ hg files -R subrepo -r '.' |
|
125 | $ hg files -R subrepo -r '.' | |
125 | subrepo/b |
|
126 | subrepo/b | |
126 |
|
127 | |||
127 | $ hg bookmark -r tip @other |
|
128 | $ hg bookmark -r tip @other | |
128 | $ echo xyz > subrepo/c |
|
129 | $ echo xyz > subrepo/c | |
129 | $ hg ci -SAm 'add c' |
|
130 | $ hg ci -SAm 'add c' | |
130 | adding subrepo/c |
|
131 | adding subrepo/c | |
131 | committing subrepository subrepo |
|
132 | committing subrepository subrepo | |
132 | created new head |
|
133 | created new head | |
133 | $ rm subrepo/c |
|
134 | $ rm subrepo/c | |
134 |
|
135 | |||
135 | Merge sees deleted subrepo files as an uncommitted change |
|
136 | Merge sees deleted subrepo files as an uncommitted change | |
136 |
|
137 | |||
137 | $ hg merge @other |
|
138 | $ hg merge @other | |
138 | abort: uncommitted changes in subrepository "subrepo" |
|
139 | abort: uncommitted changes in subrepository "subrepo" | |
139 | [255] |
|
140 | [255] |
@@ -1,424 +1,426 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > drawdag=$TESTDIR/drawdag.py |
|
4 | > drawdag=$TESTDIR/drawdag.py | |
5 | > [alias] |
|
5 | > [alias] | |
6 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" |
|
6 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | $ hg init repo |
|
9 | $ hg init repo | |
10 | $ cd repo |
|
10 | $ cd repo | |
11 |
|
11 | |||
12 | $ echo A > a |
|
12 | $ echo A > a | |
13 | $ echo >> a |
|
13 | $ echo >> a | |
14 | $ hg ci -Am A |
|
14 | $ hg ci -Am A | |
15 | adding a |
|
15 | adding a | |
16 |
|
16 | |||
17 | $ echo B > a |
|
17 | $ echo B > a | |
18 | $ echo >> a |
|
18 | $ echo >> a | |
19 | $ hg ci -m B |
|
19 | $ hg ci -m B | |
20 |
|
20 | |||
21 | $ echo C > a |
|
21 | $ echo C > a | |
22 | $ echo >> a |
|
22 | $ echo >> a | |
23 | $ hg ci -m C |
|
23 | $ hg ci -m C | |
24 |
|
24 | |||
25 | $ hg up -q -C 0 |
|
25 | $ hg up -q -C 0 | |
26 |
|
26 | |||
27 | $ echo D >> a |
|
27 | $ echo D >> a | |
28 | $ hg ci -Am AD |
|
28 | $ hg ci -Am AD | |
29 | created new head |
|
29 | created new head | |
30 |
|
30 | |||
31 | $ hg tglog |
|
31 | $ hg tglog | |
32 | @ 3: 3878212183bd 'AD' |
|
32 | @ 3: 3878212183bd 'AD' | |
33 | | |
|
33 | | | |
34 | | o 2: 30ae917c0e4f 'C' |
|
34 | | o 2: 30ae917c0e4f 'C' | |
35 | | | |
|
35 | | | | |
36 | | o 1: 0f4f7cb4f549 'B' |
|
36 | | o 1: 0f4f7cb4f549 'B' | |
37 | |/ |
|
37 | |/ | |
38 | o 0: 1e635d440a73 'A' |
|
38 | o 0: 1e635d440a73 'A' | |
39 |
|
39 | |||
40 | $ hg rebase -s 1 -d 3 |
|
40 | $ hg rebase -s 1 -d 3 | |
41 | rebasing 1:0f4f7cb4f549 "B" |
|
41 | rebasing 1:0f4f7cb4f549 "B" | |
42 | merging a |
|
42 | merging a | |
43 | rebasing 2:30ae917c0e4f "C" |
|
43 | rebasing 2:30ae917c0e4f "C" | |
44 | merging a |
|
44 | merging a | |
45 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg |
|
45 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg | |
46 |
|
46 | |||
47 | $ hg tglog |
|
47 | $ hg tglog | |
48 | o 3: 25773bc4b4b0 'C' |
|
48 | o 3: 25773bc4b4b0 'C' | |
49 | | |
|
49 | | | |
50 | o 2: c09015405f75 'B' |
|
50 | o 2: c09015405f75 'B' | |
51 | | |
|
51 | | | |
52 | @ 1: 3878212183bd 'AD' |
|
52 | @ 1: 3878212183bd 'AD' | |
53 | | |
|
53 | | | |
54 | o 0: 1e635d440a73 'A' |
|
54 | o 0: 1e635d440a73 'A' | |
55 |
|
55 | |||
56 |
|
56 | |||
57 | $ cd .. |
|
57 | $ cd .. | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Test rebasing of merges with ancestors of the rebase destination - a situation |
|
60 | Test rebasing of merges with ancestors of the rebase destination - a situation | |
61 | that often happens when trying to recover from repeated merging with a mainline |
|
61 | that often happens when trying to recover from repeated merging with a mainline | |
62 | branch. |
|
62 | branch. | |
63 |
|
63 | |||
64 | The test case creates a dev branch that contains a couple of merges from the |
|
64 | The test case creates a dev branch that contains a couple of merges from the | |
65 | default branch. When rebasing to the default branch, these merges would be |
|
65 | default branch. When rebasing to the default branch, these merges would be | |
66 | merges with ancestors on the same branch. The merges _could_ contain some |
|
66 | merges with ancestors on the same branch. The merges _could_ contain some | |
67 | interesting conflict resolutions or additional changes in the merge commit, but |
|
67 | interesting conflict resolutions or additional changes in the merge commit, but | |
68 | that is mixed up with the actual merge stuff and there is in general no way to |
|
68 | that is mixed up with the actual merge stuff and there is in general no way to | |
69 | separate them. |
|
69 | separate them. | |
70 |
|
70 | |||
71 | Note: The dev branch contains _no_ changes to f-default. It might be unclear |
|
71 | Note: The dev branch contains _no_ changes to f-default. It might be unclear | |
72 | how rebasing of ancestor merges should be handled, but the current behavior |
|
72 | how rebasing of ancestor merges should be handled, but the current behavior | |
73 | with spurious prompts for conflicts in files that didn't change seems very |
|
73 | with spurious prompts for conflicts in files that didn't change seems very | |
74 | wrong. |
|
74 | wrong. | |
75 |
|
75 | |||
76 | $ hg init ancestor-merge |
|
76 | $ hg init ancestor-merge | |
77 | $ cd ancestor-merge |
|
77 | $ cd ancestor-merge | |
78 |
|
78 | |||
79 | $ touch f-default |
|
79 | $ touch f-default | |
80 | $ hg ci -Aqm 'default: create f-default' |
|
80 | $ hg ci -Aqm 'default: create f-default' | |
81 |
|
81 | |||
82 | $ hg branch -q dev |
|
82 | $ hg branch -q dev | |
83 | $ hg ci -qm 'dev: create branch' |
|
83 | $ hg ci -qm 'dev: create branch' | |
84 |
|
84 | |||
85 | $ echo stuff > f-dev |
|
85 | $ echo stuff > f-dev | |
86 | $ hg ci -Aqm 'dev: f-dev stuff' |
|
86 | $ hg ci -Aqm 'dev: f-dev stuff' | |
87 |
|
87 | |||
88 | $ hg up -q default |
|
88 | $ hg up -q default | |
89 | $ echo stuff > f-default |
|
89 | $ echo stuff > f-default | |
90 | $ hg ci -m 'default: f-default stuff' |
|
90 | $ hg ci -m 'default: f-default stuff' | |
91 |
|
91 | |||
92 | $ hg up -q dev |
|
92 | $ hg up -q dev | |
93 | $ hg merge -q default |
|
93 | $ hg merge -q default | |
94 | $ hg ci -m 'dev: merge default' |
|
94 | $ hg ci -m 'dev: merge default' | |
95 |
|
95 | |||
96 | $ hg up -q default |
|
96 | $ hg up -q default | |
97 | $ hg rm f-default |
|
97 | $ hg rm f-default | |
98 | $ hg ci -m 'default: remove f-default' |
|
98 | $ hg ci -m 'default: remove f-default' | |
99 |
|
99 | |||
100 | $ hg up -q dev |
|
100 | $ hg up -q dev | |
101 | $ hg merge -q default |
|
101 | $ hg merge -q default | |
102 | $ hg ci -m 'dev: merge default' |
|
102 | $ hg ci -m 'dev: merge default' | |
103 |
|
103 | |||
104 | $ hg up -q default |
|
104 | $ hg up -q default | |
105 | $ echo stuff > f-other |
|
105 | $ echo stuff > f-other | |
106 | $ hg ci -Aqm 'default: f-other stuff' |
|
106 | $ hg ci -Aqm 'default: f-other stuff' | |
107 |
|
107 | |||
108 | $ hg tglog |
|
108 | $ hg tglog | |
109 | @ 7: e08089805d82 'default: f-other stuff' |
|
109 | @ 7: e08089805d82 'default: f-other stuff' | |
110 | | |
|
110 | | | |
111 | | o 6: 9455ee510502 'dev: merge default' dev |
|
111 | | o 6: 9455ee510502 'dev: merge default' dev | |
112 | |/| |
|
112 | |/| | |
113 | o | 5: 462860db70a1 'default: remove f-default' |
|
113 | o | 5: 462860db70a1 'default: remove f-default' | |
114 | | | |
|
114 | | | | |
115 | | o 4: 4b019212aaf6 'dev: merge default' dev |
|
115 | | o 4: 4b019212aaf6 'dev: merge default' dev | |
116 | |/| |
|
116 | |/| | |
117 | o | 3: f157ecfd2b6b 'default: f-default stuff' |
|
117 | o | 3: f157ecfd2b6b 'default: f-default stuff' | |
118 | | | |
|
118 | | | | |
119 | | o 2: ec2c14fb2984 'dev: f-dev stuff' dev |
|
119 | | o 2: ec2c14fb2984 'dev: f-dev stuff' dev | |
120 | | | |
|
120 | | | | |
121 | | o 1: 1d1a643d390e 'dev: create branch' dev |
|
121 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
122 | |/ |
|
122 | |/ | |
123 | o 0: e90e8eb90b6f 'default: create f-default' |
|
123 | o 0: e90e8eb90b6f 'default: create f-default' | |
124 |
|
124 | |||
125 | $ hg clone -qU . ../ancestor-merge-2 |
|
125 | $ hg clone -qU . ../ancestor-merge-2 | |
126 |
|
126 | |||
127 | Full rebase all the way back from branching point: |
|
127 | Full rebase all the way back from branching point: | |
128 |
|
128 | |||
129 | $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF |
|
129 | $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF | |
130 | > c |
|
130 | > c | |
131 | > EOF |
|
131 | > EOF | |
132 | rebasing 1:1d1a643d390e "dev: create branch" |
|
132 | rebasing 1:1d1a643d390e "dev: create branch" | |
133 | note: rebase of 1:1d1a643d390e created no changes to commit |
|
133 | note: rebase of 1:1d1a643d390e created no changes to commit | |
134 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
134 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
135 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
135 | rebasing 4:4b019212aaf6 "dev: merge default" | |
136 | other [source] changed f-default which local [dest] deleted |
|
136 | file f-default was deleted in other [source] but was modified in local [dest]. | |
|
137 | What do you want to do? | |||
137 |
|
|
138 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
138 | rebasing 6:9455ee510502 "dev: merge default" |
|
139 | rebasing 6:9455ee510502 "dev: merge default" | |
139 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg |
|
140 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg | |
140 | $ hg tglog |
|
141 | $ hg tglog | |
141 | o 6: fbc098e72227 'dev: merge default' |
|
142 | o 6: fbc098e72227 'dev: merge default' | |
142 | | |
|
143 | | | |
143 | o 5: eda7b7f46f5d 'dev: merge default' |
|
144 | o 5: eda7b7f46f5d 'dev: merge default' | |
144 | | |
|
145 | | | |
145 | o 4: 3e075b1c0a40 'dev: f-dev stuff' |
|
146 | o 4: 3e075b1c0a40 'dev: f-dev stuff' | |
146 | | |
|
147 | | | |
147 | @ 3: e08089805d82 'default: f-other stuff' |
|
148 | @ 3: e08089805d82 'default: f-other stuff' | |
148 | | |
|
149 | | | |
149 | o 2: 462860db70a1 'default: remove f-default' |
|
150 | o 2: 462860db70a1 'default: remove f-default' | |
150 | | |
|
151 | | | |
151 | o 1: f157ecfd2b6b 'default: f-default stuff' |
|
152 | o 1: f157ecfd2b6b 'default: f-default stuff' | |
152 | | |
|
153 | | | |
153 | o 0: e90e8eb90b6f 'default: create f-default' |
|
154 | o 0: e90e8eb90b6f 'default: create f-default' | |
154 |
|
155 | |||
155 | Grafty cherry picking rebasing: |
|
156 | Grafty cherry picking rebasing: | |
156 |
|
157 | |||
157 | $ cd ../ancestor-merge-2 |
|
158 | $ cd ../ancestor-merge-2 | |
158 |
|
159 | |||
159 | $ hg phase -fdr0: |
|
160 | $ hg phase -fdr0: | |
160 | $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF |
|
161 | $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF | |
161 | > c |
|
162 | > c | |
162 | > EOF |
|
163 | > EOF | |
163 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
164 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
164 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
165 | rebasing 4:4b019212aaf6 "dev: merge default" | |
165 | other [source] changed f-default which local [dest] deleted |
|
166 | file f-default was deleted in other [source] but was modified in local [dest]. | |
|
167 | What do you want to do? | |||
166 |
|
|
168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
167 | rebasing 6:9455ee510502 "dev: merge default" |
|
169 | rebasing 6:9455ee510502 "dev: merge default" | |
168 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg |
|
170 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg | |
169 | $ hg tglog |
|
171 | $ hg tglog | |
170 | o 7: fbc098e72227 'dev: merge default' |
|
172 | o 7: fbc098e72227 'dev: merge default' | |
171 | | |
|
173 | | | |
172 | o 6: eda7b7f46f5d 'dev: merge default' |
|
174 | o 6: eda7b7f46f5d 'dev: merge default' | |
173 | | |
|
175 | | | |
174 | o 5: 3e075b1c0a40 'dev: f-dev stuff' |
|
176 | o 5: 3e075b1c0a40 'dev: f-dev stuff' | |
175 | | |
|
177 | | | |
176 | o 4: e08089805d82 'default: f-other stuff' |
|
178 | o 4: e08089805d82 'default: f-other stuff' | |
177 | | |
|
179 | | | |
178 | o 3: 462860db70a1 'default: remove f-default' |
|
180 | o 3: 462860db70a1 'default: remove f-default' | |
179 | | |
|
181 | | | |
180 | o 2: f157ecfd2b6b 'default: f-default stuff' |
|
182 | o 2: f157ecfd2b6b 'default: f-default stuff' | |
181 | | |
|
183 | | | |
182 | | o 1: 1d1a643d390e 'dev: create branch' dev |
|
184 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
183 | |/ |
|
185 | |/ | |
184 | o 0: e90e8eb90b6f 'default: create f-default' |
|
186 | o 0: e90e8eb90b6f 'default: create f-default' | |
185 |
|
187 | |||
186 | $ cd .. |
|
188 | $ cd .. | |
187 |
|
189 | |||
188 |
|
190 | |||
189 | Test order of parents of rebased merged with un-rebased changes as p1. |
|
191 | Test order of parents of rebased merged with un-rebased changes as p1. | |
190 |
|
192 | |||
191 | $ hg init parentorder |
|
193 | $ hg init parentorder | |
192 | $ cd parentorder |
|
194 | $ cd parentorder | |
193 | $ touch f |
|
195 | $ touch f | |
194 | $ hg ci -Aqm common |
|
196 | $ hg ci -Aqm common | |
195 | $ touch change |
|
197 | $ touch change | |
196 | $ hg ci -Aqm change |
|
198 | $ hg ci -Aqm change | |
197 | $ touch target |
|
199 | $ touch target | |
198 | $ hg ci -Aqm target |
|
200 | $ hg ci -Aqm target | |
199 | $ hg up -qr 0 |
|
201 | $ hg up -qr 0 | |
200 | $ touch outside |
|
202 | $ touch outside | |
201 | $ hg ci -Aqm outside |
|
203 | $ hg ci -Aqm outside | |
202 | $ hg merge -qr 1 |
|
204 | $ hg merge -qr 1 | |
203 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' |
|
205 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' | |
204 | $ hg par |
|
206 | $ hg par | |
205 | changeset: 4:6990226659be |
|
207 | changeset: 4:6990226659be | |
206 | tag: tip |
|
208 | tag: tip | |
207 | parent: 3:f59da8fc0fcf |
|
209 | parent: 3:f59da8fc0fcf | |
208 | parent: 1:dd40c13f7a6f |
|
210 | parent: 1:dd40c13f7a6f | |
209 | user: test |
|
211 | user: test | |
210 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
212 | date: Thu Jan 01 00:00:00 1970 +0000 | |
211 | summary: merge p1 3=outside p2 1=ancestor |
|
213 | summary: merge p1 3=outside p2 1=ancestor | |
212 |
|
214 | |||
213 | $ hg up -qr 1 |
|
215 | $ hg up -qr 1 | |
214 | $ hg merge -qr 3 |
|
216 | $ hg merge -qr 3 | |
215 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' |
|
217 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' | |
216 | $ hg par |
|
218 | $ hg par | |
217 | changeset: 5:a57575f79074 |
|
219 | changeset: 5:a57575f79074 | |
218 | tag: tip |
|
220 | tag: tip | |
219 | parent: 1:dd40c13f7a6f |
|
221 | parent: 1:dd40c13f7a6f | |
220 | parent: 3:f59da8fc0fcf |
|
222 | parent: 3:f59da8fc0fcf | |
221 | user: test |
|
223 | user: test | |
222 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
223 | summary: merge p1 1=ancestor p2 3=outside |
|
225 | summary: merge p1 1=ancestor p2 3=outside | |
224 |
|
226 | |||
225 | $ hg tglog |
|
227 | $ hg tglog | |
226 | @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside' |
|
228 | @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside' | |
227 | |\ |
|
229 | |\ | |
228 | +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor' |
|
230 | +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor' | |
229 | | |/ |
|
231 | | |/ | |
230 | | o 3: f59da8fc0fcf 'outside' |
|
232 | | o 3: f59da8fc0fcf 'outside' | |
231 | | | |
|
233 | | | | |
232 | +---o 2: a60552eb93fb 'target' |
|
234 | +---o 2: a60552eb93fb 'target' | |
233 | | | |
|
235 | | | | |
234 | o | 1: dd40c13f7a6f 'change' |
|
236 | o | 1: dd40c13f7a6f 'change' | |
235 | |/ |
|
237 | |/ | |
236 | o 0: 02f0f58d5300 'common' |
|
238 | o 0: 02f0f58d5300 'common' | |
237 |
|
239 | |||
238 | $ hg rebase -r 4 -d 2 |
|
240 | $ hg rebase -r 4 -d 2 | |
239 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" |
|
241 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" | |
240 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg |
|
242 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg | |
241 | $ hg tip |
|
243 | $ hg tip | |
242 | changeset: 5:cca50676b1c5 |
|
244 | changeset: 5:cca50676b1c5 | |
243 | tag: tip |
|
245 | tag: tip | |
244 | parent: 2:a60552eb93fb |
|
246 | parent: 2:a60552eb93fb | |
245 | parent: 3:f59da8fc0fcf |
|
247 | parent: 3:f59da8fc0fcf | |
246 | user: test |
|
248 | user: test | |
247 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | date: Thu Jan 01 00:00:00 1970 +0000 | |
248 | summary: merge p1 3=outside p2 1=ancestor |
|
250 | summary: merge p1 3=outside p2 1=ancestor | |
249 |
|
251 | |||
250 | $ hg rebase -r 4 -d 2 |
|
252 | $ hg rebase -r 4 -d 2 | |
251 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" |
|
253 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" | |
252 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg |
|
254 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg | |
253 | $ hg tip |
|
255 | $ hg tip | |
254 | changeset: 5:f9daf77ffe76 |
|
256 | changeset: 5:f9daf77ffe76 | |
255 | tag: tip |
|
257 | tag: tip | |
256 | parent: 2:a60552eb93fb |
|
258 | parent: 2:a60552eb93fb | |
257 | parent: 3:f59da8fc0fcf |
|
259 | parent: 3:f59da8fc0fcf | |
258 | user: test |
|
260 | user: test | |
259 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
261 | date: Thu Jan 01 00:00:00 1970 +0000 | |
260 | summary: merge p1 1=ancestor p2 3=outside |
|
262 | summary: merge p1 1=ancestor p2 3=outside | |
261 |
|
263 | |||
262 | $ hg tglog |
|
264 | $ hg tglog | |
263 | @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' |
|
265 | @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
264 | |\ |
|
266 | |\ | |
265 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' |
|
267 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
266 | | |/ |
|
268 | | |/ | |
267 | | o 3: f59da8fc0fcf 'outside' |
|
269 | | o 3: f59da8fc0fcf 'outside' | |
268 | | | |
|
270 | | | | |
269 | o | 2: a60552eb93fb 'target' |
|
271 | o | 2: a60552eb93fb 'target' | |
270 | | | |
|
272 | | | | |
271 | o | 1: dd40c13f7a6f 'change' |
|
273 | o | 1: dd40c13f7a6f 'change' | |
272 | |/ |
|
274 | |/ | |
273 | o 0: 02f0f58d5300 'common' |
|
275 | o 0: 02f0f58d5300 'common' | |
274 |
|
276 | |||
275 | rebase of merge of ancestors |
|
277 | rebase of merge of ancestors | |
276 |
|
278 | |||
277 | $ hg up -qr 2 |
|
279 | $ hg up -qr 2 | |
278 | $ hg merge -qr 3 |
|
280 | $ hg merge -qr 3 | |
279 | $ echo 'other change while merging future "rebase ancestors"' > other |
|
281 | $ echo 'other change while merging future "rebase ancestors"' > other | |
280 | $ hg ci -Aqm 'merge rebase ancestors' |
|
282 | $ hg ci -Aqm 'merge rebase ancestors' | |
281 | $ hg rebase -d 5 -v |
|
283 | $ hg rebase -d 5 -v | |
282 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) |
|
284 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) | |
283 | resolving manifests |
|
285 | resolving manifests | |
284 | removing other |
|
286 | removing other | |
285 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf |
|
287 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf | |
286 |
|
288 | |||
287 | calculating bids for ancestor a60552eb93fb |
|
289 | calculating bids for ancestor a60552eb93fb | |
288 | resolving manifests |
|
290 | resolving manifests | |
289 |
|
291 | |||
290 | calculating bids for ancestor f59da8fc0fcf |
|
292 | calculating bids for ancestor f59da8fc0fcf | |
291 | resolving manifests |
|
293 | resolving manifests | |
292 |
|
294 | |||
293 | auction for merging merge bids |
|
295 | auction for merging merge bids | |
294 | other: consensus for g |
|
296 | other: consensus for g | |
295 | end of auction |
|
297 | end of auction | |
296 |
|
298 | |||
297 | getting other |
|
299 | getting other | |
298 | committing files: |
|
300 | committing files: | |
299 | other |
|
301 | other | |
300 | committing manifest |
|
302 | committing manifest | |
301 | committing changelog |
|
303 | committing changelog | |
302 | rebase merging completed |
|
304 | rebase merging completed | |
303 | 1 changesets found |
|
305 | 1 changesets found | |
304 | uncompressed size of bundle content: |
|
306 | uncompressed size of bundle content: | |
305 | 199 (changelog) |
|
307 | 199 (changelog) | |
306 | 216 (manifests) |
|
308 | 216 (manifests) | |
307 | 182 other |
|
309 | 182 other | |
308 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg |
|
310 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg | |
309 | 1 changesets found |
|
311 | 1 changesets found | |
310 | uncompressed size of bundle content: |
|
312 | uncompressed size of bundle content: | |
311 | 254 (changelog) |
|
313 | 254 (changelog) | |
312 | 167 (manifests) |
|
314 | 167 (manifests) | |
313 | 182 other |
|
315 | 182 other | |
314 | adding branch |
|
316 | adding branch | |
315 | adding changesets |
|
317 | adding changesets | |
316 | adding manifests |
|
318 | adding manifests | |
317 | adding file changes |
|
319 | adding file changes | |
318 | added 1 changesets with 1 changes to 1 files |
|
320 | added 1 changesets with 1 changes to 1 files | |
319 | rebase completed |
|
321 | rebase completed | |
320 | $ hg tglog |
|
322 | $ hg tglog | |
321 | @ 6: 113755df812b 'merge rebase ancestors' |
|
323 | @ 6: 113755df812b 'merge rebase ancestors' | |
322 | | |
|
324 | | | |
323 | o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' |
|
325 | o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
324 | |\ |
|
326 | |\ | |
325 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' |
|
327 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
326 | | |/ |
|
328 | | |/ | |
327 | | o 3: f59da8fc0fcf 'outside' |
|
329 | | o 3: f59da8fc0fcf 'outside' | |
328 | | | |
|
330 | | | | |
329 | o | 2: a60552eb93fb 'target' |
|
331 | o | 2: a60552eb93fb 'target' | |
330 | | | |
|
332 | | | | |
331 | o | 1: dd40c13f7a6f 'change' |
|
333 | o | 1: dd40c13f7a6f 'change' | |
332 | |/ |
|
334 | |/ | |
333 | o 0: 02f0f58d5300 'common' |
|
335 | o 0: 02f0f58d5300 'common' | |
334 |
|
336 | |||
335 | Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge |
|
337 | Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge | |
336 | may include unwanted content: |
|
338 | may include unwanted content: | |
337 |
|
339 | |||
338 | $ hg init $TESTTMP/dual-merge-base1 |
|
340 | $ hg init $TESTTMP/dual-merge-base1 | |
339 | $ cd $TESTTMP/dual-merge-base1 |
|
341 | $ cd $TESTTMP/dual-merge-base1 | |
340 | $ hg debugdrawdag <<'EOS' |
|
342 | $ hg debugdrawdag <<'EOS' | |
341 | > F |
|
343 | > F | |
342 | > /| |
|
344 | > /| | |
343 | > D E |
|
345 | > D E | |
344 | > | | |
|
346 | > | | | |
345 | > B C |
|
347 | > B C | |
346 | > |/ |
|
348 | > |/ | |
347 | > A Z |
|
349 | > A Z | |
348 | > |/ |
|
350 | > |/ | |
349 | > R |
|
351 | > R | |
350 | > EOS |
|
352 | > EOS | |
351 | $ hg rebase -r D+E+F -d Z |
|
353 | $ hg rebase -r D+E+F -d Z | |
352 | rebasing 5:5f2c926dfecf "D" (D) |
|
354 | rebasing 5:5f2c926dfecf "D" (D) | |
353 | rebasing 6:b296604d9846 "E" (E) |
|
355 | rebasing 6:b296604d9846 "E" (E) | |
354 | rebasing 7:caa9781e507d "F" (F tip) |
|
356 | rebasing 7:caa9781e507d "F" (F tip) | |
355 | abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d |
|
357 | abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d | |
356 | [255] |
|
358 | [255] | |
357 |
|
359 | |||
358 | The warning does not get printed if there is no unwanted change detected: |
|
360 | The warning does not get printed if there is no unwanted change detected: | |
359 |
|
361 | |||
360 | $ hg init $TESTTMP/dual-merge-base2 |
|
362 | $ hg init $TESTTMP/dual-merge-base2 | |
361 | $ cd $TESTTMP/dual-merge-base2 |
|
363 | $ cd $TESTTMP/dual-merge-base2 | |
362 | $ hg debugdrawdag <<'EOS' |
|
364 | $ hg debugdrawdag <<'EOS' | |
363 | > D |
|
365 | > D | |
364 | > /| |
|
366 | > /| | |
365 | > B C |
|
367 | > B C | |
366 | > |/ |
|
368 | > |/ | |
367 | > A Z |
|
369 | > A Z | |
368 | > |/ |
|
370 | > |/ | |
369 | > R |
|
371 | > R | |
370 | > EOS |
|
372 | > EOS | |
371 | $ hg rebase -r B+C+D -d Z |
|
373 | $ hg rebase -r B+C+D -d Z | |
372 | rebasing 3:c1e6b162678d "B" (B) |
|
374 | rebasing 3:c1e6b162678d "B" (B) | |
373 | rebasing 4:d6003a550c2c "C" (C) |
|
375 | rebasing 4:d6003a550c2c "C" (C) | |
374 | rebasing 5:c8f78076273e "D" (D tip) |
|
376 | rebasing 5:c8f78076273e "D" (D tip) | |
375 | saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg |
|
377 | saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg | |
376 | $ hg manifest -r 'desc(D)' |
|
378 | $ hg manifest -r 'desc(D)' | |
377 | B |
|
379 | B | |
378 | C |
|
380 | C | |
379 | R |
|
381 | R | |
380 | Z |
|
382 | Z | |
381 |
|
383 | |||
382 | The merge base could be different from old p1 (changed parent becomes new p1): |
|
384 | The merge base could be different from old p1 (changed parent becomes new p1): | |
383 |
|
385 | |||
384 | $ hg init $TESTTMP/chosen-merge-base1 |
|
386 | $ hg init $TESTTMP/chosen-merge-base1 | |
385 | $ cd $TESTTMP/chosen-merge-base1 |
|
387 | $ cd $TESTTMP/chosen-merge-base1 | |
386 | $ hg debugdrawdag <<'EOS' |
|
388 | $ hg debugdrawdag <<'EOS' | |
387 | > F |
|
389 | > F | |
388 | > /| |
|
390 | > /| | |
389 | > D E |
|
391 | > D E | |
390 | > | | |
|
392 | > | | | |
391 | > B C Z |
|
393 | > B C Z | |
392 | > EOS |
|
394 | > EOS | |
393 | $ hg rebase -r D+F -d Z |
|
395 | $ hg rebase -r D+F -d Z | |
394 | rebasing 3:004dc1679908 "D" (D) |
|
396 | rebasing 3:004dc1679908 "D" (D) | |
395 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
397 | rebasing 5:4be4cbf6f206 "F" (F tip) | |
396 | saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg |
|
398 | saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg | |
397 | $ hg manifest -r 'desc(F)' |
|
399 | $ hg manifest -r 'desc(F)' | |
398 | C |
|
400 | C | |
399 | D |
|
401 | D | |
400 | E |
|
402 | E | |
401 | Z |
|
403 | Z | |
402 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
404 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' | |
403 | D |
|
405 | D | |
404 |
|
406 | |||
405 | $ hg init $TESTTMP/chosen-merge-base2 |
|
407 | $ hg init $TESTTMP/chosen-merge-base2 | |
406 | $ cd $TESTTMP/chosen-merge-base2 |
|
408 | $ cd $TESTTMP/chosen-merge-base2 | |
407 | $ hg debugdrawdag <<'EOS' |
|
409 | $ hg debugdrawdag <<'EOS' | |
408 | > F |
|
410 | > F | |
409 | > /| |
|
411 | > /| | |
410 | > D E |
|
412 | > D E | |
411 | > | | |
|
413 | > | | | |
412 | > B C Z |
|
414 | > B C Z | |
413 | > EOS |
|
415 | > EOS | |
414 | $ hg rebase -r E+F -d Z |
|
416 | $ hg rebase -r E+F -d Z | |
415 | rebasing 4:974e4943c210 "E" (E) |
|
417 | rebasing 4:974e4943c210 "E" (E) | |
416 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
418 | rebasing 5:4be4cbf6f206 "F" (F tip) | |
417 | saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg |
|
419 | saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg | |
418 | $ hg manifest -r 'desc(F)' |
|
420 | $ hg manifest -r 'desc(F)' | |
419 | B |
|
421 | B | |
420 | D |
|
422 | D | |
421 | E |
|
423 | E | |
422 | Z |
|
424 | Z | |
423 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
425 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' | |
424 | E |
|
426 | E |
@@ -1,1069 +1,1071 b'' | |||||
1 |
|
1 | |||
2 | $ mkdir -p t |
|
2 | $ mkdir -p t | |
3 | $ cd t |
|
3 | $ cd t | |
4 | $ cat <<EOF > merge |
|
4 | $ cat <<EOF > merge | |
5 | > import sys, os |
|
5 | > import sys, os | |
6 | > f = open(sys.argv[1], "wb") |
|
6 | > f = open(sys.argv[1], "wb") | |
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) |
|
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) | |
8 | > f.close() |
|
8 | > f.close() | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | perform a test merge with possible renaming |
|
11 | perform a test merge with possible renaming | |
12 | args: |
|
12 | args: | |
13 | $1 = action in local branch |
|
13 | $1 = action in local branch | |
14 | $2 = action in remote branch |
|
14 | $2 = action in remote branch | |
15 | $3 = action in working dir |
|
15 | $3 = action in working dir | |
16 | $4 = expected result |
|
16 | $4 = expected result | |
17 |
|
17 | |||
18 | $ tm() |
|
18 | $ tm() | |
19 | > { |
|
19 | > { | |
20 | > hg init t |
|
20 | > hg init t | |
21 | > cd t |
|
21 | > cd t | |
22 | > echo "[merge]" >> .hg/hgrc |
|
22 | > echo "[merge]" >> .hg/hgrc | |
23 | > echo "followcopies = 1" >> .hg/hgrc |
|
23 | > echo "followcopies = 1" >> .hg/hgrc | |
24 | > |
|
24 | > | |
25 | > # base |
|
25 | > # base | |
26 | > echo base > a |
|
26 | > echo base > a | |
27 | > echo base > rev # used to force commits |
|
27 | > echo base > rev # used to force commits | |
28 | > hg add a rev |
|
28 | > hg add a rev | |
29 | > hg ci -m "base" |
|
29 | > hg ci -m "base" | |
30 | > |
|
30 | > | |
31 | > # remote |
|
31 | > # remote | |
32 | > echo remote > rev |
|
32 | > echo remote > rev | |
33 | > if [ "$2" != "" ] ; then $2 ; fi |
|
33 | > if [ "$2" != "" ] ; then $2 ; fi | |
34 | > hg ci -m "remote" |
|
34 | > hg ci -m "remote" | |
35 | > |
|
35 | > | |
36 | > # local |
|
36 | > # local | |
37 | > hg co -q 0 |
|
37 | > hg co -q 0 | |
38 | > echo local > rev |
|
38 | > echo local > rev | |
39 | > if [ "$1" != "" ] ; then $1 ; fi |
|
39 | > if [ "$1" != "" ] ; then $1 ; fi | |
40 | > hg ci -m "local" |
|
40 | > hg ci -m "local" | |
41 | > |
|
41 | > | |
42 | > # working dir |
|
42 | > # working dir | |
43 | > echo local > rev |
|
43 | > echo local > rev | |
44 | > if [ "$3" != "" ] ; then $3 ; fi |
|
44 | > if [ "$3" != "" ] ; then $3 ; fi | |
45 | > |
|
45 | > | |
46 | > # merge |
|
46 | > # merge | |
47 | > echo "--------------" |
|
47 | > echo "--------------" | |
48 | > echo "test L:$1 R:$2 W:$3 - $4" |
|
48 | > echo "test L:$1 R:$2 W:$3 - $4" | |
49 | > echo "--------------" |
|
49 | > echo "--------------" | |
50 | > hg merge -y --debug --traceback --tool="$PYTHON ../merge" |
|
50 | > hg merge -y --debug --traceback --tool="$PYTHON ../merge" | |
51 | > |
|
51 | > | |
52 | > echo "--------------" |
|
52 | > echo "--------------" | |
53 | > hg status -camC -X rev |
|
53 | > hg status -camC -X rev | |
54 | > |
|
54 | > | |
55 | > hg ci -m "merge" |
|
55 | > hg ci -m "merge" | |
56 | > |
|
56 | > | |
57 | > echo "--------------" |
|
57 | > echo "--------------" | |
58 | > echo |
|
58 | > echo | |
59 | > |
|
59 | > | |
60 | > cd .. |
|
60 | > cd .. | |
61 | > rm -r t |
|
61 | > rm -r t | |
62 | > } |
|
62 | > } | |
63 | $ up() { |
|
63 | $ up() { | |
64 | > cp rev $1 |
|
64 | > cp rev $1 | |
65 | > hg add $1 2> /dev/null |
|
65 | > hg add $1 2> /dev/null | |
66 | > if [ "$2" != "" ] ; then |
|
66 | > if [ "$2" != "" ] ; then | |
67 | > cp rev $2 |
|
67 | > cp rev $2 | |
68 | > hg add $2 2> /dev/null |
|
68 | > hg add $2 2> /dev/null | |
69 | > fi |
|
69 | > fi | |
70 | > } |
|
70 | > } | |
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy |
|
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy | |
72 | $ um() { up $1; hg mv $1 $2; } |
|
72 | $ um() { up $1; hg mv $1 $2; } | |
73 | $ nc() { hg cp $1 $2; } # just copy |
|
73 | $ nc() { hg cp $1 $2; } # just copy | |
74 | $ nm() { hg mv $1 $2; } # just move |
|
74 | $ nm() { hg mv $1 $2; } # just move | |
75 | $ tm "up a " "nc a b" " " "1 get local a to b" |
|
75 | $ tm "up a " "nc a b" " " "1 get local a to b" | |
76 | created new head |
|
76 | created new head | |
77 | -------------- |
|
77 | -------------- | |
78 | test L:up a R:nc a b W: - 1 get local a to b |
|
78 | test L:up a R:nc a b W: - 1 get local a to b | |
79 | -------------- |
|
79 | -------------- | |
80 | searching for copies back to rev 1 |
|
80 | searching for copies back to rev 1 | |
81 | unmatched files in other: |
|
81 | unmatched files in other: | |
82 | b |
|
82 | b | |
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
84 | src: 'a' -> dst: 'b' * |
|
84 | src: 'a' -> dst: 'b' * | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | resolving manifests |
|
86 | resolving manifests | |
87 | branchmerge: True, force: False, partial: False |
|
87 | branchmerge: True, force: False, partial: False | |
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 |
|
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 | |
89 | preserving a for resolve of b |
|
89 | preserving a for resolve of b | |
90 | preserving rev for resolve of rev |
|
90 | preserving rev for resolve of rev | |
91 | starting 4 threads for background file closing (?) |
|
91 | starting 4 threads for background file closing (?) | |
92 | b: remote copied from a -> m (premerge) |
|
92 | b: remote copied from a -> m (premerge) | |
93 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
93 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
94 | merging a and b to b |
|
94 | merging a and b to b | |
95 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 |
|
95 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 | |
96 | premerge successful |
|
96 | premerge successful | |
97 | rev: versions differ -> m (premerge) |
|
97 | rev: versions differ -> m (premerge) | |
98 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
98 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
99 | merging rev |
|
99 | merging rev | |
100 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
100 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
101 | rev: versions differ -> m (merge) |
|
101 | rev: versions differ -> m (merge) | |
102 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
102 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
103 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
103 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
104 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
104 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
105 | merge tool returned: 0 |
|
105 | merge tool returned: 0 | |
106 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
106 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
107 | (branch merge, don't forget to commit) |
|
107 | (branch merge, don't forget to commit) | |
108 | -------------- |
|
108 | -------------- | |
109 | M b |
|
109 | M b | |
110 | a |
|
110 | a | |
111 | C a |
|
111 | C a | |
112 | -------------- |
|
112 | -------------- | |
113 |
|
113 | |||
114 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" |
|
114 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" | |
115 | created new head |
|
115 | created new head | |
116 | -------------- |
|
116 | -------------- | |
117 | test L:nc a b R:up a W: - 2 get rem change to a and b |
|
117 | test L:nc a b R:up a W: - 2 get rem change to a and b | |
118 | -------------- |
|
118 | -------------- | |
119 | searching for copies back to rev 1 |
|
119 | searching for copies back to rev 1 | |
120 | unmatched files in local: |
|
120 | unmatched files in local: | |
121 | b |
|
121 | b | |
122 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
122 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
123 | src: 'a' -> dst: 'b' * |
|
123 | src: 'a' -> dst: 'b' * | |
124 | checking for directory renames |
|
124 | checking for directory renames | |
125 | resolving manifests |
|
125 | resolving manifests | |
126 | branchmerge: True, force: False, partial: False |
|
126 | branchmerge: True, force: False, partial: False | |
127 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 |
|
127 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 | |
128 | preserving b for resolve of b |
|
128 | preserving b for resolve of b | |
129 | preserving rev for resolve of rev |
|
129 | preserving rev for resolve of rev | |
130 | a: remote is newer -> g |
|
130 | a: remote is newer -> g | |
131 | getting a |
|
131 | getting a | |
132 | b: local copied/moved from a -> m (premerge) |
|
132 | b: local copied/moved from a -> m (premerge) | |
133 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
133 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
134 | merging b and a to b |
|
134 | merging b and a to b | |
135 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
135 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 | |
136 | premerge successful |
|
136 | premerge successful | |
137 | rev: versions differ -> m (premerge) |
|
137 | rev: versions differ -> m (premerge) | |
138 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
138 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
139 | merging rev |
|
139 | merging rev | |
140 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
140 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
141 | rev: versions differ -> m (merge) |
|
141 | rev: versions differ -> m (merge) | |
142 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
142 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
143 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
143 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
144 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
144 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
145 | merge tool returned: 0 |
|
145 | merge tool returned: 0 | |
146 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
146 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
147 | (branch merge, don't forget to commit) |
|
147 | (branch merge, don't forget to commit) | |
148 | -------------- |
|
148 | -------------- | |
149 | M a |
|
149 | M a | |
150 | M b |
|
150 | M b | |
151 | a |
|
151 | a | |
152 | -------------- |
|
152 | -------------- | |
153 |
|
153 | |||
154 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" |
|
154 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" | |
155 | created new head |
|
155 | created new head | |
156 | -------------- |
|
156 | -------------- | |
157 | test L:up a R:nm a b W: - 3 get local a change to b, remove a |
|
157 | test L:up a R:nm a b W: - 3 get local a change to b, remove a | |
158 | -------------- |
|
158 | -------------- | |
159 | searching for copies back to rev 1 |
|
159 | searching for copies back to rev 1 | |
160 | unmatched files in other: |
|
160 | unmatched files in other: | |
161 | b |
|
161 | b | |
162 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
162 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
163 | src: 'a' -> dst: 'b' * |
|
163 | src: 'a' -> dst: 'b' * | |
164 | checking for directory renames |
|
164 | checking for directory renames | |
165 | resolving manifests |
|
165 | resolving manifests | |
166 | branchmerge: True, force: False, partial: False |
|
166 | branchmerge: True, force: False, partial: False | |
167 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a |
|
167 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a | |
168 | preserving a for resolve of b |
|
168 | preserving a for resolve of b | |
169 | preserving rev for resolve of rev |
|
169 | preserving rev for resolve of rev | |
170 | removing a |
|
170 | removing a | |
171 | starting 4 threads for background file closing (?) |
|
171 | starting 4 threads for background file closing (?) | |
172 | b: remote moved from a -> m (premerge) |
|
172 | b: remote moved from a -> m (premerge) | |
173 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
173 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
174 | merging a and b to b |
|
174 | merging a and b to b | |
175 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 |
|
175 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 | |
176 | premerge successful |
|
176 | premerge successful | |
177 | rev: versions differ -> m (premerge) |
|
177 | rev: versions differ -> m (premerge) | |
178 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
178 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
179 | merging rev |
|
179 | merging rev | |
180 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
180 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
181 | rev: versions differ -> m (merge) |
|
181 | rev: versions differ -> m (merge) | |
182 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
182 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
183 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
183 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
184 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
184 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
185 | merge tool returned: 0 |
|
185 | merge tool returned: 0 | |
186 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
186 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
187 | (branch merge, don't forget to commit) |
|
187 | (branch merge, don't forget to commit) | |
188 | -------------- |
|
188 | -------------- | |
189 | M b |
|
189 | M b | |
190 | a |
|
190 | a | |
191 | -------------- |
|
191 | -------------- | |
192 |
|
192 | |||
193 | $ tm "nm a b" "up a " " " "4 get remote change to b" |
|
193 | $ tm "nm a b" "up a " " " "4 get remote change to b" | |
194 | created new head |
|
194 | created new head | |
195 | -------------- |
|
195 | -------------- | |
196 | test L:nm a b R:up a W: - 4 get remote change to b |
|
196 | test L:nm a b R:up a W: - 4 get remote change to b | |
197 | -------------- |
|
197 | -------------- | |
198 | searching for copies back to rev 1 |
|
198 | searching for copies back to rev 1 | |
199 | unmatched files in local: |
|
199 | unmatched files in local: | |
200 | b |
|
200 | b | |
201 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
201 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
202 | src: 'a' -> dst: 'b' * |
|
202 | src: 'a' -> dst: 'b' * | |
203 | checking for directory renames |
|
203 | checking for directory renames | |
204 | resolving manifests |
|
204 | resolving manifests | |
205 | branchmerge: True, force: False, partial: False |
|
205 | branchmerge: True, force: False, partial: False | |
206 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 |
|
206 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 | |
207 | preserving b for resolve of b |
|
207 | preserving b for resolve of b | |
208 | preserving rev for resolve of rev |
|
208 | preserving rev for resolve of rev | |
209 | starting 4 threads for background file closing (?) |
|
209 | starting 4 threads for background file closing (?) | |
210 | b: local copied/moved from a -> m (premerge) |
|
210 | b: local copied/moved from a -> m (premerge) | |
211 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
211 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
212 | merging b and a to b |
|
212 | merging b and a to b | |
213 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
213 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 | |
214 | premerge successful |
|
214 | premerge successful | |
215 | rev: versions differ -> m (premerge) |
|
215 | rev: versions differ -> m (premerge) | |
216 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
216 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
217 | merging rev |
|
217 | merging rev | |
218 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
218 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
219 | rev: versions differ -> m (merge) |
|
219 | rev: versions differ -> m (merge) | |
220 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
220 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
221 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
221 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
222 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
222 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
223 | merge tool returned: 0 |
|
223 | merge tool returned: 0 | |
224 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
224 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
225 | (branch merge, don't forget to commit) |
|
225 | (branch merge, don't forget to commit) | |
226 | -------------- |
|
226 | -------------- | |
227 | M b |
|
227 | M b | |
228 | a |
|
228 | a | |
229 | -------------- |
|
229 | -------------- | |
230 |
|
230 | |||
231 | $ tm " " "nc a b" " " "5 get b" |
|
231 | $ tm " " "nc a b" " " "5 get b" | |
232 | created new head |
|
232 | created new head | |
233 | -------------- |
|
233 | -------------- | |
234 | test L: R:nc a b W: - 5 get b |
|
234 | test L: R:nc a b W: - 5 get b | |
235 | -------------- |
|
235 | -------------- | |
236 | searching for copies back to rev 1 |
|
236 | searching for copies back to rev 1 | |
237 | unmatched files in other: |
|
237 | unmatched files in other: | |
238 | b |
|
238 | b | |
239 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
239 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
240 | src: 'a' -> dst: 'b' |
|
240 | src: 'a' -> dst: 'b' | |
241 | checking for directory renames |
|
241 | checking for directory renames | |
242 | resolving manifests |
|
242 | resolving manifests | |
243 | branchmerge: True, force: False, partial: False |
|
243 | branchmerge: True, force: False, partial: False | |
244 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 |
|
244 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 | |
245 | preserving rev for resolve of rev |
|
245 | preserving rev for resolve of rev | |
246 | b: remote created -> g |
|
246 | b: remote created -> g | |
247 | getting b |
|
247 | getting b | |
248 | rev: versions differ -> m (premerge) |
|
248 | rev: versions differ -> m (premerge) | |
249 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
249 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
250 | merging rev |
|
250 | merging rev | |
251 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
251 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
252 | rev: versions differ -> m (merge) |
|
252 | rev: versions differ -> m (merge) | |
253 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
253 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
254 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
254 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
255 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
255 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
256 | merge tool returned: 0 |
|
256 | merge tool returned: 0 | |
257 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
257 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
258 | (branch merge, don't forget to commit) |
|
258 | (branch merge, don't forget to commit) | |
259 | -------------- |
|
259 | -------------- | |
260 | M b |
|
260 | M b | |
261 | C a |
|
261 | C a | |
262 | -------------- |
|
262 | -------------- | |
263 |
|
263 | |||
264 | $ tm "nc a b" " " " " "6 nothing" |
|
264 | $ tm "nc a b" " " " " "6 nothing" | |
265 | created new head |
|
265 | created new head | |
266 | -------------- |
|
266 | -------------- | |
267 | test L:nc a b R: W: - 6 nothing |
|
267 | test L:nc a b R: W: - 6 nothing | |
268 | -------------- |
|
268 | -------------- | |
269 | searching for copies back to rev 1 |
|
269 | searching for copies back to rev 1 | |
270 | unmatched files in local: |
|
270 | unmatched files in local: | |
271 | b |
|
271 | b | |
272 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
272 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
273 | src: 'a' -> dst: 'b' |
|
273 | src: 'a' -> dst: 'b' | |
274 | checking for directory renames |
|
274 | checking for directory renames | |
275 | resolving manifests |
|
275 | resolving manifests | |
276 | branchmerge: True, force: False, partial: False |
|
276 | branchmerge: True, force: False, partial: False | |
277 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 |
|
277 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 | |
278 | preserving rev for resolve of rev |
|
278 | preserving rev for resolve of rev | |
279 | starting 4 threads for background file closing (?) |
|
279 | starting 4 threads for background file closing (?) | |
280 | rev: versions differ -> m (premerge) |
|
280 | rev: versions differ -> m (premerge) | |
281 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
281 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
282 | merging rev |
|
282 | merging rev | |
283 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
283 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
284 | rev: versions differ -> m (merge) |
|
284 | rev: versions differ -> m (merge) | |
285 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
285 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
286 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
286 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
287 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
287 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
288 | merge tool returned: 0 |
|
288 | merge tool returned: 0 | |
289 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
289 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
290 | (branch merge, don't forget to commit) |
|
290 | (branch merge, don't forget to commit) | |
291 | -------------- |
|
291 | -------------- | |
292 | C a |
|
292 | C a | |
293 | C b |
|
293 | C b | |
294 | -------------- |
|
294 | -------------- | |
295 |
|
295 | |||
296 | $ tm " " "nm a b" " " "7 get b" |
|
296 | $ tm " " "nm a b" " " "7 get b" | |
297 | created new head |
|
297 | created new head | |
298 | -------------- |
|
298 | -------------- | |
299 | test L: R:nm a b W: - 7 get b |
|
299 | test L: R:nm a b W: - 7 get b | |
300 | -------------- |
|
300 | -------------- | |
301 | searching for copies back to rev 1 |
|
301 | searching for copies back to rev 1 | |
302 | unmatched files in other: |
|
302 | unmatched files in other: | |
303 | b |
|
303 | b | |
304 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
304 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
305 | src: 'a' -> dst: 'b' |
|
305 | src: 'a' -> dst: 'b' | |
306 | checking for directory renames |
|
306 | checking for directory renames | |
307 | resolving manifests |
|
307 | resolving manifests | |
308 | branchmerge: True, force: False, partial: False |
|
308 | branchmerge: True, force: False, partial: False | |
309 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a |
|
309 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a | |
310 | preserving rev for resolve of rev |
|
310 | preserving rev for resolve of rev | |
311 | a: other deleted -> r |
|
311 | a: other deleted -> r | |
312 | removing a |
|
312 | removing a | |
313 | b: remote created -> g |
|
313 | b: remote created -> g | |
314 | getting b |
|
314 | getting b | |
315 | rev: versions differ -> m (premerge) |
|
315 | rev: versions differ -> m (premerge) | |
316 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
316 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
317 | merging rev |
|
317 | merging rev | |
318 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
318 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
319 | rev: versions differ -> m (merge) |
|
319 | rev: versions differ -> m (merge) | |
320 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
320 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
321 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
321 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
322 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
322 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
323 | merge tool returned: 0 |
|
323 | merge tool returned: 0 | |
324 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
324 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
325 | (branch merge, don't forget to commit) |
|
325 | (branch merge, don't forget to commit) | |
326 | -------------- |
|
326 | -------------- | |
327 | M b |
|
327 | M b | |
328 | -------------- |
|
328 | -------------- | |
329 |
|
329 | |||
330 | $ tm "nm a b" " " " " "8 nothing" |
|
330 | $ tm "nm a b" " " " " "8 nothing" | |
331 | created new head |
|
331 | created new head | |
332 | -------------- |
|
332 | -------------- | |
333 | test L:nm a b R: W: - 8 nothing |
|
333 | test L:nm a b R: W: - 8 nothing | |
334 | -------------- |
|
334 | -------------- | |
335 | searching for copies back to rev 1 |
|
335 | searching for copies back to rev 1 | |
336 | unmatched files in local: |
|
336 | unmatched files in local: | |
337 | b |
|
337 | b | |
338 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
338 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
339 | src: 'a' -> dst: 'b' |
|
339 | src: 'a' -> dst: 'b' | |
340 | checking for directory renames |
|
340 | checking for directory renames | |
341 | resolving manifests |
|
341 | resolving manifests | |
342 | branchmerge: True, force: False, partial: False |
|
342 | branchmerge: True, force: False, partial: False | |
343 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 |
|
343 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 | |
344 | preserving rev for resolve of rev |
|
344 | preserving rev for resolve of rev | |
345 | starting 4 threads for background file closing (?) |
|
345 | starting 4 threads for background file closing (?) | |
346 | rev: versions differ -> m (premerge) |
|
346 | rev: versions differ -> m (premerge) | |
347 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
347 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
348 | merging rev |
|
348 | merging rev | |
349 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
349 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
350 | rev: versions differ -> m (merge) |
|
350 | rev: versions differ -> m (merge) | |
351 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
351 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
352 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
352 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
353 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
353 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
354 | merge tool returned: 0 |
|
354 | merge tool returned: 0 | |
355 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
355 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
356 | (branch merge, don't forget to commit) |
|
356 | (branch merge, don't forget to commit) | |
357 | -------------- |
|
357 | -------------- | |
358 | C b |
|
358 | C b | |
359 | -------------- |
|
359 | -------------- | |
360 |
|
360 | |||
361 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" |
|
361 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" | |
362 | created new head |
|
362 | created new head | |
363 | -------------- |
|
363 | -------------- | |
364 | test L:um a b R:um a b W: - 9 do merge with ancestor in a |
|
364 | test L:um a b R:um a b W: - 9 do merge with ancestor in a | |
365 | -------------- |
|
365 | -------------- | |
366 | searching for copies back to rev 1 |
|
366 | searching for copies back to rev 1 | |
367 | unmatched files new in both: |
|
367 | unmatched files new in both: | |
368 | b |
|
368 | b | |
369 | resolving manifests |
|
369 | resolving manifests | |
370 | branchmerge: True, force: False, partial: False |
|
370 | branchmerge: True, force: False, partial: False | |
371 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 |
|
371 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 | |
372 | preserving b for resolve of b |
|
372 | preserving b for resolve of b | |
373 | preserving rev for resolve of rev |
|
373 | preserving rev for resolve of rev | |
374 | starting 4 threads for background file closing (?) |
|
374 | starting 4 threads for background file closing (?) | |
375 | b: both renamed from a -> m (premerge) |
|
375 | b: both renamed from a -> m (premerge) | |
376 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
376 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
377 | merging b |
|
377 | merging b | |
378 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
378 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
379 | rev: versions differ -> m (premerge) |
|
379 | rev: versions differ -> m (premerge) | |
380 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
380 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
381 | merging rev |
|
381 | merging rev | |
382 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
382 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
383 | b: both renamed from a -> m (merge) |
|
383 | b: both renamed from a -> m (merge) | |
384 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
384 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
385 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
385 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
386 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
386 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
387 | merge tool returned: 0 |
|
387 | merge tool returned: 0 | |
388 | rev: versions differ -> m (merge) |
|
388 | rev: versions differ -> m (merge) | |
389 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
389 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
390 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
390 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
391 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
391 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
392 | merge tool returned: 0 |
|
392 | merge tool returned: 0 | |
393 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
393 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
394 | (branch merge, don't forget to commit) |
|
394 | (branch merge, don't forget to commit) | |
395 | -------------- |
|
395 | -------------- | |
396 | M b |
|
396 | M b | |
397 | -------------- |
|
397 | -------------- | |
398 |
|
398 | |||
399 |
|
399 | |||
400 | m "um a c" "um x c" " " "10 do merge with no ancestor" |
|
400 | m "um a c" "um x c" " " "10 do merge with no ancestor" | |
401 |
|
401 | |||
402 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" |
|
402 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" | |
403 | created new head |
|
403 | created new head | |
404 | -------------- |
|
404 | -------------- | |
405 | test L:nm a b R:nm a c W: - 11 get c, keep b |
|
405 | test L:nm a b R:nm a c W: - 11 get c, keep b | |
406 | -------------- |
|
406 | -------------- | |
407 | searching for copies back to rev 1 |
|
407 | searching for copies back to rev 1 | |
408 | unmatched files in local: |
|
408 | unmatched files in local: | |
409 | b |
|
409 | b | |
410 | unmatched files in other: |
|
410 | unmatched files in other: | |
411 | c |
|
411 | c | |
412 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
412 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
413 | src: 'a' -> dst: 'b' ! |
|
413 | src: 'a' -> dst: 'b' ! | |
414 | src: 'a' -> dst: 'c' ! |
|
414 | src: 'a' -> dst: 'c' ! | |
415 | checking for directory renames |
|
415 | checking for directory renames | |
416 | resolving manifests |
|
416 | resolving manifests | |
417 | branchmerge: True, force: False, partial: False |
|
417 | branchmerge: True, force: False, partial: False | |
418 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e |
|
418 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e | |
419 | note: possible conflict - a was renamed multiple times to: |
|
419 | note: possible conflict - a was renamed multiple times to: | |
420 | b |
|
420 | b | |
421 | c |
|
421 | c | |
422 | preserving rev for resolve of rev |
|
422 | preserving rev for resolve of rev | |
423 | c: remote created -> g |
|
423 | c: remote created -> g | |
424 | getting c |
|
424 | getting c | |
425 | rev: versions differ -> m (premerge) |
|
425 | rev: versions differ -> m (premerge) | |
426 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
426 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
427 | merging rev |
|
427 | merging rev | |
428 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
428 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
429 | rev: versions differ -> m (merge) |
|
429 | rev: versions differ -> m (merge) | |
430 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
430 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
431 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
431 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
432 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
432 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
433 | merge tool returned: 0 |
|
433 | merge tool returned: 0 | |
434 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
434 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
435 | (branch merge, don't forget to commit) |
|
435 | (branch merge, don't forget to commit) | |
436 | -------------- |
|
436 | -------------- | |
437 | M c |
|
437 | M c | |
438 | C b |
|
438 | C b | |
439 | -------------- |
|
439 | -------------- | |
440 |
|
440 | |||
441 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" |
|
441 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" | |
442 | created new head |
|
442 | created new head | |
443 | -------------- |
|
443 | -------------- | |
444 | test L:nc a b R:up b W: - 12 merge b no ancestor |
|
444 | test L:nc a b R:up b W: - 12 merge b no ancestor | |
445 | -------------- |
|
445 | -------------- | |
446 | searching for copies back to rev 1 |
|
446 | searching for copies back to rev 1 | |
447 | unmatched files new in both: |
|
447 | unmatched files new in both: | |
448 | b |
|
448 | b | |
449 | resolving manifests |
|
449 | resolving manifests | |
450 | branchmerge: True, force: False, partial: False |
|
450 | branchmerge: True, force: False, partial: False | |
451 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 |
|
451 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 | |
452 | preserving b for resolve of b |
|
452 | preserving b for resolve of b | |
453 | preserving rev for resolve of rev |
|
453 | preserving rev for resolve of rev | |
454 | starting 4 threads for background file closing (?) |
|
454 | starting 4 threads for background file closing (?) | |
455 | b: both created -> m (premerge) |
|
455 | b: both created -> m (premerge) | |
456 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
456 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
457 | merging b |
|
457 | merging b | |
458 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
458 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
459 | rev: versions differ -> m (premerge) |
|
459 | rev: versions differ -> m (premerge) | |
460 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
460 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
461 | merging rev |
|
461 | merging rev | |
462 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
462 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
463 | b: both created -> m (merge) |
|
463 | b: both created -> m (merge) | |
464 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
464 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
465 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
465 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
466 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
466 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
467 | merge tool returned: 0 |
|
467 | merge tool returned: 0 | |
468 | rev: versions differ -> m (merge) |
|
468 | rev: versions differ -> m (merge) | |
469 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
469 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
470 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
470 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
471 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
471 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
472 | merge tool returned: 0 |
|
472 | merge tool returned: 0 | |
473 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
473 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
474 | (branch merge, don't forget to commit) |
|
474 | (branch merge, don't forget to commit) | |
475 | -------------- |
|
475 | -------------- | |
476 | M b |
|
476 | M b | |
477 | C a |
|
477 | C a | |
478 | -------------- |
|
478 | -------------- | |
479 |
|
479 | |||
480 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" |
|
480 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" | |
481 | created new head |
|
481 | created new head | |
482 | -------------- |
|
482 | -------------- | |
483 | test L:up b R:nm a b W: - 13 merge b no ancestor |
|
483 | test L:up b R:nm a b W: - 13 merge b no ancestor | |
484 | -------------- |
|
484 | -------------- | |
485 | searching for copies back to rev 1 |
|
485 | searching for copies back to rev 1 | |
486 | unmatched files new in both: |
|
486 | unmatched files new in both: | |
487 | b |
|
487 | b | |
488 | resolving manifests |
|
488 | resolving manifests | |
489 | branchmerge: True, force: False, partial: False |
|
489 | branchmerge: True, force: False, partial: False | |
490 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
490 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
491 | preserving b for resolve of b |
|
491 | preserving b for resolve of b | |
492 | preserving rev for resolve of rev |
|
492 | preserving rev for resolve of rev | |
493 | a: other deleted -> r |
|
493 | a: other deleted -> r | |
494 | removing a |
|
494 | removing a | |
495 | starting 4 threads for background file closing (?) |
|
495 | starting 4 threads for background file closing (?) | |
496 | b: both created -> m (premerge) |
|
496 | b: both created -> m (premerge) | |
497 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
497 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
498 | merging b |
|
498 | merging b | |
499 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
499 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
500 | rev: versions differ -> m (premerge) |
|
500 | rev: versions differ -> m (premerge) | |
501 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
501 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
502 | merging rev |
|
502 | merging rev | |
503 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
503 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
504 | b: both created -> m (merge) |
|
504 | b: both created -> m (merge) | |
505 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
505 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
506 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
506 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
507 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
507 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
508 | merge tool returned: 0 |
|
508 | merge tool returned: 0 | |
509 | rev: versions differ -> m (merge) |
|
509 | rev: versions differ -> m (merge) | |
510 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
510 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
511 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
511 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
512 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
512 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
513 | merge tool returned: 0 |
|
513 | merge tool returned: 0 | |
514 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
514 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
515 | (branch merge, don't forget to commit) |
|
515 | (branch merge, don't forget to commit) | |
516 | -------------- |
|
516 | -------------- | |
517 | M b |
|
517 | M b | |
518 | -------------- |
|
518 | -------------- | |
519 |
|
519 | |||
520 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" |
|
520 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" | |
521 | created new head |
|
521 | created new head | |
522 | -------------- |
|
522 | -------------- | |
523 | test L:nc a b R:up a b W: - 14 merge b no ancestor |
|
523 | test L:nc a b R:up a b W: - 14 merge b no ancestor | |
524 | -------------- |
|
524 | -------------- | |
525 | searching for copies back to rev 1 |
|
525 | searching for copies back to rev 1 | |
526 | unmatched files new in both: |
|
526 | unmatched files new in both: | |
527 | b |
|
527 | b | |
528 | resolving manifests |
|
528 | resolving manifests | |
529 | branchmerge: True, force: False, partial: False |
|
529 | branchmerge: True, force: False, partial: False | |
530 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
530 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
531 | preserving b for resolve of b |
|
531 | preserving b for resolve of b | |
532 | preserving rev for resolve of rev |
|
532 | preserving rev for resolve of rev | |
533 | a: remote is newer -> g |
|
533 | a: remote is newer -> g | |
534 | getting a |
|
534 | getting a | |
535 | b: both created -> m (premerge) |
|
535 | b: both created -> m (premerge) | |
536 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
536 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
537 | merging b |
|
537 | merging b | |
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
539 | rev: versions differ -> m (premerge) |
|
539 | rev: versions differ -> m (premerge) | |
540 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
540 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
541 | merging rev |
|
541 | merging rev | |
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
543 | b: both created -> m (merge) |
|
543 | b: both created -> m (merge) | |
544 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
544 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
545 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
545 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
546 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
546 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
547 | merge tool returned: 0 |
|
547 | merge tool returned: 0 | |
548 | rev: versions differ -> m (merge) |
|
548 | rev: versions differ -> m (merge) | |
549 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
549 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
550 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
550 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
551 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
551 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
552 | merge tool returned: 0 |
|
552 | merge tool returned: 0 | |
553 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
553 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
554 | (branch merge, don't forget to commit) |
|
554 | (branch merge, don't forget to commit) | |
555 | -------------- |
|
555 | -------------- | |
556 | M a |
|
556 | M a | |
557 | M b |
|
557 | M b | |
558 | -------------- |
|
558 | -------------- | |
559 |
|
559 | |||
560 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" |
|
560 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" | |
561 | created new head |
|
561 | created new head | |
562 | -------------- |
|
562 | -------------- | |
563 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a |
|
563 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a | |
564 | -------------- |
|
564 | -------------- | |
565 | searching for copies back to rev 1 |
|
565 | searching for copies back to rev 1 | |
566 | unmatched files new in both: |
|
566 | unmatched files new in both: | |
567 | b |
|
567 | b | |
568 | resolving manifests |
|
568 | resolving manifests | |
569 | branchmerge: True, force: False, partial: False |
|
569 | branchmerge: True, force: False, partial: False | |
570 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
570 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
571 | preserving b for resolve of b |
|
571 | preserving b for resolve of b | |
572 | preserving rev for resolve of rev |
|
572 | preserving rev for resolve of rev | |
573 | a: other deleted -> r |
|
573 | a: other deleted -> r | |
574 | removing a |
|
574 | removing a | |
575 | starting 4 threads for background file closing (?) |
|
575 | starting 4 threads for background file closing (?) | |
576 | b: both created -> m (premerge) |
|
576 | b: both created -> m (premerge) | |
577 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
577 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
578 | merging b |
|
578 | merging b | |
579 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
579 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
580 | rev: versions differ -> m (premerge) |
|
580 | rev: versions differ -> m (premerge) | |
581 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
581 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
582 | merging rev |
|
582 | merging rev | |
583 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
583 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
584 | b: both created -> m (merge) |
|
584 | b: both created -> m (merge) | |
585 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
585 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
586 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
586 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
587 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
587 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
588 | merge tool returned: 0 |
|
588 | merge tool returned: 0 | |
589 | rev: versions differ -> m (merge) |
|
589 | rev: versions differ -> m (merge) | |
590 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
590 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
591 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
591 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
592 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
592 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
593 | merge tool returned: 0 |
|
593 | merge tool returned: 0 | |
594 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
594 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
595 | (branch merge, don't forget to commit) |
|
595 | (branch merge, don't forget to commit) | |
596 | -------------- |
|
596 | -------------- | |
597 | M b |
|
597 | M b | |
598 | -------------- |
|
598 | -------------- | |
599 |
|
599 | |||
600 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" |
|
600 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" | |
601 | created new head |
|
601 | created new head | |
602 | -------------- |
|
602 | -------------- | |
603 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor |
|
603 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor | |
604 | -------------- |
|
604 | -------------- | |
605 | searching for copies back to rev 1 |
|
605 | searching for copies back to rev 1 | |
606 | unmatched files new in both: |
|
606 | unmatched files new in both: | |
607 | b |
|
607 | b | |
608 | resolving manifests |
|
608 | resolving manifests | |
609 | branchmerge: True, force: False, partial: False |
|
609 | branchmerge: True, force: False, partial: False | |
610 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
610 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
611 | preserving b for resolve of b |
|
611 | preserving b for resolve of b | |
612 | preserving rev for resolve of rev |
|
612 | preserving rev for resolve of rev | |
613 | a: remote is newer -> g |
|
613 | a: remote is newer -> g | |
614 | getting a |
|
614 | getting a | |
615 | b: both created -> m (premerge) |
|
615 | b: both created -> m (premerge) | |
616 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
616 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
617 | merging b |
|
617 | merging b | |
618 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
618 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
619 | rev: versions differ -> m (premerge) |
|
619 | rev: versions differ -> m (premerge) | |
620 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
620 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
621 | merging rev |
|
621 | merging rev | |
622 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
622 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
623 | b: both created -> m (merge) |
|
623 | b: both created -> m (merge) | |
624 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
624 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
625 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
625 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
626 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
626 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
627 | merge tool returned: 0 |
|
627 | merge tool returned: 0 | |
628 | rev: versions differ -> m (merge) |
|
628 | rev: versions differ -> m (merge) | |
629 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
629 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
630 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
630 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
631 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
631 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
632 | merge tool returned: 0 |
|
632 | merge tool returned: 0 | |
633 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
633 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
634 | (branch merge, don't forget to commit) |
|
634 | (branch merge, don't forget to commit) | |
635 | -------------- |
|
635 | -------------- | |
636 | M a |
|
636 | M a | |
637 | M b |
|
637 | M b | |
638 | -------------- |
|
638 | -------------- | |
639 |
|
639 | |||
640 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" |
|
640 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" | |
641 | created new head |
|
641 | created new head | |
642 | -------------- |
|
642 | -------------- | |
643 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor |
|
643 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor | |
644 | -------------- |
|
644 | -------------- | |
645 | searching for copies back to rev 1 |
|
645 | searching for copies back to rev 1 | |
646 | unmatched files new in both: |
|
646 | unmatched files new in both: | |
647 | b |
|
647 | b | |
648 | resolving manifests |
|
648 | resolving manifests | |
649 | branchmerge: True, force: False, partial: False |
|
649 | branchmerge: True, force: False, partial: False | |
650 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 |
|
650 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 | |
651 | preserving b for resolve of b |
|
651 | preserving b for resolve of b | |
652 | preserving rev for resolve of rev |
|
652 | preserving rev for resolve of rev | |
653 | starting 4 threads for background file closing (?) |
|
653 | starting 4 threads for background file closing (?) | |
654 | b: both created -> m (premerge) |
|
654 | b: both created -> m (premerge) | |
655 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
655 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
656 | merging b |
|
656 | merging b | |
657 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
657 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
658 | rev: versions differ -> m (premerge) |
|
658 | rev: versions differ -> m (premerge) | |
659 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
659 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
660 | merging rev |
|
660 | merging rev | |
661 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
661 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
662 | b: both created -> m (merge) |
|
662 | b: both created -> m (merge) | |
663 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
663 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
664 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
664 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
665 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
665 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
666 | merge tool returned: 0 |
|
666 | merge tool returned: 0 | |
667 | rev: versions differ -> m (merge) |
|
667 | rev: versions differ -> m (merge) | |
668 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
668 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
669 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
669 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
670 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
670 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
671 | merge tool returned: 0 |
|
671 | merge tool returned: 0 | |
672 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
672 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
673 | (branch merge, don't forget to commit) |
|
673 | (branch merge, don't forget to commit) | |
674 | -------------- |
|
674 | -------------- | |
675 | M b |
|
675 | M b | |
676 | C a |
|
676 | C a | |
677 | -------------- |
|
677 | -------------- | |
678 |
|
678 | |||
679 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" |
|
679 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" | |
680 | created new head |
|
680 | created new head | |
681 | -------------- |
|
681 | -------------- | |
682 | test L:nm a b R:up a b W: - 18 merge b no ancestor |
|
682 | test L:nm a b R:up a b W: - 18 merge b no ancestor | |
683 | -------------- |
|
683 | -------------- | |
684 | searching for copies back to rev 1 |
|
684 | searching for copies back to rev 1 | |
685 | unmatched files new in both: |
|
685 | unmatched files new in both: | |
686 | b |
|
686 | b | |
687 | resolving manifests |
|
687 | resolving manifests | |
688 | branchmerge: True, force: False, partial: False |
|
688 | branchmerge: True, force: False, partial: False | |
689 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a |
|
689 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a | |
690 | preserving b for resolve of b |
|
690 | preserving b for resolve of b | |
691 | preserving rev for resolve of rev |
|
691 | preserving rev for resolve of rev | |
692 | starting 4 threads for background file closing (?) |
|
692 | starting 4 threads for background file closing (?) | |
693 | a: prompt deleted/changed -> m (premerge) |
|
693 | a: prompt deleted/changed -> m (premerge) | |
694 | picked tool ':prompt' for a (binary False symlink False changedelete True) |
|
694 | picked tool ':prompt' for a (binary False symlink False changedelete True) | |
695 |
other [merge rev] |
|
695 | file a was deleted in other [merge rev] but was modified in local [working copy]. | |
|
696 | What do you want to do? | |||
696 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
697 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
697 | b: both created -> m (premerge) |
|
698 | b: both created -> m (premerge) | |
698 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
699 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
699 | merging b |
|
700 | merging b | |
700 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
701 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
701 | rev: versions differ -> m (premerge) |
|
702 | rev: versions differ -> m (premerge) | |
702 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
703 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
703 | merging rev |
|
704 | merging rev | |
704 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
705 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
705 | b: both created -> m (merge) |
|
706 | b: both created -> m (merge) | |
706 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
707 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
707 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
708 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
708 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
709 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
709 | merge tool returned: 0 |
|
710 | merge tool returned: 0 | |
710 | rev: versions differ -> m (merge) |
|
711 | rev: versions differ -> m (merge) | |
711 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
712 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
712 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
713 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
713 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
714 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
714 | merge tool returned: 0 |
|
715 | merge tool returned: 0 | |
715 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved |
|
716 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved | |
716 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
717 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
717 | -------------- |
|
718 | -------------- | |
718 | M a |
|
719 | M a | |
719 | M b |
|
720 | M b | |
720 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
721 | abort: unresolved merge conflicts (see 'hg help resolve') | |
721 | -------------- |
|
722 | -------------- | |
722 |
|
723 | |||
723 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" |
|
724 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" | |
724 | created new head |
|
725 | created new head | |
725 | -------------- |
|
726 | -------------- | |
726 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a |
|
727 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a | |
727 | -------------- |
|
728 | -------------- | |
728 | searching for copies back to rev 1 |
|
729 | searching for copies back to rev 1 | |
729 | unmatched files new in both: |
|
730 | unmatched files new in both: | |
730 | b |
|
731 | b | |
731 | resolving manifests |
|
732 | resolving manifests | |
732 | branchmerge: True, force: False, partial: False |
|
733 | branchmerge: True, force: False, partial: False | |
733 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a |
|
734 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a | |
734 | preserving a for resolve of a |
|
735 | preserving a for resolve of a | |
735 | preserving b for resolve of b |
|
736 | preserving b for resolve of b | |
736 | preserving rev for resolve of rev |
|
737 | preserving rev for resolve of rev | |
737 | starting 4 threads for background file closing (?) |
|
738 | starting 4 threads for background file closing (?) | |
738 | a: prompt changed/deleted -> m (premerge) |
|
739 | a: prompt changed/deleted -> m (premerge) | |
739 | picked tool ':prompt' for a (binary False symlink False changedelete True) |
|
740 | picked tool ':prompt' for a (binary False symlink False changedelete True) | |
740 |
local [working copy] |
|
741 | file a was deleted in local [working copy] but was modified in other [merge rev]. | |
|
742 | What do you want to do? | |||
741 | use (c)hanged version, (d)elete, or leave (u)nresolved? u |
|
743 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
742 | b: both created -> m (premerge) |
|
744 | b: both created -> m (premerge) | |
743 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
745 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
744 | merging b |
|
746 | merging b | |
745 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
747 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
746 | rev: versions differ -> m (premerge) |
|
748 | rev: versions differ -> m (premerge) | |
747 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
749 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
748 | merging rev |
|
750 | merging rev | |
749 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
751 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
750 | b: both created -> m (merge) |
|
752 | b: both created -> m (merge) | |
751 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
753 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
752 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
754 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
753 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
755 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
754 | merge tool returned: 0 |
|
756 | merge tool returned: 0 | |
755 | rev: versions differ -> m (merge) |
|
757 | rev: versions differ -> m (merge) | |
756 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
758 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
757 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
759 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
758 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
760 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
759 | merge tool returned: 0 |
|
761 | merge tool returned: 0 | |
760 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved |
|
762 | 0 files updated, 2 files merged, 0 files removed, 1 files unresolved | |
761 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
763 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
762 | -------------- |
|
764 | -------------- | |
763 | M b |
|
765 | M b | |
764 | C a |
|
766 | C a | |
765 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
767 | abort: unresolved merge conflicts (see 'hg help resolve') | |
766 | -------------- |
|
768 | -------------- | |
767 |
|
769 | |||
768 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" |
|
770 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" | |
769 | created new head |
|
771 | created new head | |
770 | -------------- |
|
772 | -------------- | |
771 | test L:up a R:um a b W: - 20 merge a and b to b, remove a |
|
773 | test L:up a R:um a b W: - 20 merge a and b to b, remove a | |
772 | -------------- |
|
774 | -------------- | |
773 | searching for copies back to rev 1 |
|
775 | searching for copies back to rev 1 | |
774 | unmatched files in other: |
|
776 | unmatched files in other: | |
775 | b |
|
777 | b | |
776 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
778 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
777 | src: 'a' -> dst: 'b' * |
|
779 | src: 'a' -> dst: 'b' * | |
778 | checking for directory renames |
|
780 | checking for directory renames | |
779 | resolving manifests |
|
781 | resolving manifests | |
780 | branchmerge: True, force: False, partial: False |
|
782 | branchmerge: True, force: False, partial: False | |
781 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 |
|
783 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 | |
782 | preserving a for resolve of b |
|
784 | preserving a for resolve of b | |
783 | preserving rev for resolve of rev |
|
785 | preserving rev for resolve of rev | |
784 | removing a |
|
786 | removing a | |
785 | starting 4 threads for background file closing (?) |
|
787 | starting 4 threads for background file closing (?) | |
786 | b: remote moved from a -> m (premerge) |
|
788 | b: remote moved from a -> m (premerge) | |
787 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
789 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
788 | merging a and b to b |
|
790 | merging a and b to b | |
789 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
791 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
790 | rev: versions differ -> m (premerge) |
|
792 | rev: versions differ -> m (premerge) | |
791 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
793 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
792 | merging rev |
|
794 | merging rev | |
793 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
795 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
794 | b: remote moved from a -> m (merge) |
|
796 | b: remote moved from a -> m (merge) | |
795 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
797 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
796 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
798 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
797 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
799 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
798 | merge tool returned: 0 |
|
800 | merge tool returned: 0 | |
799 | rev: versions differ -> m (merge) |
|
801 | rev: versions differ -> m (merge) | |
800 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
802 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
801 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
803 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
802 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
804 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
803 | merge tool returned: 0 |
|
805 | merge tool returned: 0 | |
804 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
806 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
805 | (branch merge, don't forget to commit) |
|
807 | (branch merge, don't forget to commit) | |
806 | -------------- |
|
808 | -------------- | |
807 | M b |
|
809 | M b | |
808 | a |
|
810 | a | |
809 | -------------- |
|
811 | -------------- | |
810 |
|
812 | |||
811 | $ tm "um a b" "up a " " " "21 merge a and b to b" |
|
813 | $ tm "um a b" "up a " " " "21 merge a and b to b" | |
812 | created new head |
|
814 | created new head | |
813 | -------------- |
|
815 | -------------- | |
814 | test L:um a b R:up a W: - 21 merge a and b to b |
|
816 | test L:um a b R:up a W: - 21 merge a and b to b | |
815 | -------------- |
|
817 | -------------- | |
816 | searching for copies back to rev 1 |
|
818 | searching for copies back to rev 1 | |
817 | unmatched files in local: |
|
819 | unmatched files in local: | |
818 | b |
|
820 | b | |
819 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
821 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
820 | src: 'a' -> dst: 'b' * |
|
822 | src: 'a' -> dst: 'b' * | |
821 | checking for directory renames |
|
823 | checking for directory renames | |
822 | resolving manifests |
|
824 | resolving manifests | |
823 | branchmerge: True, force: False, partial: False |
|
825 | branchmerge: True, force: False, partial: False | |
824 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 |
|
826 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 | |
825 | preserving b for resolve of b |
|
827 | preserving b for resolve of b | |
826 | preserving rev for resolve of rev |
|
828 | preserving rev for resolve of rev | |
827 | starting 4 threads for background file closing (?) |
|
829 | starting 4 threads for background file closing (?) | |
828 | b: local copied/moved from a -> m (premerge) |
|
830 | b: local copied/moved from a -> m (premerge) | |
829 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
831 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
830 | merging b and a to b |
|
832 | merging b and a to b | |
831 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
833 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
832 | rev: versions differ -> m (premerge) |
|
834 | rev: versions differ -> m (premerge) | |
833 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
835 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
834 | merging rev |
|
836 | merging rev | |
835 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
837 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
836 | b: local copied/moved from a -> m (merge) |
|
838 | b: local copied/moved from a -> m (merge) | |
837 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
839 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
838 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
840 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
839 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) |
|
841 | launching merge tool: * ../merge *$TESTTMP/t/t/b* * * (glob) | |
840 | merge tool returned: 0 |
|
842 | merge tool returned: 0 | |
841 | rev: versions differ -> m (merge) |
|
843 | rev: versions differ -> m (merge) | |
842 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
844 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
843 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
845 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
844 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
846 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
845 | merge tool returned: 0 |
|
847 | merge tool returned: 0 | |
846 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
848 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
847 | (branch merge, don't forget to commit) |
|
849 | (branch merge, don't forget to commit) | |
848 | -------------- |
|
850 | -------------- | |
849 | M b |
|
851 | M b | |
850 | a |
|
852 | a | |
851 | -------------- |
|
853 | -------------- | |
852 |
|
854 | |||
853 |
|
855 | |||
854 | m "nm a b" "um x a" " " "22 get a, keep b" |
|
856 | m "nm a b" "um x a" " " "22 get a, keep b" | |
855 |
|
857 | |||
856 | $ tm "nm a b" "up a c" " " "23 get c, keep b" |
|
858 | $ tm "nm a b" "up a c" " " "23 get c, keep b" | |
857 | created new head |
|
859 | created new head | |
858 | -------------- |
|
860 | -------------- | |
859 | test L:nm a b R:up a c W: - 23 get c, keep b |
|
861 | test L:nm a b R:up a c W: - 23 get c, keep b | |
860 | -------------- |
|
862 | -------------- | |
861 | searching for copies back to rev 1 |
|
863 | searching for copies back to rev 1 | |
862 | unmatched files in local: |
|
864 | unmatched files in local: | |
863 | b |
|
865 | b | |
864 | unmatched files in other: |
|
866 | unmatched files in other: | |
865 | c |
|
867 | c | |
866 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
868 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
867 | src: 'a' -> dst: 'b' * |
|
869 | src: 'a' -> dst: 'b' * | |
868 | checking for directory renames |
|
870 | checking for directory renames | |
869 | resolving manifests |
|
871 | resolving manifests | |
870 | branchmerge: True, force: False, partial: False |
|
872 | branchmerge: True, force: False, partial: False | |
871 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f |
|
873 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f | |
872 | preserving b for resolve of b |
|
874 | preserving b for resolve of b | |
873 | preserving rev for resolve of rev |
|
875 | preserving rev for resolve of rev | |
874 | c: remote created -> g |
|
876 | c: remote created -> g | |
875 | getting c |
|
877 | getting c | |
876 | b: local copied/moved from a -> m (premerge) |
|
878 | b: local copied/moved from a -> m (premerge) | |
877 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) |
|
879 | picked tool '* ../merge' for b (binary False symlink False changedelete False) (glob) | |
878 | merging b and a to b |
|
880 | merging b and a to b | |
879 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 |
|
881 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 | |
880 | premerge successful |
|
882 | premerge successful | |
881 | rev: versions differ -> m (premerge) |
|
883 | rev: versions differ -> m (premerge) | |
882 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
884 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
883 | merging rev |
|
885 | merging rev | |
884 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
886 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
885 | rev: versions differ -> m (merge) |
|
887 | rev: versions differ -> m (merge) | |
886 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) |
|
888 | picked tool '* ../merge' for rev (binary False symlink False changedelete False) (glob) | |
887 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
889 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
888 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
890 | launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob) | |
889 | merge tool returned: 0 |
|
891 | merge tool returned: 0 | |
890 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
892 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
891 | (branch merge, don't forget to commit) |
|
893 | (branch merge, don't forget to commit) | |
892 | -------------- |
|
894 | -------------- | |
893 | M b |
|
895 | M b | |
894 | a |
|
896 | a | |
895 | M c |
|
897 | M c | |
896 | -------------- |
|
898 | -------------- | |
897 |
|
899 | |||
898 |
|
900 | |||
899 | $ cd .. |
|
901 | $ cd .. | |
900 |
|
902 | |||
901 |
|
903 | |||
902 | Systematic and terse testing of merge merges and ancestor calculation: |
|
904 | Systematic and terse testing of merge merges and ancestor calculation: | |
903 |
|
905 | |||
904 | Expected result: |
|
906 | Expected result: | |
905 |
|
907 | |||
906 | \ a m1 m2 dst |
|
908 | \ a m1 m2 dst | |
907 | 0 - f f f "versions differ" |
|
909 | 0 - f f f "versions differ" | |
908 | 1 f g g g "versions differ" |
|
910 | 1 f g g g "versions differ" | |
909 | 2 f f f f "versions differ" |
|
911 | 2 f f f f "versions differ" | |
910 | 3 f f g f+g "remote copied to " + f |
|
912 | 3 f f g f+g "remote copied to " + f | |
911 | 4 f f g g "remote moved to " + f |
|
913 | 4 f f g g "remote moved to " + f | |
912 | 5 f g f f+g "local copied to " + f2 |
|
914 | 5 f g f f+g "local copied to " + f2 | |
913 | 6 f g f g "local moved to " + f2 |
|
915 | 6 f g f g "local moved to " + f2 | |
914 | 7 - (f) f f "remote differs from untracked local" |
|
916 | 7 - (f) f f "remote differs from untracked local" | |
915 | 8 f (f) f f "remote differs from untracked local" |
|
917 | 8 f (f) f f "remote differs from untracked local" | |
916 |
|
918 | |||
917 | $ hg init ancestortest |
|
919 | $ hg init ancestortest | |
918 | $ cd ancestortest |
|
920 | $ cd ancestortest | |
919 | $ for x in 1 2 3 4 5 6 8; do mkdir $x; echo a > $x/f; done |
|
921 | $ for x in 1 2 3 4 5 6 8; do mkdir $x; echo a > $x/f; done | |
920 | $ hg ci -Aqm "a" |
|
922 | $ hg ci -Aqm "a" | |
921 | $ mkdir 0 |
|
923 | $ mkdir 0 | |
922 | $ touch 0/f |
|
924 | $ touch 0/f | |
923 | $ hg mv 1/f 1/g |
|
925 | $ hg mv 1/f 1/g | |
924 | $ hg cp 5/f 5/g |
|
926 | $ hg cp 5/f 5/g | |
925 | $ hg mv 6/f 6/g |
|
927 | $ hg mv 6/f 6/g | |
926 | $ hg rm 8/f |
|
928 | $ hg rm 8/f | |
927 | $ for x in */*; do echo m1 > $x; done |
|
929 | $ for x in */*; do echo m1 > $x; done | |
928 | $ hg ci -Aqm "m1" |
|
930 | $ hg ci -Aqm "m1" | |
929 | $ hg up -qr0 |
|
931 | $ hg up -qr0 | |
930 | $ mkdir 0 7 |
|
932 | $ mkdir 0 7 | |
931 | $ touch 0/f 7/f |
|
933 | $ touch 0/f 7/f | |
932 | $ hg mv 1/f 1/g |
|
934 | $ hg mv 1/f 1/g | |
933 | $ hg cp 3/f 3/g |
|
935 | $ hg cp 3/f 3/g | |
934 | $ hg mv 4/f 4/g |
|
936 | $ hg mv 4/f 4/g | |
935 | $ for x in */*; do echo m2 > $x; done |
|
937 | $ for x in */*; do echo m2 > $x; done | |
936 | $ hg ci -Aqm "m2" |
|
938 | $ hg ci -Aqm "m2" | |
937 | $ hg up -qr1 |
|
939 | $ hg up -qr1 | |
938 | $ mkdir 7 8 |
|
940 | $ mkdir 7 8 | |
939 | $ echo m > 7/f |
|
941 | $ echo m > 7/f | |
940 | $ echo m > 8/f |
|
942 | $ echo m > 8/f | |
941 | $ hg merge -f --tool internal:dump -v --debug -r2 | sed '/^resolving manifests/,$d' 2> /dev/null |
|
943 | $ hg merge -f --tool internal:dump -v --debug -r2 | sed '/^resolving manifests/,$d' 2> /dev/null | |
942 | searching for copies back to rev 1 |
|
944 | searching for copies back to rev 1 | |
943 | unmatched files in local: |
|
945 | unmatched files in local: | |
944 | 5/g |
|
946 | 5/g | |
945 | 6/g |
|
947 | 6/g | |
946 | unmatched files in other: |
|
948 | unmatched files in other: | |
947 | 3/g |
|
949 | 3/g | |
948 | 4/g |
|
950 | 4/g | |
949 | 7/f |
|
951 | 7/f | |
950 | unmatched files new in both: |
|
952 | unmatched files new in both: | |
951 | 0/f |
|
953 | 0/f | |
952 | 1/g |
|
954 | 1/g | |
953 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
955 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
954 | src: '3/f' -> dst: '3/g' * |
|
956 | src: '3/f' -> dst: '3/g' * | |
955 | src: '4/f' -> dst: '4/g' * |
|
957 | src: '4/f' -> dst: '4/g' * | |
956 | src: '5/f' -> dst: '5/g' * |
|
958 | src: '5/f' -> dst: '5/g' * | |
957 | src: '6/f' -> dst: '6/g' * |
|
959 | src: '6/f' -> dst: '6/g' * | |
958 | checking for directory renames |
|
960 | checking for directory renames | |
959 | $ hg mani |
|
961 | $ hg mani | |
960 | 0/f |
|
962 | 0/f | |
961 | 1/g |
|
963 | 1/g | |
962 | 2/f |
|
964 | 2/f | |
963 | 3/f |
|
965 | 3/f | |
964 | 4/f |
|
966 | 4/f | |
965 | 5/f |
|
967 | 5/f | |
966 | 5/g |
|
968 | 5/g | |
967 | 6/g |
|
969 | 6/g | |
968 | $ for f in */*; do echo $f:; cat $f; done |
|
970 | $ for f in */*; do echo $f:; cat $f; done | |
969 | 0/f: |
|
971 | 0/f: | |
970 | m1 |
|
972 | m1 | |
971 | 0/f.base: |
|
973 | 0/f.base: | |
972 | 0/f.local: |
|
974 | 0/f.local: | |
973 | m1 |
|
975 | m1 | |
974 | 0/f.orig: |
|
976 | 0/f.orig: | |
975 | m1 |
|
977 | m1 | |
976 | 0/f.other: |
|
978 | 0/f.other: | |
977 | m2 |
|
979 | m2 | |
978 | 1/g: |
|
980 | 1/g: | |
979 | m1 |
|
981 | m1 | |
980 | 1/g.base: |
|
982 | 1/g.base: | |
981 | a |
|
983 | a | |
982 | 1/g.local: |
|
984 | 1/g.local: | |
983 | m1 |
|
985 | m1 | |
984 | 1/g.orig: |
|
986 | 1/g.orig: | |
985 | m1 |
|
987 | m1 | |
986 | 1/g.other: |
|
988 | 1/g.other: | |
987 | m2 |
|
989 | m2 | |
988 | 2/f: |
|
990 | 2/f: | |
989 | m1 |
|
991 | m1 | |
990 | 2/f.base: |
|
992 | 2/f.base: | |
991 | a |
|
993 | a | |
992 | 2/f.local: |
|
994 | 2/f.local: | |
993 | m1 |
|
995 | m1 | |
994 | 2/f.orig: |
|
996 | 2/f.orig: | |
995 | m1 |
|
997 | m1 | |
996 | 2/f.other: |
|
998 | 2/f.other: | |
997 | m2 |
|
999 | m2 | |
998 | 3/f: |
|
1000 | 3/f: | |
999 | m1 |
|
1001 | m1 | |
1000 | 3/f.base: |
|
1002 | 3/f.base: | |
1001 | a |
|
1003 | a | |
1002 | 3/f.local: |
|
1004 | 3/f.local: | |
1003 | m1 |
|
1005 | m1 | |
1004 | 3/f.orig: |
|
1006 | 3/f.orig: | |
1005 | m1 |
|
1007 | m1 | |
1006 | 3/f.other: |
|
1008 | 3/f.other: | |
1007 | m2 |
|
1009 | m2 | |
1008 | 3/g: |
|
1010 | 3/g: | |
1009 | m1 |
|
1011 | m1 | |
1010 | 3/g.base: |
|
1012 | 3/g.base: | |
1011 | a |
|
1013 | a | |
1012 | 3/g.local: |
|
1014 | 3/g.local: | |
1013 | m1 |
|
1015 | m1 | |
1014 | 3/g.orig: |
|
1016 | 3/g.orig: | |
1015 | m1 |
|
1017 | m1 | |
1016 | 3/g.other: |
|
1018 | 3/g.other: | |
1017 | m2 |
|
1019 | m2 | |
1018 | 4/g: |
|
1020 | 4/g: | |
1019 | m1 |
|
1021 | m1 | |
1020 | 4/g.base: |
|
1022 | 4/g.base: | |
1021 | a |
|
1023 | a | |
1022 | 4/g.local: |
|
1024 | 4/g.local: | |
1023 | m1 |
|
1025 | m1 | |
1024 | 4/g.orig: |
|
1026 | 4/g.orig: | |
1025 | m1 |
|
1027 | m1 | |
1026 | 4/g.other: |
|
1028 | 4/g.other: | |
1027 | m2 |
|
1029 | m2 | |
1028 | 5/f: |
|
1030 | 5/f: | |
1029 | m1 |
|
1031 | m1 | |
1030 | 5/f.base: |
|
1032 | 5/f.base: | |
1031 | a |
|
1033 | a | |
1032 | 5/f.local: |
|
1034 | 5/f.local: | |
1033 | m1 |
|
1035 | m1 | |
1034 | 5/f.orig: |
|
1036 | 5/f.orig: | |
1035 | m1 |
|
1037 | m1 | |
1036 | 5/f.other: |
|
1038 | 5/f.other: | |
1037 | m2 |
|
1039 | m2 | |
1038 | 5/g: |
|
1040 | 5/g: | |
1039 | m1 |
|
1041 | m1 | |
1040 | 5/g.base: |
|
1042 | 5/g.base: | |
1041 | a |
|
1043 | a | |
1042 | 5/g.local: |
|
1044 | 5/g.local: | |
1043 | m1 |
|
1045 | m1 | |
1044 | 5/g.orig: |
|
1046 | 5/g.orig: | |
1045 | m1 |
|
1047 | m1 | |
1046 | 5/g.other: |
|
1048 | 5/g.other: | |
1047 | m2 |
|
1049 | m2 | |
1048 | 6/g: |
|
1050 | 6/g: | |
1049 | m1 |
|
1051 | m1 | |
1050 | 6/g.base: |
|
1052 | 6/g.base: | |
1051 | a |
|
1053 | a | |
1052 | 6/g.local: |
|
1054 | 6/g.local: | |
1053 | m1 |
|
1055 | m1 | |
1054 | 6/g.orig: |
|
1056 | 6/g.orig: | |
1055 | m1 |
|
1057 | m1 | |
1056 | 6/g.other: |
|
1058 | 6/g.other: | |
1057 | m2 |
|
1059 | m2 | |
1058 | 7/f: |
|
1060 | 7/f: | |
1059 | m |
|
1061 | m | |
1060 | 7/f.base: |
|
1062 | 7/f.base: | |
1061 | 7/f.local: |
|
1063 | 7/f.local: | |
1062 | m |
|
1064 | m | |
1063 | 7/f.orig: |
|
1065 | 7/f.orig: | |
1064 | m |
|
1066 | m | |
1065 | 7/f.other: |
|
1067 | 7/f.other: | |
1066 | m2 |
|
1068 | m2 | |
1067 | 8/f: |
|
1069 | 8/f: | |
1068 | m2 |
|
1070 | m2 | |
1069 | $ cd .. |
|
1071 | $ cd .. |
@@ -1,120 +1,121 b'' | |||||
1 | test merging things outside of the sparse checkout |
|
1 | test merging things outside of the sparse checkout | |
2 |
|
2 | |||
3 | $ hg init myrepo |
|
3 | $ hg init myrepo | |
4 | $ cd myrepo |
|
4 | $ cd myrepo | |
5 | $ cat > .hg/hgrc <<EOF |
|
5 | $ cat > .hg/hgrc <<EOF | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > sparse= |
|
7 | > sparse= | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | $ echo foo > foo |
|
10 | $ echo foo > foo | |
11 | $ echo bar > bar |
|
11 | $ echo bar > bar | |
12 | $ hg add foo bar |
|
12 | $ hg add foo bar | |
13 | $ hg commit -m initial |
|
13 | $ hg commit -m initial | |
14 |
|
14 | |||
15 | $ hg branch feature |
|
15 | $ hg branch feature | |
16 | marked working directory as branch feature |
|
16 | marked working directory as branch feature | |
17 | (branches are permanent and global, did you want a bookmark?) |
|
17 | (branches are permanent and global, did you want a bookmark?) | |
18 | $ echo bar2 >> bar |
|
18 | $ echo bar2 >> bar | |
19 | $ hg commit -m 'feature - bar2' |
|
19 | $ hg commit -m 'feature - bar2' | |
20 |
|
20 | |||
21 | $ hg update -q default |
|
21 | $ hg update -q default | |
22 | $ hg debugsparse --exclude 'bar**' |
|
22 | $ hg debugsparse --exclude 'bar**' | |
23 |
|
23 | |||
24 | $ hg merge feature |
|
24 | $ hg merge feature | |
25 | temporarily included 1 file(s) in the sparse checkout for merging |
|
25 | temporarily included 1 file(s) in the sparse checkout for merging | |
26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 | (branch merge, don't forget to commit) |
|
27 | (branch merge, don't forget to commit) | |
28 |
|
28 | |||
29 | Verify bar was merged temporarily |
|
29 | Verify bar was merged temporarily | |
30 |
|
30 | |||
31 | $ ls |
|
31 | $ ls | |
32 | bar |
|
32 | bar | |
33 | foo |
|
33 | foo | |
34 | $ hg status |
|
34 | $ hg status | |
35 | M bar |
|
35 | M bar | |
36 |
|
36 | |||
37 | Verify bar disappears automatically when the working copy becomes clean |
|
37 | Verify bar disappears automatically when the working copy becomes clean | |
38 |
|
38 | |||
39 | $ hg commit -m "merged" |
|
39 | $ hg commit -m "merged" | |
40 | cleaned up 1 temporarily added file(s) from the sparse checkout |
|
40 | cleaned up 1 temporarily added file(s) from the sparse checkout | |
41 | $ hg status |
|
41 | $ hg status | |
42 | $ ls |
|
42 | $ ls | |
43 | foo |
|
43 | foo | |
44 |
|
44 | |||
45 | $ hg cat -r . bar |
|
45 | $ hg cat -r . bar | |
46 | bar |
|
46 | bar | |
47 | bar2 |
|
47 | bar2 | |
48 |
|
48 | |||
49 | Test merging things outside of the sparse checkout that are not in the working |
|
49 | Test merging things outside of the sparse checkout that are not in the working | |
50 | copy |
|
50 | copy | |
51 |
|
51 | |||
52 | $ hg strip -q -r . --config extensions.strip= |
|
52 | $ hg strip -q -r . --config extensions.strip= | |
53 | $ hg up -q feature |
|
53 | $ hg up -q feature | |
54 | $ touch branchonly |
|
54 | $ touch branchonly | |
55 | $ hg ci -Aqm 'add branchonly' |
|
55 | $ hg ci -Aqm 'add branchonly' | |
56 |
|
56 | |||
57 | $ hg up -q default |
|
57 | $ hg up -q default | |
58 | $ hg debugsparse -X branchonly |
|
58 | $ hg debugsparse -X branchonly | |
59 | $ hg merge feature |
|
59 | $ hg merge feature | |
60 | temporarily included 2 file(s) in the sparse checkout for merging |
|
60 | temporarily included 2 file(s) in the sparse checkout for merging | |
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
62 | (branch merge, don't forget to commit) |
|
62 | (branch merge, don't forget to commit) | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. | |
65 |
|
65 | |||
66 | Tests merging a file which is modified in one branch and deleted in another and |
|
66 | Tests merging a file which is modified in one branch and deleted in another and | |
67 | file is excluded from sparse checkout |
|
67 | file is excluded from sparse checkout | |
68 |
|
68 | |||
69 | $ hg init ytest |
|
69 | $ hg init ytest | |
70 | $ cd ytest |
|
70 | $ cd ytest | |
71 | $ echo "syntax: glob" >> .hgignore |
|
71 | $ echo "syntax: glob" >> .hgignore | |
72 | $ echo "*.orig" >> .hgignore |
|
72 | $ echo "*.orig" >> .hgignore | |
73 | $ hg ci -Aqm "added .hgignore" |
|
73 | $ hg ci -Aqm "added .hgignore" | |
74 | $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done; |
|
74 | $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done; | |
75 | $ cat >> .hg/hgrc <<EOF |
|
75 | $ cat >> .hg/hgrc <<EOF | |
76 | > [alias] |
|
76 | > [alias] | |
77 | > glog = log -GT "{rev}:{node|short} {desc}" |
|
77 | > glog = log -GT "{rev}:{node|short} {desc}" | |
78 | > [extensions] |
|
78 | > [extensions] | |
79 | > sparse = |
|
79 | > sparse = | |
80 | > EOF |
|
80 | > EOF | |
81 |
|
81 | |||
82 | $ hg glog |
|
82 | $ hg glog | |
83 | @ 2:f29feff37cfc added d |
|
83 | @ 2:f29feff37cfc added d | |
84 | | |
|
84 | | | |
85 | o 1:617125d27d6b added a |
|
85 | o 1:617125d27d6b added a | |
86 | | |
|
86 | | | |
87 | o 0:53f3774ed939 added .hgignore |
|
87 | o 0:53f3774ed939 added .hgignore | |
88 |
|
88 | |||
89 | $ hg rm d |
|
89 | $ hg rm d | |
90 | $ hg ci -m "removed d" |
|
90 | $ hg ci -m "removed d" | |
91 |
|
91 | |||
92 | $ hg up '.^' |
|
92 | $ hg up '.^' | |
93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
94 | $ hg debugsparse --reset |
|
94 | $ hg debugsparse --reset | |
95 | $ echo bar >> d |
|
95 | $ echo bar >> d | |
96 | $ hg ci -Am "added bar to d" |
|
96 | $ hg ci -Am "added bar to d" | |
97 | created new head |
|
97 | created new head | |
98 |
|
98 | |||
99 | $ hg glog |
|
99 | $ hg glog | |
100 | @ 4:6527874a90e4 added bar to d |
|
100 | @ 4:6527874a90e4 added bar to d | |
101 | | |
|
101 | | | |
102 | | o 3:372c8558de45 removed d |
|
102 | | o 3:372c8558de45 removed d | |
103 | |/ |
|
103 | |/ | |
104 | o 2:f29feff37cfc added d |
|
104 | o 2:f29feff37cfc added d | |
105 | | |
|
105 | | | |
106 | o 1:617125d27d6b added a |
|
106 | o 1:617125d27d6b added a | |
107 | | |
|
107 | | | |
108 | o 0:53f3774ed939 added .hgignore |
|
108 | o 0:53f3774ed939 added .hgignore | |
109 |
|
109 | |||
110 | $ hg debugsparse --exclude "d" |
|
110 | $ hg debugsparse --exclude "d" | |
111 | $ ls |
|
111 | $ ls | |
112 | a |
|
112 | a | |
113 |
|
113 | |||
114 | $ hg merge |
|
114 | $ hg merge | |
115 | temporarily included 1 file(s) in the sparse checkout for merging |
|
115 | temporarily included 1 file(s) in the sparse checkout for merging | |
116 |
local [working copy] |
|
116 | file d was deleted in local [working copy] but was modified in other [merge rev]. | |
|
117 | What do you want to do? | |||
117 |
|
|
118 | use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
118 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
119 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
119 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
120 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
120 | [1] |
|
121 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now