##// END OF EJS Templates
revert: migrate to scmutil.backuppath()...
Martin von Zweigbergk -
r41737:9e545c9a default
parent child Browse files
Show More
@@ -3017,7 +3017,7 def revert(ui, repo, ctx, parents, *pats
3017 if dobackup == backupinteractive:
3017 if dobackup == backupinteractive:
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.backuppath(ui, repo, abs)
3021 relbakname = os.path.relpath(bakname)
3021 relbakname = os.path.relpath(bakname)
3022 ui.note(_('saving current version of %s as %s\n') %
3022 ui.note(_('saving current version of %s as %s\n') %
3023 (rel, relbakname))
3023 (rel, relbakname))
@@ -3170,7 +3170,7 def _performrevert(repo, parents, ctx, n
3170 # Create a backup file only if this hunk should be backed up
3170 # Create a backup file only if this hunk should be backed up
3171 if c.header.filename() in tobackup:
3171 if c.header.filename() in tobackup:
3172 target = repo.wjoin(abs)
3172 target = repo.wjoin(abs)
3173 bakname = scmutil.origpath(repo.ui, repo, m.rel(abs))
3173 bakname = scmutil.backuppath(repo.ui, repo, abs)
3174 util.copyfile(target, bakname)
3174 util.copyfile(target, bakname)
3175 tobackup.remove(abs)
3175 tobackup.remove(abs)
3176 c.write(fp)
3176 c.write(fp)
General Comments 0
You need to be logged in to leave comments. Login now