Show More
@@ -0,0 +1,20 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | mkdir t | |
|
4 | cd t | |
|
5 | hg init | |
|
6 | echo a > a | |
|
7 | hg ci -Ama -d '1000000000 0' | |
|
8 | echo b > b | |
|
9 | hg branch b | |
|
10 | hg ci -Amb -d '1000000000 0' | |
|
11 | hg co -C 0 | |
|
12 | ||
|
13 | echo fast-forward | |
|
14 | hg merge b | |
|
15 | hg ci -Ammerge -d '1000000000 0' | |
|
16 | ||
|
17 | echo bogus fast-forward should fail | |
|
18 | hg merge b | |
|
19 | ||
|
20 | echo done |
@@ -0,0 +1,10 b'' | |||
|
1 | adding a | |
|
2 | marked working directory as branch b | |
|
3 | adding b | |
|
4 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
5 | fast-forward | |
|
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
7 | (branch merge, don't forget to commit) | |
|
8 | bogus fast-forward should fail | |
|
9 | abort: there is nothing to merge, just use 'hg update' or look at 'hg heads' | |
|
10 | done |
@@ -40,6 +40,9 b' class changectx(object):' | |||
|
40 | 40 | except AttributeError: |
|
41 | 41 | return False |
|
42 | 42 | |
|
43 | def __ne__(self, other): | |
|
44 | return not (self == other) | |
|
45 | ||
|
43 | 46 | def __nonzero__(self): |
|
44 | 47 | return self._rev != nullrev |
|
45 | 48 | |
@@ -185,6 +188,9 b' class filectx(object):' | |||
|
185 | 188 | except AttributeError: |
|
186 | 189 | return False |
|
187 | 190 | |
|
191 | def __ne__(self, other): | |
|
192 | return not (self == other) | |
|
193 | ||
|
188 | 194 | def filectx(self, fileid): |
|
189 | 195 | '''opens an arbitrary revision of the file without |
|
190 | 196 | opening a new filelog''' |
@@ -523,7 +523,7 b' def update(repo, node, branchmerge, forc' | |||
|
523 | 523 | raise util.Abort(_("outstanding uncommitted merges")) |
|
524 | 524 | if pa == p1 or pa == p2: # is there a linear path from p1 to p2? |
|
525 | 525 | if branchmerge: |
|
526 | if p1.branch() != p2.branch(): | |
|
526 | if p1.branch() != p2.branch() and pa != p2: | |
|
527 | 527 | fastforward = True |
|
528 | 528 | else: |
|
529 | 529 | raise util.Abort(_("there is nothing to merge, just use " |
General Comments 0
You need to be logged in to leave comments.
Login now