diff hgext/lfs/__init__.py @ 36000:91aac8e6604d

lfs: teach the 'lfs()' fileset to handle removed files The callstatus setting is required to notice the removal of 'lfs.test' in rev 6 in the tests, even though this isn't directly calling mctx.status(). However, it's not needed to get the results in the tests for `hg status`, so I'm probably missing something.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 27 Jan 2018 19:02:33 -0500
parents 8c7d5e90e6bd
children a991fcc48222
line wrap: on
line diff
--- a/hgext/lfs/__init__.py	Sat Jan 27 19:22:15 2018 -0500
+++ b/hgext/lfs/__init__.py	Sat Jan 27 19:02:33 2018 -0500
@@ -350,13 +350,13 @@
     # when writing a bundle via "hg bundle" command, upload related LFS blobs
     wrapfunction(bundle2, 'writenewbundle', wrapper.writenewbundle)
 
-@filesetpredicate('lfs()')
+@filesetpredicate('lfs()', callstatus=True)
 def lfsfileset(mctx, x):
     """File that uses LFS storage."""
     # i18n: "lfs" is a keyword
     fileset.getargs(x, 0, 0, _("lfs takes no arguments"))
     return [f for f in mctx.subset
-            if wrapper.pointerfromctx(mctx.ctx, f) is not None]
+            if wrapper.pointerfromctx(mctx.ctx, f, removed=True) is not None]
 
 @templatekeyword('lfs_files')
 def lfsfiles(repo, ctx, **args):