comparison mercurial/localrepo.py @ 7121:b801d6e5dc83

rename: handle renaming to a target marked removed
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Oct 2008 04:26:09 -0500
parents 7b5c063b0b94
children cb6395fc16a9
comparison
equal deleted inserted replaced
7120:db7557359636 7121:b801d6e5dc83
1147 elif not (os.path.isfile(p) or os.path.islink(p)): 1147 elif not (os.path.isfile(p) or os.path.islink(p)):
1148 self.ui.warn(_("copy failed: %s is not a file or a " 1148 self.ui.warn(_("copy failed: %s is not a file or a "
1149 "symbolic link\n") % dest) 1149 "symbolic link\n") % dest)
1150 else: 1150 else:
1151 wlock = self.wlock() 1151 wlock = self.wlock()
1152 if dest not in self.dirstate: 1152 if self.dirstate[dest] in '?r':
1153 self.dirstate.add(dest) 1153 self.dirstate.add(dest)
1154 self.dirstate.copy(source, dest) 1154 self.dirstate.copy(source, dest)
1155 finally: 1155 finally:
1156 del wlock 1156 del wlock
1157 1157