Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 2417:3a4ae3970af3
copy: fix introduced bug.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 09 Jun 2006 09:14:30 -0700 |
parents | 04736f38d74f |
children | 6aa75e77cafe |
comparison
equal
deleted
inserted
replaced
2416:04736f38d74f | 2417:3a4ae3970af3 |
---|---|
1064 targetdir = os.path.dirname(reltarget) or '.' | 1064 targetdir = os.path.dirname(reltarget) or '.' |
1065 if not os.path.isdir(targetdir) and not opts['dry_run']: | 1065 if not os.path.isdir(targetdir) and not opts['dry_run']: |
1066 os.makedirs(targetdir) | 1066 os.makedirs(targetdir) |
1067 try: | 1067 try: |
1068 restore = repo.dirstate.state(abstarget) == 'r' | 1068 restore = repo.dirstate.state(abstarget) == 'r' |
1069 if restore and not dry_run: | 1069 if restore and not opts['dry_run']: |
1070 repo.undelete([abstarget], wlock) | 1070 repo.undelete([abstarget], wlock) |
1071 try: | 1071 try: |
1072 if not opts['dry_run']: | 1072 if not opts['dry_run']: |
1073 shutil.copyfile(relsrc, reltarget) | 1073 shutil.copyfile(relsrc, reltarget) |
1074 shutil.copymode(relsrc, reltarget) | 1074 shutil.copymode(relsrc, reltarget) |