##// END OF EJS Templates
Use absolute paths in revert.
Alexis S. L. Carvalho -
r4524:6c58139f default
parent child Browse files
Show More
@@ -2293,16 +2293,17 b' def revert(ui, repo, *pats, **opts):'
2293
2293
2294 for abs, (rel, exact) in entries:
2294 for abs, (rel, exact) in entries:
2295 mfentry = mf.get(abs)
2295 mfentry = mf.get(abs)
2296 target = repo.wjoin(abs)
2296 def handle(xlist, dobackup):
2297 def handle(xlist, dobackup):
2297 xlist[0].append(abs)
2298 xlist[0].append(abs)
2298 update[abs] = 1
2299 update[abs] = 1
2299 if (dobackup and not opts['no_backup'] and
2300 if (dobackup and not opts['no_backup'] and
2300 (os.path.islink(rel) or os.path.exists(rel))):
2301 (os.path.islink(target) or os.path.exists(target))):
2301 bakname = "%s.orig" % rel
2302 bakname = "%s.orig" % rel
2302 ui.note(_('saving current version of %s as %s\n') %
2303 ui.note(_('saving current version of %s as %s\n') %
2303 (rel, bakname))
2304 (rel, bakname))
2304 if not opts.get('dry_run'):
2305 if not opts.get('dry_run'):
2305 util.copyfile(rel, bakname)
2306 util.copyfile(target, bakname)
2306 if ui.verbose or not exact:
2307 if ui.verbose or not exact:
2307 ui.status(xlist[1] % rel)
2308 ui.status(xlist[1] % rel)
2308 for table, hitlist, misslist, backuphit, backupmiss in disptable:
2309 for table, hitlist, misslist, backuphit, backupmiss in disptable:
General Comments 0
You need to be logged in to leave comments. Login now