Patchwork D6405: narrowcommands: drop unnecessary adding of '' for root directory

login
register
mail settings
Submitter phabricator
Date May 20, 2019, 3:47 p.m.
Message ID <aee3deade23b5bef9da5e02a4109eae8@localhost.localdomain>
Download mbox | patch
Permalink /patch/40151/
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 rHG7d4ee14ff92d: narrowcommands: drop unnecessary adding of &#039;&#039; for root directory (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6405?vs=15177&id=15197

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

AFFECTED FILES
  hgext/narrow/narrowcommands.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -216,7 +216,7 @@ 
                     todelete.append(f)
             elif f.startswith('meta/'):
                 dir = f[5:-13]
-                dirs = [''] + sorted(util.dirs({dir})) + [dir]
+                dirs = sorted(util.dirs({dir})) + [dir]
                 include = True
                 for d in dirs:
                     visit = newmatch.visitdir(d)