# HG changeset patch # User mpm@selenic.com # Date 1122487512 28800 # Node ID 26f3d353851fcdef77380c98410322ea8d157175 # Parent 5cb8a3a023b2dafef0f496d9ff23e0910c04888a Fix copy in subdirectories Spotted by Chad Netzer diff -r 5cb8a3a023b2 -r 26f3d353851f mercurial/hg.py --- a/mercurial/hg.py Wed Jul 27 09:07:28 2005 -0800 +++ b/mercurial/hg.py Wed Jul 27 10:05:12 2005 -0800 @@ -959,9 +959,9 @@ def copy(self, source, dest): p = self.wjoin(dest) - if not os.path.exists(dest): + if not os.path.exists(p): self.ui.warn("%s does not exist!\n" % dest) - elif not os.path.isfile(dest): + elif not os.path.isfile(p): self.ui.warn("copy failed: %s is not a file\n" % dest) else: if self.dirstate.state(dest) == '?':