Patchwork D6402: dirstate: drop workaround for '.' matching root directory

login
register
mail settings
Submitter phabricator
Date May 17, 2019, 5:57 p.m.
Message ID <differential-rev-PHID-DREV-zbnym2yjj442kjghnhdx-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40121/
State Superseded
Headers show

Comments

phabricator - May 17, 2019, 5:57 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The check was added in https://phab.mercurial-scm.org/rHG31abcae33b4f22cea9d0db5fdfa5f3f11370dd06 (dirstate: do not ignore current
  directory '.' (issue 1078), 2008-04-05) to fix issue1078. Funnily
  enough, comment #2 on that issue mentions using '' instead of '.' to
  represent the root directory, just like my previous patch did.
  
  test-hgignore.t fails with this patch without the previous patch.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -662,8 +662,6 @@ 
         self._dirty = False
 
     def _dirignore(self, f):
-        if f == '.':
-            return False
         if self._ignore(f):
             return True
         for p in util.finddirs(f):