comparison mercurial/cmdutil.py @ 22374:4509a16c76c2

revert: drop now useless conditional in the backup check Now that we removed the (hopeless) attempt to backup file we knew to be missing in the target changeset, we can stop checking if the file exists in the target changeset.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 30 Aug 2014 01:51:02 +0200
parents f6a1386d540e
children 54e614a297ac
comparison
equal deleted inserted replaced
22373:f6a1386d540e 22374:4509a16c76c2
2549 for table, (xlist, msg), dobackup in disptable: 2549 for table, (xlist, msg), dobackup in disptable:
2550 if abs not in table: 2550 if abs not in table:
2551 continue 2551 continue
2552 if xlist is not None: 2552 if xlist is not None:
2553 xlist.append(abs) 2553 xlist.append(abs)
2554 if (dobackup and os.path.lexists(target) and 2554 if (dobackup and os.path.lexists(target)
2555 abs in ctx and repo[None][abs].cmp(ctx[abs])): 2555 and repo[None][abs].cmp(ctx[abs])):
2556 bakname = "%s.orig" % rel 2556 bakname = "%s.orig" % rel
2557 ui.note(_('saving current version of %s as %s\n') % 2557 ui.note(_('saving current version of %s as %s\n') %
2558 (rel, bakname)) 2558 (rel, bakname))
2559 if not opts.get('dry_run'): 2559 if not opts.get('dry_run'):
2560 util.rename(target, bakname) 2560 util.rename(target, bakname)