equal
deleted
inserted
replaced
957 else: |
957 else: |
958 self.dirstate.update([f], "r") |
958 self.dirstate.update([f], "r") |
959 |
959 |
960 def copy(self, source, dest): |
960 def copy(self, source, dest): |
961 p = self.wjoin(dest) |
961 p = self.wjoin(dest) |
962 if not os.path.exists(dest): |
962 if not os.path.exists(p): |
963 self.ui.warn("%s does not exist!\n" % dest) |
963 self.ui.warn("%s does not exist!\n" % dest) |
964 elif not os.path.isfile(dest): |
964 elif not os.path.isfile(p): |
965 self.ui.warn("copy failed: %s is not a file\n" % dest) |
965 self.ui.warn("copy failed: %s is not a file\n" % dest) |
966 else: |
966 else: |
967 if self.dirstate.state(dest) == '?': |
967 if self.dirstate.state(dest) == '?': |
968 self.dirstate.update([dest], "a") |
968 self.dirstate.update([dest], "a") |
969 self.dirstate.copy(source, dest) |
969 self.dirstate.copy(source, dest) |