[Updated] D8703: commitctx: compute files added from _filecommit returns

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Jul 21 16:17:38 UTC 2020


Closed by commit rHG7fce7d1eeacc: commitctx: compute files added from _filecommit returns (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8703?vs=21986&id=22012

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8703/new/

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3120,6 +3120,7 @@
 
                 # check in files
                 added = []
+                filesadded = []
                 changed = []
                 removed = list(ctx.removed())
                 linkrev = len(self)
@@ -3138,6 +3139,8 @@
                             )
                             if is_touched:
                                 changed.append(f)
+                                if writechangesetcopy and is_touched == 'added':
+                                    filesadded.append(f)
                             m.setflag(f, fctx.flags())
                     except OSError:
                         self.ui.warn(
@@ -3193,9 +3196,6 @@
                     )
 
                     if writechangesetcopy:
-                        filesadded = [
-                            f for f in changed if not (f in m1 or f in m2)
-                        ]
                         filesremoved = removed
                 else:
                     self.ui.debug(



To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200721/47788cfb/attachment-0002.html>


More information about the Mercurial-patches mailing list