]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote-hg: remove files before modifications
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:57 +0000 (21:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 15:02:23 +0000 (08:02 -0700)
Otherwise replacing a file with a directory doesn't work.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg

index fa76b3f610c1c46a9cb2fad7c2f93f6589726a9f..bd545aa380d3751fdfbc416cb20947035bb4ec8b 100755 (executable)
@@ -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)