changeset 1233:5381b0d88e9e

Fix abort message for clone
author mpm@selenic.com
date Tue, 13 Sep 2005 14:18:18 -0500
parents eb3cc5e2eb89
children 9ee8428d84a1
files mercurial/commands.py mercurial/localrepo.py tests/test-tag.out
diffstat 3 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Sep 13 14:16:15 2005 -0500
+++ b/mercurial/commands.py	Tue Sep 13 14:18:18 2005 -0500
@@ -592,7 +592,7 @@
         dest = os.path.basename(os.path.normpath(source))
 
     if os.path.exists(dest):
-        raise util.Abort("destination '%s' already exists")
+        raise util.Abort("destination '%s' already exists", dest)
 
     dest = os.path.realpath(dest)
 
--- a/mercurial/localrepo.py	Tue Sep 13 14:16:15 2005 -0500
+++ b/mercurial/localrepo.py	Tue Sep 13 14:18:18 2005 -0500
@@ -1108,12 +1108,10 @@
                     self.ui.debug("other deleted %s\n" % f)
                     remove.append(f) # other deleted it
             else:
-                if n == m1.get(f, nullid): # same as parent
-                    if p2 == pa: # going backwards?
-                        self.ui.debug("remote deleted %s\n" % f)
-                        remove.append(f)
-                    else:
-                        self.ui.debug("local created %s, keeping\n" % f)
+                # file is not in ancestor or target
+                if n == m1.get(f, nullid) or force: # same as parent
+                    self.ui.debug("remote deleted %s\n" % f)
+                    remove.append(f)
                 else:
                     self.ui.debug("working dir created %s, keeping\n" % f)
 
--- a/tests/test-tag.out	Tue Sep 13 14:16:15 2005 -0500
+++ b/tests/test-tag.out	Tue Sep 13 14:18:18 2005 -0500
@@ -16,6 +16,5 @@
 date:        Thu Jan  1 00:00:00 1970 +0000
 summary:     test
 
-abort: working copy of .hgtags is changed!
-(please commit .hgtags manually)
+abort: working copy of .hgtags is changed (please commit .hgtags manually)
 failed