Show More
@@ -2626,10 +2626,13 def revert(ui, repo, ctx, parents, *pats | |||
|
2626 | 2626 | 'unknown': (None, _('file not managed: %s\n')), |
|
2627 | 2627 | } |
|
2628 | 2628 | |
|
2629 | ||
|
2630 | # should we do a backup? | |
|
2631 | backup = not opts.get('no_backup') | |
|
2632 | discard = False | |
|
2629 | # "constant" that convey the backup strategy. | |
|
2630 | # All set to `discard` if `no-backup` is set do avoid checking | |
|
2631 | # no_backup lower in the code. | |
|
2632 | backup = 2 # unconditionally do backup | |
|
2633 | discard = 0 # never do backup | |
|
2634 | if opts.get('no_backup'): | |
|
2635 | backup = discard | |
|
2633 | 2636 | |
|
2634 | 2637 | disptable = ( |
|
2635 | 2638 | # dispatch table: |
General Comments 0
You need to be logged in to leave comments.
Login now