Patchwork D2191: narrowspec: consistently use set() to copy sets

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 11:18 p.m.
Message ID <ba4067af344259bea7b2937a2d00be83@localhost.localdomain>
Download mbox | patch
Permalink /patch/27740/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 11:18 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb8bbe589fd47: narrowspec: consistently use set() to copy sets (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2191?vs=5507&id=5561

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

AFFECTED FILES
  hgext/narrow/narrowspec.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowspec.py b/hgext/narrow/narrowspec.py
--- a/hgext/narrow/narrowspec.py
+++ b/hgext/narrow/narrowspec.py
@@ -180,7 +180,7 @@ 
     >>> restrictpatterns({'f1/$non_exitent_var'}, {}, ['f1','f2'], [])
     (set(['f1/$non_exitent_var']), {})
     """
-    res_excludes = req_excludes.copy()
+    res_excludes = set(req_excludes)
     res_excludes.update(repo_excludes)
     if not req_includes:
         res_includes = set(repo_includes)