Show More
@@ -398,12 +398,12 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
398 | if state not in 'mn' and not dryrun: |
|
398 | if state not in 'mn' and not dryrun: | |
399 | repo.dirstate.normallookup(abstarget) |
|
399 | repo.dirstate.normallookup(abstarget) | |
400 | else: |
|
400 | else: | |
401 | if repo.dirstate[origsrc] == 'a': |
|
401 | if repo.dirstate[origsrc] == 'a' and origsrc == abssrc: | |
402 | if not ui.quiet: |
|
402 | if not ui.quiet: | |
403 | ui.warn(_("%s has not been committed yet, so no copy " |
|
403 | ui.warn(_("%s has not been committed yet, so no copy " | |
404 | "data will be stored for %s.\n") |
|
404 | "data will be stored for %s.\n") | |
405 | % (repo.pathto(origsrc, cwd), reltarget)) |
|
405 | % (repo.pathto(origsrc, cwd), reltarget)) | |
406 |
if abstarget |
|
406 | if repo.dirstate[abstarget] in '?r' and not dryrun: | |
407 | repo.add([abstarget]) |
|
407 | repo.add([abstarget]) | |
408 | elif not dryrun: |
|
408 | elif not dryrun: | |
409 | repo.copy(origsrc, abstarget) |
|
409 | repo.copy(origsrc, abstarget) |
@@ -1149,7 +1149,7 b' class localrepository(repo.repository):' | |||||
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 |
|
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: |
General Comments 0
You need to be logged in to leave comments.
Login now