Mercurial > hg
changeset 6658:7ca74741259f
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 Jun 2008 12:11:06 -0500 |
parents | 9eb274d773d9 (diff) a51093361e1c (current diff) |
children | 5fb42da426cd |
files | mercurial/commands.py |
diffstat | 3 files changed, 16 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Jun 07 17:52:00 2008 +0200 +++ b/mercurial/commands.py Tue Jun 10 12:11:06 2008 -0500 @@ -2661,20 +2661,18 @@ changestates = zip(states, 'MAR!?IC', stat) if (opts['all'] or opts['copies']) and not opts['no_status']: - if opts.get('rev') == []: - # fast path, more correct with merge parents - copy = repo.dirstate.copies() - else: - ctxn = repo.changectx(nullid) - ctx1 = repo.changectx(node1) - ctx2 = repo.changectx(node2) - if node2 is None: - ctx2 = repo.workingctx() - for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].items(): - if v in stat[1]: - copy[v] = k - elif k in stat[1]: - copy[k] = v + ctxn = repo.changectx(nullid) + ctx1 = repo.changectx(node1) + ctx2 = repo.changectx(node2) + added = stat[1] + if node2 is None: + added = stat[0] + stat[1] # merged? + ctx2 = repo.workingctx() + for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].items(): + if k in added: + copy[k] = v + elif v in added: + copy[v] = k for state, char, files in changestates: if state in show:
--- a/mercurial/copies.py Sat Jun 07 17:52:00 2008 +0200 +++ b/mercurial/copies.py Tue Jun 10 12:11:06 2008 -0500 @@ -109,6 +109,10 @@ if not c1 or not c2 or c1 == c2: return {}, {} + # avoid silly behavior for parent -> working dir + if c2.node() == None and c1.node() == repo.dirstate.parents()[0]: + return repo.dirstate.copies(), {} + limit = _findlimit(repo, c1.rev(), c2.rev()) m1 = c1.manifest() m2 = c2.manifest()