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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon May 20 11:47:46 EDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7d4ee14ff92d: narrowcommands: drop unnecessary adding of '' 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

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)



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


More information about the Mercurial-devel mailing list