Show More
@@ -28,6 +28,7 b' xxdiff.gui=True' | |||||
28 | xxdiff.priority=-8 |
|
28 | xxdiff.priority=-8 | |
29 |
|
29 | |||
30 | diffmerge.args=--nosplash --merge --title1=base --title2=local --title3=other $base $local $other |
|
30 | diffmerge.args=--nosplash --merge --title1=base --title2=local --title3=other $base $local $other | |
|
31 | diffmerge.checkchanged=True | |||
31 | diffmerge.gui=True |
|
32 | diffmerge.gui=True | |
32 |
|
33 | |||
33 | p4merge.args=$base $local $other $output |
|
34 | p4merge.args=$base $local $other $output |
@@ -289,6 +289,10 b' merge-tools::' | |||||
289 | Check whether there are conflicts even though the tool reported |
|
289 | Check whether there are conflicts even though the tool reported | |
290 | success. |
|
290 | success. | |
291 | Default: False |
|
291 | Default: False | |
|
292 | checkchanged;; | |||
|
293 | Check whether outputs were written even though the tool reported | |||
|
294 | success. | |||
|
295 | Default: False | |||
292 | fixeol;; |
|
296 | fixeol;; | |
293 | Attempt to fix up EOL changes caused by the merge tool. |
|
297 | Attempt to fix up EOL changes caused by the merge tool. | |
294 | Default: False |
|
298 | Default: False |
@@ -71,7 +71,7 b' class convert_cvs(converter_source):' | |||||
71 | elif l.startswith("Ancestor branch"): |
|
71 | elif l.startswith("Ancestor branch"): | |
72 | ancestor = l[17:-1] |
|
72 | ancestor = l[17:-1] | |
73 | # figure out the parent later |
|
73 | # figure out the parent later | |
74 |
self.parent[id] = |
|
74 | self.parent[id] = self.lastbranch[ancestor] | |
75 | elif l.startswith("Author"): |
|
75 | elif l.startswith("Author"): | |
76 | author = self.recode(l[8:-1]) |
|
76 | author = self.recode(l[8:-1]) | |
77 | elif l.startswith("Tag:") or l.startswith("Tags:"): |
|
77 | elif l.startswith("Tag:") or l.startswith("Tags:"): | |
@@ -101,13 +101,14 b' class convert_cvs(converter_source):' | |||||
101 | p = [] |
|
101 | p = [] | |
102 | if branch == "HEAD": |
|
102 | if branch == "HEAD": | |
103 | branch = "" |
|
103 | branch = "" | |
104 |
if branch |
|
104 | if branch: | |
105 | latest = None |
|
105 | latest = None | |
106 | # the last changeset that contains a base |
|
106 | # the last changeset that contains a base | |
107 | # file is our parent |
|
107 | # file is our parent | |
108 | for r in oldrevs: |
|
108 | for r in oldrevs: | |
109 |
latest = max(filerevids |
|
109 | latest = max(filerevids.get(r, None), latest) | |
110 |
|
|
110 | if latest: | |
|
111 | p = [latest] | |||
111 |
|
112 | |||
112 | # add current commit to set |
|
113 | # add current commit to set | |
113 | c = commit(author=author, date=date, parents=p, |
|
114 | c = commit(author=author, date=date, parents=p, |
@@ -7,7 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from node import * |
|
8 | from node import * | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 | import util, os, tempfile, context, simplemerge, re |
|
10 | import util, os, tempfile, context, simplemerge, re, filecmp | |
11 |
|
11 | |||
12 | def _toolstr(ui, tool, part, default=""): |
|
12 | def _toolstr(ui, tool, part, default=""): | |
13 | return ui.config("merge-tools", tool + "." + part, default) |
|
13 | return ui.config("merge-tools", tool + "." + part, default) | |
@@ -60,10 +60,14 b' def _picktool(repo, ui, path, binary, sy' | |||||
60 | t = k.split('.')[0] |
|
60 | t = k.split('.')[0] | |
61 | if t not in tools: |
|
61 | if t not in tools: | |
62 | tools[t] = int(_toolstr(ui, t, "priority", "0")) |
|
62 | tools[t] = int(_toolstr(ui, t, "priority", "0")) | |
|
63 | names = tools.keys() | |||
63 | tools = [(-p,t) for t,p in tools.items()] |
|
64 | tools = [(-p,t) for t,p in tools.items()] | |
64 | tools.sort() |
|
65 | tools.sort() | |
65 |
|
|
66 | uimerge = ui.config("ui", "merge") | |
66 | tools.insert(0, (None, ui.config("ui", "merge"))) # highest priority |
|
67 | if uimerge: | |
|
68 | if uimerge not in names: | |||
|
69 | return (uimerge, uimerge) | |||
|
70 | tools.insert(0, (None, uimerge)) # highest priority | |||
67 | tools.append((None, "hgmerge")) # the old default, if found |
|
71 | tools.append((None, "hgmerge")) # the old default, if found | |
68 | for p,t in tools: |
|
72 | for p,t in tools: | |
69 | toolpath = _findtool(ui, t) |
|
73 | toolpath = _findtool(ui, t) | |
@@ -193,6 +197,13 b' def filemerge(repo, fw, fd, fo, wctx, mc' | |||||
193 | if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcm.data()): |
|
197 | if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcm.data()): | |
194 | r = 1 |
|
198 | r = 1 | |
195 |
|
199 | |||
|
200 | if not r and _toolbool(ui, tool, "checkchanged"): | |||
|
201 | if filecmp.cmp(repo.wjoin(fd), back): | |||
|
202 | if ui.prompt(_(" output file %s appears unchanged\n" | |||
|
203 | "was merge successful (yn)?") % fd, | |||
|
204 | _("[yn]"), _("n")) != _("y"): | |||
|
205 | r = 1 | |||
|
206 | ||||
196 | if _toolbool(ui, tool, "fixeol"): |
|
207 | if _toolbool(ui, tool, "fixeol"): | |
197 | _matcheol(repo.wjoin(fd), back) |
|
208 | _matcheol(repo.wjoin(fd), back) | |
198 |
|
209 |
@@ -459,6 +459,8 b' def _matcher(canonroot, cwd, names, inc,' | |||||
459 | return |
|
459 | return | |
460 | try: |
|
460 | try: | |
461 | pat = '(?:%s)' % '|'.join([regex(k, p, tail) for (k, p) in pats]) |
|
461 | pat = '(?:%s)' % '|'.join([regex(k, p, tail) for (k, p) in pats]) | |
|
462 | if len(pat) > 20000: | |||
|
463 | raise OverflowError() | |||
462 | return re.compile(pat).match |
|
464 | return re.compile(pat).match | |
463 | except OverflowError: |
|
465 | except OverflowError: | |
464 | # We're using a Python with a tiny regex engine and we |
|
466 | # We're using a Python with a tiny regex engine and we |
General Comments 0
You need to be logged in to leave comments.
Login now