##// END OF EJS Templates
revert: distinguish between deleted file and locally modified...
Pierre-Yves David -
r22397:1db04829 default
parent child Browse files
Show More
@@ -2425,9 +2425,8 b' def revert(ui, repo, ctx, parents, *pats'
2425
2425
2426 # determine the exact nature of the deleted changesets
2426 # determine the exact nature of the deleted changesets
2427 _deletedadded = _deleted - smf
2427 _deletedadded = _deleted - smf
2428 _deletedmodified = _deleted - _deletedadded
2428 deleted = _deleted - _deletedadded
2429 added |= _deletedadded
2429 added |= _deletedadded
2430 modified |= _deletedmodified
2431
2430
2432 # We need to account for the state of file in the dirstate
2431 # We need to account for the state of file in the dirstate
2433 #
2432 #
@@ -2541,6 +2540,8 b' def revert(ui, repo, ctx, parents, *pats'
2541 ## Sets that results that will change file on disk
2540 ## Sets that results that will change file on disk
2542 # Modified compared to target, no local change
2541 # Modified compared to target, no local change
2543 (modified, actions['revert'], discard),
2542 (modified, actions['revert'], discard),
2543 # Modified compared to target, but local file is deleted
2544 (deleted, actions['revert'], discard),
2544 # Modified compared to target, local change
2545 # Modified compared to target, local change
2545 (dsmodified, actions['revert'], backup),
2546 (dsmodified, actions['revert'], backup),
2546 # Added since target
2547 # Added since target
General Comments 0
You need to be logged in to leave comments. Login now