[PATCH 1 of 4] largefiles: drop redundant special handling of merges of renames

Mads Kiilerich mads at kiilerich.com
Sun Jan 12 16:54:50 CST 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1384634789 18000
#      Sat Nov 16 15:46:29 2013 -0500
# Node ID aa65fa6beb615f0157e3dc9e7155dc586a34a8cb
# Parent  d2704c48f4176d8cd6f21d33500820d44763585c
largefiles: drop redundant special handling of merges of renames

It is unclear what cases this was supposed to cover but it do no longer seem
relevant.

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -415,8 +415,7 @@ def overridemanifestmerge(origfn, repo, 
     return processed
 
 # Override filemerge to prompt the user about how they wish to merge
-# largefiles. This will handle identical edits, and copy/rename +
-# edit without prompting the user.
+# largefiles. This will handle identical edits without prompting the user.
 def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca):
     # Use better variable names here. Because this is a wrapper we cannot
     # change the variable names in the function declaration.
@@ -427,10 +426,6 @@ def overridefilemerge(origfn, repo, myno
         if not fcother.cmp(fcdest): # files identical?
             return None
 
-        # backwards, use working dir parent as ancestor
-        if fcancestor == fcother:
-            fcancestor = fcdest.parents()[0]
-
         if orig != fcother.path():
             repo.ui.status(_('merging %s and %s to %s\n')
                            % (lfutil.splitstandin(orig),
@@ -440,14 +435,6 @@ def overridefilemerge(origfn, repo, myno
             repo.ui.status(_('merging %s\n')
                            % lfutil.splitstandin(fcdest.path()))
 
-        if fcancestor.path() != fcother.path() and fcother.data() == \
-                fcancestor.data():
-            return 0
-        if fcancestor.path() != fcdest.path() and fcdest.data() == \
-                fcancestor.data():
-            repo.wwrite(fcdest.path(), fcother.data(), fcother.flags())
-            return 0
-
         if repo.ui.promptchoice(_('largefile %s has a merge conflict\n'
                                   'keep (l)ocal or take (o)ther?'
                                   '$$ &Local $$ &Other') %


More information about the Mercurial-devel mailing list