Mercurial > hg
comparison mercurial/copies.py @ 6277:cfebb175704f
copies: deal with symmetric difference for linear relationships
choose the minimum of symmetric difference and the two revs in question
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 15 Mar 2008 16:25:27 -0500 |
parents | fda369b5779c |
children | 5a45c82fc7da |
comparison
equal
deleted
inserted
replaced
6276:c93ca83a3354 | 6277:cfebb175704f |
---|---|
66 if rev2 is None: # c2 is a workingctx | 66 if rev2 is None: # c2 is a workingctx |
67 rev2 = c2.parents()[0].rev() | 67 rev2 = c2.parents()[0].rev() |
68 pr = repo.changelog.parentrevs | 68 pr = repo.changelog.parentrevs |
69 def parents(rev): | 69 def parents(rev): |
70 return [p for p in pr(rev) if p != nullrev] | 70 return [p for p in pr(rev) if p != nullrev] |
71 limit = min(ancestor.symmetricdifference(rev1, rev2, parents)) | 71 limit = min(ancestor.symmetricdifference(rev1, rev2, parents) + [rev1, rev2]) |
72 m1 = c1.manifest() | 72 m1 = c1.manifest() |
73 m2 = c2.manifest() | 73 m2 = c2.manifest() |
74 ma = ca.manifest() | 74 ma = ca.manifest() |
75 | 75 |
76 def makectx(f, n): | 76 def makectx(f, n): |