Patchwork D1339: dirstate: don't remove normallookup files from nonnormalset

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2017, 5:31 p.m.
Message ID <differential-rev-PHID-DREV-th6636evfi2zdqbctlx7-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25423/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2017, 5:31 p.m.
mbthomas created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The dirstate typically tries to keep the nonnormalset and otherparentset
  up-to-date when making changes to the dirstate.  In the case of files marked
  normallookup, however, it erroneously removes the file from the nonnormalset,
  after _addpath had just added it.
  
  This doesn't seem to matter at the moment, as nothing relies on the
  nonnormalset being correct at this point, however a future re-implementations
  of the dirstate map will require this to be kept up-to-date correctly.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: mbthomas, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 10, 2017, 5:23 a.m.
indygreg added a comment.


  I was going to review this series. But I fear my dirstate knowledge is not good enough to understand the implications of all the changes. So I don't plan to look at it unless another reviewer can't be found.

REPOSITORY
  rHG Mercurial

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

To: mbthomas, #hg-reviewers
Cc: indygreg, mercurial-devel
phabricator - Nov. 10, 2017, 10:03 p.m.
durin42 added a comment.


  Based on a very shaky understanding of the code gained by spending 10 minutes looking around at uses of nonnormalset, I think this is right.
  
  I'd appreciate a patch that describes what all these attributes are intended to contain, especially if there's about to be some api-ish contracts going on between this and other code (even if there's no stability contract)

REPOSITORY
  rHG Mercurial

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

To: mbthomas, #hg-reviewers
Cc: durin42, indygreg, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -458,8 +458,6 @@ 
                     return
         self._addpath(f, 'n', 0, -1, -1)
         self._map.copymap.pop(f, None)
-        if f in self._map.nonnormalset:
-            self._map.nonnormalset.remove(f)
 
     def otherparent(self, f):
         '''Mark as coming from the other parent, always dirty.'''