Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 15774:0bd17a4bed88
copies: split the copies api for "normal" and merge cases (API)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 04 Jan 2012 15:48:02 -0600 |
parents | 371cff9610cd |
children | 91eb4512edd0 |
comparison
equal
deleted
inserted
replaced
15773:371cff9610cd | 15774:0bd17a4bed88 |
---|---|
5204 'ignored' in show, 'clean' in show, 'unknown' in show, | 5204 'ignored' in show, 'clean' in show, 'unknown' in show, |
5205 opts.get('subrepos')) | 5205 opts.get('subrepos')) |
5206 changestates = zip(states, 'MAR!?IC', stat) | 5206 changestates = zip(states, 'MAR!?IC', stat) |
5207 | 5207 |
5208 if (opts.get('all') or opts.get('copies')) and not opts.get('no_status'): | 5208 if (opts.get('all') or opts.get('copies')) and not opts.get('no_status'): |
5209 ctxn = repo[nullid] | |
5210 ctx1 = repo[node1] | 5209 ctx1 = repo[node1] |
5211 ctx2 = repo[node2] | 5210 ctx2 = repo[node2] |
5212 added = stat[1] | 5211 added = stat[1] |
5213 if node2 is None: | 5212 if node2 is None: |
5214 added = stat[0] + stat[1] # merged? | 5213 added = stat[0] + stat[1] # merged? |
5215 | 5214 |
5216 for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].iteritems(): | 5215 for k, v in copies.pathcopies(ctx1, ctx2).iteritems(): |
5217 if k in added: | 5216 if k in added: |
5218 copy[k] = v | 5217 copy[k] = v |
5219 elif v in added: | 5218 elif v in added: |
5220 copy[v] = k | 5219 copy[v] = k |
5221 | 5220 |