##// END OF EJS Templates
revert: track added files with local modifications...
Pierre-Yves David -
r22610:0f323ed8 default
parent child Browse files
Show More
@@ -2524,6 +2524,7 b' def revert(ui, repo, ctx, parents, *pats'
2524 unknown = set(changes[4])
2524 unknown = set(changes[4])
2525 unknown.update(changes[5])
2525 unknown.update(changes[5])
2526 clean = set(changes[6])
2526 clean = set(changes[6])
2527 modadded = set()
2527
2528
2528 # split between files known in target manifest and the others
2529 # split between files known in target manifest and the others
2529 smf = set(mf)
2530 smf = set(mf)
@@ -2554,6 +2555,9 b' def revert(ui, repo, ctx, parents, *pats'
2554 # distinct between dirstate remove and other
2555 # distinct between dirstate remove and other
2555 removed -= dsremoved
2556 removed -= dsremoved
2556
2557
2558 modadded = added & dsmodified
2559 added -= modadded
2560
2557 # tell newly modified apart.
2561 # tell newly modified apart.
2558 dsmodified &= modified
2562 dsmodified &= modified
2559 dsmodified |= modified & dsadded # dirstate added may needs backup
2563 dsmodified |= modified & dsadded # dirstate added may needs backup
@@ -2653,6 +2657,8 b' def revert(ui, repo, ctx, parents, *pats'
2653 (added, actions['remove'], discard),
2657 (added, actions['remove'], discard),
2654 # Added in working directory
2658 # Added in working directory
2655 (dsadded, actions['forget'], discard),
2659 (dsadded, actions['forget'], discard),
2660 # Added since target, have local modification
2661 (modadded, actions['remove'], discard),
2656 # Added since target but file is missing in working directory
2662 # Added since target but file is missing in working directory
2657 (deladded, actions['drop'], discard),
2663 (deladded, actions['drop'], discard),
2658 # Removed since target, before working copy parent
2664 # Removed since target, before working copy parent
General Comments 0
You need to be logged in to leave comments. Login now