Mercurial > hg
changeset 6091:41aa0a37d9be
merge with main
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 14 Feb 2008 00:13:20 +0100 |
parents | 152b6c5c1574 (current diff) fb259a3572e9 (diff) |
children | 911f5be5d159 |
files | mercurial/util.py |
diffstat | 5 files changed, 26 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/mergetools.hgrc Wed Feb 13 19:34:28 2008 -0200 +++ b/contrib/mergetools.hgrc Thu Feb 14 00:13:20 2008 +0100 @@ -28,6 +28,7 @@ xxdiff.priority=-8 diffmerge.args=--nosplash --merge --title1=base --title2=local --title3=other $base $local $other +diffmerge.checkchanged=True diffmerge.gui=True p4merge.args=$base $local $other $output
--- a/doc/hgrc.5.txt Wed Feb 13 19:34:28 2008 -0200 +++ b/doc/hgrc.5.txt Thu Feb 14 00:13:20 2008 +0100 @@ -289,6 +289,10 @@ Check whether there are conflicts even though the tool reported success. Default: False + checkchanged;; + Check whether outputs were written even though the tool reported + success. + Default: False fixeol;; Attempt to fix up EOL changes caused by the merge tool. Default: False
--- a/hgext/convert/cvs.py Wed Feb 13 19:34:28 2008 -0200 +++ b/hgext/convert/cvs.py Thu Feb 14 00:13:20 2008 +0100 @@ -71,7 +71,7 @@ elif l.startswith("Ancestor branch"): ancestor = l[17:-1] # figure out the parent later - self.parent[id] = None + self.parent[id] = self.lastbranch[ancestor] elif l.startswith("Author"): author = self.recode(l[8:-1]) elif l.startswith("Tag:") or l.startswith("Tags:"): @@ -101,13 +101,14 @@ p = [] if branch == "HEAD": branch = "" - if branch and p[0] == None: + if branch: latest = None # the last changeset that contains a base # file is our parent for r in oldrevs: - latest = max(filerevids[r], latest) - p = [latest] + latest = max(filerevids.get(r, None), latest) + if latest: + p = [latest] # add current commit to set c = commit(author=author, date=date, parents=p,
--- a/mercurial/filemerge.py Wed Feb 13 19:34:28 2008 -0200 +++ b/mercurial/filemerge.py Thu Feb 14 00:13:20 2008 +0100 @@ -7,7 +7,7 @@ from node import * from i18n import _ -import util, os, tempfile, context, simplemerge, re +import util, os, tempfile, context, simplemerge, re, filecmp def _toolstr(ui, tool, part, default=""): return ui.config("merge-tools", tool + "." + part, default) @@ -60,10 +60,14 @@ t = k.split('.')[0] if t not in tools: tools[t] = int(_toolstr(ui, t, "priority", "0")) + names = tools.keys() tools = [(-p,t) for t,p in tools.items()] tools.sort() - if ui.config("ui", "merge"): - tools.insert(0, (None, ui.config("ui", "merge"))) # highest priority + uimerge = ui.config("ui", "merge") + if uimerge: + if uimerge not in names: + return (uimerge, uimerge) + tools.insert(0, (None, uimerge)) # highest priority tools.append((None, "hgmerge")) # the old default, if found for p,t in tools: toolpath = _findtool(ui, t) @@ -193,6 +197,13 @@ if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcm.data()): r = 1 + if not r and _toolbool(ui, tool, "checkchanged"): + if filecmp.cmp(repo.wjoin(fd), back): + if ui.prompt(_(" output file %s appears unchanged\n" + "was merge successful (yn)?") % fd, + _("[yn]"), _("n")) != _("y"): + r = 1 + if _toolbool(ui, tool, "fixeol"): _matcheol(repo.wjoin(fd), back)
--- a/mercurial/util.py Wed Feb 13 19:34:28 2008 -0200 +++ b/mercurial/util.py Thu Feb 14 00:13:20 2008 +0100 @@ -459,6 +459,8 @@ return try: pat = '(?:%s)' % '|'.join([regex(k, p, tail) for (k, p) in pats]) + if len(pat) > 20000: + raise OverflowError() return re.compile(pat).match except OverflowError: # We're using a Python with a tiny regex engine and we