Commit fb5770e9 authored by Henrik Stuart's avatar Henrik Stuart
Browse files

guess: use cmdutil.copy instead of removed wctx.remove/copy

branch : hgtk-default
parent c295e2d92481
......@@ -13,7 +13,7 @@ import pango
import cStringIO
import Queue
from mercurial import hg, ui, mdiff, scmutil, match, error
from mercurial import hg, ui, mdiff, scmutil, match, error, cmdutil
from mercurial import similar
from tortoisehg.util.i18n import _
......@@ -324,10 +324,21 @@ class DetectRenameDialog(gtk.Window):
src, usrc, dest, udest, percent, sensitive = row
if not sensitive:
if not os.path.exists(self.repo.wjoin(src)):
# Mark missing rename source as removed
wctx.copy(src, dest)
wlock = self.repo.wlock(False)
opts = {
'after': True,
'force': False,
'include': [],
'exclude': [],
'dry-run': False,
cmdutil.copy(self.repo.ui, self.repo, [src, dest], opts,
rename=not os.path.exists(self.repo.wjoin(src)))
shlib.shell_notify([self.repo.wjoin(src), self.repo.wjoin(dest)])
if self.notify_func:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment