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