[PATCH 15 of 17 V2] largefiles: rename match_ to matchmod import in overrides

liscju piotr.listkiewicz at gmail.com
Thu May 12 06:20:37 EDT 2016


# HG changeset patch
# User liscju <piotr.listkiewicz at gmail.com>
# Date 1463046519 -7200
#      Thu May 12 11:48:39 2016 +0200
# Node ID 84d92a372a88b74d55604a23896eb4adea762cc1
# Parent  468a3050667a86ea8c848ee94ba4c071bcae2f51
largefiles: rename match_ to matchmod import in overrides

diff -r 468a3050667a -r 84d92a372a88 hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Thu May 12 11:36:51 2016 +0200
+++ b/hgext/largefiles/overrides.py	Thu May 12 11:48:39 2016 +0200
@@ -19,7 +19,7 @@ from mercurial import (
     cmdutil,
     error,
     hg,
-    match as match_,
+    match as matchmod,
     pathutil,
     registrar,
     revset,
@@ -113,13 +113,13 @@ def addlargefiles(ui, repo, isaddremove,
     if storeutil.islfilesrepo(repo):
         lfpats = ui.configlist(storeutil.longname, 'patterns', default=[])
         if lfpats:
-            lfmatcher = match_.match(repo.root, '', list(lfpats))
+            lfmatcher = matchmod.match(repo.root, '', list(lfpats))
 
     lfnames = []
     m = matcher
 
     wctx = repo[None]
-    for f in repo.walk(match_.badmatch(m, lambda x, y: None)):
+    for f in repo.walk(matchmod.badmatch(m, lambda x, y: None)):
         exact = m.exact(f)
         lfile = storeutil.standin(f) in wctx
         nfile = f in wctx
@@ -322,7 +322,7 @@ def overridelog(orig, ui, repo, *pats, *
             if pat.startswith('set:'):
                 return pat
 
-            kindpat = match_._patsplit(pat, None)
+            kindpat = matchmod._patsplit(pat, None)
 
             if kindpat[0] is not None:
                 return kindpat[0] + ':' + tostandin(kindpat[1])
@@ -641,7 +641,7 @@ def overridecopy(orig, ui, repo, pats, o
             # The patterns were previously mangled to add the standin
             # directory; we need to remove that now
             for pat in pats:
-                if match_.patkind(pat) is None and storeutil.shortname in pat:
+                if matchmod.patkind(pat) is None and storeutil.shortname in pat:
                     newpats.append(pat.replace(storeutil.shortname, ''))
                 else:
                     newpats.append(pat)
@@ -659,7 +659,7 @@ def overridecopy(orig, ui, repo, pats, o
         oldmatch = installmatchfn(overridematch)
         listpats = []
         for pat in pats:
-            if match_.patkind(pat) is not None:
+            if matchmod.patkind(pat) is not None:
                 listpats.append(pat)
             else:
                 listpats.append(makestandin(pat))
@@ -992,7 +992,7 @@ def overridearchive(orig, repo, dest, no
     if subrepos:
         for subpath in sorted(ctx.substate):
             sub = ctx.workingsub(subpath)
-            submatch = match_.subdirmatcher(subpath, matchfn)
+            submatch = matchmod.subdirmatcher(subpath, matchfn)
             sub._repo.lfstatus = True
             sub.archive(archiver, prefix, submatch)
 
@@ -1040,7 +1040,7 @@ def hgsubrepoarchive(orig, repo, archive
 
     for subpath in sorted(ctx.substate):
         sub = ctx.workingsub(subpath)
-        submatch = match_.subdirmatcher(subpath, match)
+        submatch = matchmod.subdirmatcher(subpath, match)
         sub._repo.lfstatus = True
         sub.archive(archiver, prefix + repo._path + '/', submatch)
 
@@ -1206,7 +1206,7 @@ def scmutiladdremove(orig, repo, matcher
         return orig(repo, matcher, prefix, opts, dry_run, similarity)
     # Get the list of missing largefiles so we can remove them
     lfdirstate = storeutil.openlfdirstate(repo.ui, repo)
-    unsure, s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [],
+    unsure, s = lfdirstate.status(matchmod.always(repo.root, repo.getcwd()), [],
                                   False, False, False)
 
     # Call into the normal remove code, but the removing of the standin, we want
@@ -1391,7 +1391,7 @@ def mergeupdate(orig, repo, node, branch
         # (*1) deprecated, but used internally (e.g: "rebase --collapse")
 
         lfdirstate = storeutil.openlfdirstate(repo.ui, repo)
-        unsure, s = lfdirstate.status(match_.always(repo.root,
+        unsure, s = lfdirstate.status(matchmod.always(repo.root,
                                                     repo.getcwd()),
                                       [], False, False, False)
         pctx = repo['.']


More information about the Mercurial-devel mailing list