[PATCH 13 of 19 STABLE] largefiles: refactoring to use 'inctx()'/'inctxdirs()'
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Mon Feb 27 10:46:38 UTC 2012
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1330335216 -32400
# Branch stable
# Node ID 80ad9da167d20345ccf59b8ff968c44f206d1e09
# Parent 15efcfa1e00dc6a773d963da69271f3fc0660eaa
largefiles: refactoring to use 'inctx()'/'inctxdirs()'
diff -r 15efcfa1e00d -r 80ad9da167d2 hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py Mon Feb 27 18:33:36 2012 +0900
+++ b/hgext/largefiles/reposetup.py Mon Feb 27 18:33:36 2012 +0900
@@ -128,12 +128,12 @@
# largefiles, we should just bail here and let super
# handle it -- thus gaining a big performance boost.
if match.files() and not match.anypats():
- dirstate = repo.dirstate
+ wctx = repo[None]
for f in match.files():
if lfutil.isstandin(f):
continue
sf = lfutil.standin(f)
- if sf in dirstate or sf in dirstate.dirs():
+ if inctx(sf, wctx) or inctxdirs(sf, wctx):
break
else:
return super(lfiles_repo, self).status(node1, node2,
@@ -188,13 +188,12 @@
lfdirstate._ignore = _ignoreoverride
def filefn(files):
- dirstate = repo.dirstate
for f in files:
# ignore 'STANDIN direct' pattern
if lfutil.isstandin(f):
continue
sf = lfutil.standin(f)
- if sf in dirstate or sf in dirstate.dirs():
+ if inctx(sf, ctx2) or inctxdirs(sf, ctx2):
yield f
match = match.convert(filefn)
# Don't waste time getting the ignored and unknown
More information about the Mercurial-devel
mailing list