##// END OF EJS Templates
revert: always show relative path to .orig backup...
Martin von Zweigbergk -
r41731:4d484244 default
parent child Browse files
Show More
@@ -3018,8 +3018,9 b' def revert(ui, repo, ctx, parents, *pats'
3018 tobackup.add(abs)
3018 tobackup.add(abs)
3019 elif (backup <= dobackup or wctx[abs].cmp(ctx[abs])):
3019 elif (backup <= dobackup or wctx[abs].cmp(ctx[abs])):
3020 bakname = scmutil.origpath(ui, repo, rel)
3020 bakname = scmutil.origpath(ui, repo, rel)
3021 relbakname = os.path.relpath(bakname)
3021 ui.note(_('saving current version of %s as %s\n') %
3022 ui.note(_('saving current version of %s as %s\n') %
3022 (rel, bakname))
3023 (rel, relbakname))
3023 if not opts.get('dry_run'):
3024 if not opts.get('dry_run'):
3024 if interactive:
3025 if interactive:
3025 util.copyfile(target, bakname)
3026 util.copyfile(target, bakname)
@@ -578,7 +578,7 b' Test orig files go where we want them'
578 $ echo moremore >> anotherlarge
578 $ echo moremore >> anotherlarge
579 $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups'
579 $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups'
580 creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub
580 creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub
581 saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge
581 saving current version of ../.hglf/sub/anotherlarge as ../.hg/origbackups/.hglf/sub/anotherlarge
582 reverting ../.hglf/sub/anotherlarge
582 reverting ../.hglf/sub/anotherlarge
583 creating directory: $TESTTMP/addrm2/.hg/origbackups/sub
583 creating directory: $TESTTMP/addrm2/.hg/origbackups/sub
584 found 90c622cf65cebe75c5842f9136c459333faf392e in store
584 found 90c622cf65cebe75c5842f9136c459333faf392e in store
@@ -92,7 +92,7 b' Test creation of backup (.orig) file in '
92 $ echo z > e
92 $ echo z > e
93 $ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups'
93 $ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups'
94 creating directory: $TESTTMP/repo/.hg/origbackups
94 creating directory: $TESTTMP/repo/.hg/origbackups
95 saving current version of e as $TESTTMP/repo/.hg/origbackups/e
95 saving current version of e as .hg/origbackups/e
96 reverting e
96 reverting e
97 $ rm -rf .hg/origbackups
97 $ rm -rf .hg/origbackups
98
98
General Comments 0
You need to be logged in to leave comments. Login now