Mercurial > hg
changeset 12227:479458f2483e
i18n: merge default heads
author | Wagner Bruna <wbruna@softwareexpress.com.br> |
---|---|
date | Tue, 24 Aug 2010 11:01:45 -0300 |
parents | ce818cf215dc (diff) d212c043805d (current diff) |
children | 844880ec2bab 6a4ddae65397 |
files | |
diffstat | 5 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Sat Aug 21 11:22:49 2010 +0200 +++ b/mercurial/filemerge.py Tue Aug 24 11:01:45 2010 -0300 @@ -138,9 +138,6 @@ if not fco.cmp(fcd): # files identical? return None - if fca == fco: # backwards, use working dir parent as ancestor - fca = fcd.parents()[0] - ui = repo.ui fd = fcd.path() binary = isbin(fcd) or isbin(fco) or isbin(fca)
--- a/mercurial/hbisect.py Sat Aug 21 11:22:49 2010 +0200 +++ b/mercurial/hbisect.py Tue Aug 24 11:01:45 2010 -0300 @@ -61,6 +61,8 @@ badrev, ancestors = buildancestors(state['good'], state['bad']) bad = changelog.node(badrev) if not ancestors: # now we're confused + if len(state['bad']) == 1 and len(state['good']) == 1: + raise util.Abort(_("starting revisions are not directly related")) raise util.Abort(_("Inconsistent state, %s:%s is good and bad") % (badrev, short(bad)))
--- a/mercurial/merge.py Sat Aug 21 11:22:49 2010 +0200 +++ b/mercurial/merge.py Tue Aug 24 11:01:45 2010 -0300 @@ -270,7 +270,12 @@ repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) fcl = wctx[f] fco = mctx[f2] - fca = fcl.ancestor(fco, actx) or repo.filectx(f, fileid=nullrev) + if mctx == actx: # backwards, use working dir parent as ancestor + fca = fcl.parents()[0] + else: + fca = fcl.ancestor(fco, actx) + if not fca: + fca = repo.filectx(f, fileid=nullrev) ms.add(fcl, fco, fca, fd, flags) if f != fd and move: moves.append(f)
--- a/tests/test-bisect.out Sat Aug 21 11:22:49 2010 +0200 +++ b/tests/test-bisect.out Tue Aug 24 11:01:45 2010 -0300 @@ -237,7 +237,7 @@ date: Thu Jan 01 00:00:01 1970 +0000 summary: msg 1 -abort: Inconsistent state, 31:58c80a7c8a40 is good and bad +abort: starting revisions are not directly related error Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests) 5cd978ea5149
--- a/tests/test-bisect2.t Sat Aug 21 11:22:49 2010 +0200 +++ b/tests/test-bisect2.t Tue Aug 24 11:01:45 2010 -0300 @@ -23,9 +23,6 @@ # | # 0 - - $ set -e - init $ hg init @@ -389,3 +386,11 @@ date: Thu Jan 01 00:00:17 1970 +0000 summary: 17 + +test unrelated revs: + + $ hg bisect --reset + $ hg bisect -b 7 + $ hg bisect -g 14 + abort: starting revisions are not directly related + $ hg bisect --reset