Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 4574:339b8aeee8c5
revert: use util.lexists
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 13 Jun 2007 19:15:58 -0300 |
parents | 6a8e1dd18ba2 |
children | b841dc886ba1 |
comparison
equal
deleted
inserted
replaced
4573:97111071d26c | 4574:339b8aeee8c5 |
---|---|
2259 mfentry = mf.get(abs) | 2259 mfentry = mf.get(abs) |
2260 target = repo.wjoin(abs) | 2260 target = repo.wjoin(abs) |
2261 def handle(xlist, dobackup): | 2261 def handle(xlist, dobackup): |
2262 xlist[0].append(abs) | 2262 xlist[0].append(abs) |
2263 update[abs] = 1 | 2263 update[abs] = 1 |
2264 if (dobackup and not opts['no_backup'] and | 2264 if dobackup and not opts['no_backup'] and util.lexists(target): |
2265 (os.path.islink(target) or os.path.exists(target))): | |
2266 bakname = "%s.orig" % rel | 2265 bakname = "%s.orig" % rel |
2267 ui.note(_('saving current version of %s as %s\n') % | 2266 ui.note(_('saving current version of %s as %s\n') % |
2268 (rel, bakname)) | 2267 (rel, bakname)) |
2269 if not opts.get('dry_run'): | 2268 if not opts.get('dry_run'): |
2270 util.copyfile(target, bakname) | 2269 util.copyfile(target, bakname) |