Commits

Steve Borho committed 46b20fd

rename: use shutil.move to perform a rename

  • Participants
  • Parent commits cdeecb4
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgtk/rename.py

             targetdir = os.path.dirname(new_name) or '.'
             if not os.path.isdir(targetdir):
                 os.makedirs(targetdir)
-            util.copyfile(dlg.orig, new_name)
+            shutil.move(dlg.orig, new_name)
             commands.rename(repo.ui, repo, dlg.orig, new_name, **opts)
             toquit = True
         except (OSError, IOError, util.Abort, hglib.RepoError), inst: