Show More
@@ -2644,20 +2644,18 b' def status(ui, repo, *pats, **opts):' | |||
|
2644 | 2644 | changestates = zip(states, 'MAR!?IC', stat) |
|
2645 | 2645 | |
|
2646 | 2646 | if (opts['all'] or opts['copies']) and not opts['no_status']: |
|
2647 | if opts.get('rev') == []: | |
|
2648 | # fast path, more correct with merge parents | |
|
2649 | copy = repo.dirstate.copies() | |
|
2650 | else: | |
|
2651 | ctxn = repo.changectx(nullid) | |
|
2652 | ctx1 = repo.changectx(node1) | |
|
2653 |
ctx2 = repo. |
|
|
2654 | if node2 is None: | |
|
2655 | ctx2 = repo.workingctx() | |
|
2656 | for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].items(): | |
|
2657 |
|
|
|
2658 |
|
|
|
2659 | elif k in stat[1]: | |
|
2660 | copy[k] = v | |
|
2647 | ctxn = repo.changectx(nullid) | |
|
2648 | ctx1 = repo.changectx(node1) | |
|
2649 | ctx2 = repo.changectx(node2) | |
|
2650 | added = stat[1] | |
|
2651 | if node2 is None: | |
|
2652 | added = stat[0] + stat[1] # merged? | |
|
2653 | ctx2 = repo.workingctx() | |
|
2654 | for k, v in copies.copies(repo, ctx1, ctx2, ctxn)[0].items(): | |
|
2655 | if k in added: | |
|
2656 | copy[k] = v | |
|
2657 | elif v in added: | |
|
2658 | copy[v] = k | |
|
2661 | 2659 | |
|
2662 | 2660 | for state, char, files in changestates: |
|
2663 | 2661 | if state in show: |
@@ -109,6 +109,10 b' def copies(repo, c1, c2, ca, checkdirs=F' | |||
|
109 | 109 | if not c1 or not c2 or c1 == c2: |
|
110 | 110 | return {}, {} |
|
111 | 111 | |
|
112 | # avoid silly behavior for parent -> working dir | |
|
113 | if c2.node() == None and c1.node() == repo.dirstate.parents()[0]: | |
|
114 | return repo.dirstate.copies(), {} | |
|
115 | ||
|
112 | 116 | limit = _findlimit(repo, c1.rev(), c2.rev()) |
|
113 | 117 | m1 = c1.manifest() |
|
114 | 118 | m2 = c2.manifest() |
General Comments 0
You need to be logged in to leave comments.
Login now