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