Show More
@@ -2640,6 +2640,10 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2640 | if opts.get('no_backup'): |
|
2640 | if opts.get('no_backup'): | |
2641 | backup = check = discard |
|
2641 | backup = check = discard | |
2642 |
|
2642 | |||
|
2643 | backupanddel = actions['remove'] | |||
|
2644 | if not opts.get('no_backup'): | |||
|
2645 | backupanddel = actions['drop'] | |||
|
2646 | ||||
2643 | disptable = ( |
|
2647 | disptable = ( | |
2644 | # dispatch table: |
|
2648 | # dispatch table: | |
2645 | # file state |
|
2649 | # file state | |
@@ -2658,7 +2662,7 b' def revert(ui, repo, ctx, parents, *pats' | |||||
2658 | # Added in working directory |
|
2662 | # Added in working directory | |
2659 | (dsadded, actions['forget'], discard), |
|
2663 | (dsadded, actions['forget'], discard), | |
2660 | # Added since target, have local modification |
|
2664 | # Added since target, have local modification | |
2661 |
(modadded, |
|
2665 | (modadded, backupanddel, backup), | |
2662 | # Added since target but file is missing in working directory |
|
2666 | # Added since target but file is missing in working directory | |
2663 | (deladded, actions['drop'], discard), |
|
2667 | (deladded, actions['drop'], discard), | |
2664 | # Removed since target, before working copy parent |
|
2668 | # Removed since target, before working copy parent |
@@ -940,16 +940,12 b' Compare resulting directory with revert ' | |||||
940 | The diff is filtered to include change only. The only difference should be |
|
940 | The diff is filtered to include change only. The only difference should be | |
941 | additional `.orig` backup file when applicable. |
|
941 | additional `.orig` backup file when applicable. | |
942 |
|
942 | |||
943 | Misbehavior: |
|
|||
944 |
|
||||
945 | - no backup for |
|
|||
946 | | - added_wc (DATA LOSS) |
|
|||
947 |
|
||||
948 | $ python ../dircontent.py > ../content-base-all.txt |
|
943 | $ python ../dircontent.py > ../content-base-all.txt | |
949 | $ cd .. |
|
944 | $ cd .. | |
950 | $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ |
|
945 | $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ | |
951 | +parent added_untracked-clean |
|
946 | +parent added_untracked-clean | |
952 | +wc added_untracked-wc |
|
947 | +wc added_untracked-wc | |
|
948 | +wc added_wc.orig | |||
953 | +wc clean_untracked-wc.orig |
|
949 | +wc clean_untracked-wc.orig | |
954 | +wc clean_wc.orig |
|
950 | +wc clean_wc.orig | |
955 | +wc missing_untracked-wc |
|
951 | +wc missing_untracked-wc |
General Comments 0
You need to be logged in to leave comments.
Login now