comparison mercurial/cmdutil.py @ 12342:70236d6fd844 stable

rename: do not overwrite existing broken symlinks
author Patrick Mezard <pmezard@gmail.com>
date Mon, 20 Sep 2010 21:46:39 +0200
parents d157e040ac4c
children e0ee3e822a9a
comparison
equal deleted inserted replaced
12341:aca8b10bca6e 12342:70236d6fd844
376 (reltarget, repo.pathto(abssrc, cwd), 376 (reltarget, repo.pathto(abssrc, cwd),
377 repo.pathto(prevsrc, cwd))) 377 repo.pathto(prevsrc, cwd)))
378 return 378 return
379 379
380 # check for overwrites 380 # check for overwrites
381 exists = os.path.exists(target) 381 exists = os.path.lexists(target)
382 if not after and exists or after and state in 'mn': 382 if not after and exists or after and state in 'mn':
383 if not opts['force']: 383 if not opts['force']:
384 ui.warn(_('%s: not overwriting - file exists\n') % 384 ui.warn(_('%s: not overwriting - file exists\n') %
385 reltarget) 385 reltarget)
386 return 386 return