From 66f46aa14fa48e5d17885b46e80250e155c255e3 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 24 May 2013 21:29:57 -0500 Subject: [PATCH] remote-hg: remove files before modifications Otherwise replacing a file with a directory doesn't work. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/git-remote-hg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index fa76b3f610..bd545aa380 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -510,10 +510,10 @@ def export_ref(repo, name, kind, head): if len(parents) > 1: print "merge :%s" % (rev_to_mark(parents[1])) - for f in modified_final: - print "M %s :%u %s" % f for f in removed: print "D %s" % (fix_file_path(f)) + for f in modified_final: + print "M %s :%u %s" % f print progress = (rev - tip)