# HG changeset patch # User Matt Mackall # Date 1183667816 18000 # Node ID 5cc184800bf2ed349455f7de06e5c34a6813aa36 # Parent 744371157212d7d57852de7a015441071f62c17a# Parent 8808ea7da86b49cec3e6f3f6a9ba6f9145b90441 Merge with stable diff -r 744371157212 -r 5cc184800bf2 mercurial/context.py --- a/mercurial/context.py Thu Jul 05 12:45:41 2007 -0700 +++ b/mercurial/context.py Thu Jul 05 15:36:56 2007 -0500 @@ -40,6 +40,9 @@ except AttributeError: return False + def __ne__(self, other): + return not (self == other) + def __nonzero__(self): return self._rev != nullrev @@ -185,6 +188,9 @@ except AttributeError: return False + def __ne__(self, other): + return not (self == other) + def filectx(self, fileid): '''opens an arbitrary revision of the file without opening a new filelog''' diff -r 744371157212 -r 5cc184800bf2 mercurial/merge.py --- a/mercurial/merge.py Thu Jul 05 12:45:41 2007 -0700 +++ b/mercurial/merge.py Thu Jul 05 15:36:56 2007 -0500 @@ -523,7 +523,7 @@ raise util.Abort(_("outstanding uncommitted merges")) if pa == p1 or pa == p2: # is there a linear path from p1 to p2? if branchmerge: - if p1.branch() != p2.branch(): + if p1.branch() != p2.branch() and pa != p2: fastforward = True else: raise util.Abort(_("there is nothing to merge, just use " diff -r 744371157212 -r 5cc184800bf2 tests/test-issue619 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-issue619 Thu Jul 05 15:36:56 2007 -0500 @@ -0,0 +1,20 @@ +#!/bin/sh + +mkdir t +cd t +hg init +echo a > a +hg ci -Ama -d '1000000000 0' +echo b > b +hg branch b +hg ci -Amb -d '1000000000 0' +hg co -C 0 + +echo fast-forward +hg merge b +hg ci -Ammerge -d '1000000000 0' + +echo bogus fast-forward should fail +hg merge b + +echo done diff -r 744371157212 -r 5cc184800bf2 tests/test-issue619.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-issue619.out Thu Jul 05 15:36:56 2007 -0500 @@ -0,0 +1,10 @@ +adding a +marked working directory as branch b +adding b +0 files updated, 0 files merged, 1 files removed, 0 files unresolved +fast-forward +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +(branch merge, don't forget to commit) +bogus fast-forward should fail +abort: there is nothing to merge, just use 'hg update' or look at 'hg heads' +done