Patchwork D6409: convert: don't include file in "files" list if it's added in p2

login
register
mail settings
Submitter phabricator
Date May 20, 2019, 3:47 p.m.
Message ID <a6ab7232b002efc1c7c58bc8fd3d8db9@localhost.localdomain>
Download mbox | patch
Permalink /patch/40149/
State Not Applicable
Headers show

Comments

phabricator - May 20, 2019, 3:47 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc0e1ea0c4cee: convert: don&#039;t include file in &quot;files&quot; list if it&#039;s added in p2 (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6409?vs=15184&id=15190

REVISION DETAIL
  https://phab.mercurial-scm.org/D6409

AFFECTED FILES
  mercurial/localrepo.py
  tests/test-convert-hg-sink.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-convert-hg-sink.t b/tests/test-convert-hg-sink.t
--- a/tests/test-convert-hg-sink.t
+++ b/tests/test-convert-hg-sink.t
@@ -616,8 +616,9 @@ 
   |/
   o  0 add 0
   
-BROKEN: now 'a' appears changed
+
+# Still no files
   $ hg log -r 3 -T '{files}\n'
-  a
+  
 
 #endif
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2367,7 +2367,10 @@ 
             node = fctx.filenode()
             if node in [fparent1, fparent2]:
                 self.ui.debug('reusing %s filelog entry\n' % fname)
-                if manifest1.flags(fname) != fctx.flags():
+                if ((fparent1 != nullid and
+                     manifest1.flags(fname) != fctx.flags()) or
+                    (fparent2 != nullid and
+                     manifest2.flags(fname) != fctx.flags())):
                     changelist.append(fname)
                 return node