mercurial/cmdutil.py
changeset 39377 5b92a717bfc1
parent 39376 534e451b6dda
child 39396 34ba47117164
--- a/mercurial/cmdutil.py	Wed Aug 29 09:54:50 2018 -0700
+++ b/mercurial/cmdutil.py	Wed Aug 29 09:59:08 2018 -0700
@@ -1184,7 +1184,7 @@
             ui.warn(_('%s: not overwriting - %s collides with %s\n') %
                     (reltarget, repo.pathto(abssrc, cwd),
                      repo.pathto(prevsrc, cwd)))
-            return
+            return True # report a failure
 
         # check for overwrites
         exists = os.path.lexists(target)
@@ -1194,7 +1194,7 @@
                 repo.dirstate.normalize(abstarget)):
                 if not rename:
                     ui.warn(_("%s: can't copy - same file\n") % reltarget)
-                    return
+                    return True # report a failure
                 exists = False
                 samefile = True
 
@@ -1220,7 +1220,7 @@
                         hint = _("('hg copy --after' to record the copy)\n")
                 ui.warn(msg % reltarget)
                 ui.warn(hint)
-                return
+                return True # report a failure
 
         if after:
             if not exists:
@@ -1230,7 +1230,7 @@
                 else:
                     ui.warn(_('%s: not recording copy - %s does not exist\n') %
                             (relsrc, reltarget))
-                return
+                return True # report a failure
         elif not dryrun:
             try:
                 if exists: