Show More
@@ -550,10 +550,14 b' class filectx(object):' | |||||
550 | return None |
|
550 | return None | |
551 |
|
551 | |||
552 | def ancestors(self): |
|
552 | def ancestors(self): | |
553 |
seen = set( |
|
553 | seen = set() | |
554 | visit = [self] |
|
554 | visit = [self] | |
555 | while visit: |
|
555 | while visit: | |
556 |
|
|
556 | parents = visit.pop(0).parents() | |
|
557 | if len(parents) > 1 and parents[1].rev() > parents[0].rev(): | |||
|
558 | # make sure we return ancestors in reverse revision order | |||
|
559 | parents = reversed(parents) | |||
|
560 | for parent in parents: | |||
557 | s = str(parent) |
|
561 | s = str(parent) | |
558 | if s not in seen: |
|
562 | if s not in seen: | |
559 | visit.append(parent) |
|
563 | visit.append(parent) |
@@ -99,3 +99,29 b" We'd rather not warn on divergent rename" | |||||
99 | b3 |
|
99 | b3 | |
100 | b4 |
|
100 | b4 | |
101 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
101 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
102 | ||||
|
103 | Check for issue2642 | |||
|
104 | ||||
|
105 | $ hg init t | |||
|
106 | $ cd t | |||
|
107 | ||||
|
108 | $ echo c0 > f1 | |||
|
109 | $ hg ci -Aqm0 | |||
|
110 | ||||
|
111 | $ hg up null -q | |||
|
112 | $ echo c1 > f1 # backport | |||
|
113 | $ hg ci -Aqm1 | |||
|
114 | $ hg mv f1 f2 | |||
|
115 | $ hg ci -qm2 | |||
|
116 | ||||
|
117 | $ hg up 0 -q | |||
|
118 | $ hg merge 1 -q --tool internal:local | |||
|
119 | $ hg ci -qm3 | |||
|
120 | ||||
|
121 | $ hg merge 2 | |||
|
122 | merging f1 and f2 to f2 | |||
|
123 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
124 | (branch merge, don't forget to commit) | |||
|
125 | ||||
|
126 | $ cat f2 | |||
|
127 | c0 |
General Comments 0
You need to be logged in to leave comments.
Login now