[PATCH 01 of 19 STABLE] largefiles: use 'f in contex' to examine whether file is related to the context
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Mon Feb 27 10:46:26 UTC 2012
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1330335216 -32400
# Branch stable
# Node ID 177c261dc6e60be5d14007d678a8ceca8e7385e9
# Parent 280e834c9d15b0d65a0ee24374671e0cd2147f4e
largefiles: use 'f in contex' to examine whether file is related to the context
for workingctx, 'f in context.manifest()' is equal to 'f in context':
both return False for removed files.
for changectx, 'inctx()' is expected only to examine whether specified
file is in its manifest or not: removal of files are detected by
comparison of manifests.
diff -r 280e834c9d15 -r 177c261dc6e6 hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py Sat Feb 25 19:39:55 2012 +0100
+++ b/hgext/largefiles/reposetup.py Mon Feb 27 18:33:36 2012 +0900
@@ -109,13 +109,7 @@
parentworking = working and ctx1 == self['.']
def inctx(file, ctx):
- try:
- if ctx.rev() is None:
- return file in ctx.manifest()
- ctx[file]
- return True
- except KeyError:
- return False
+ return file in ctx
if match is None:
match = match_.always(self.root, self.getcwd())
More information about the Mercurial-devel
mailing list