[PATCH 3 of 3 V2] lfs: teach the 'lfs()' fileset to handle removed files

Matt Harbison mharbison72 at gmail.com
Sun Feb 11 03:07:04 UTC 2018


On Sat, 10 Feb 2018 21:41:29 -0500, Matt Harbison <mharbison72 at gmail.com>  
wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1517097753 18000
> #      Sat Jan 27 19:02:33 2018 -0500
> # Node ID 8009ea6019880cccef2dd48ea3afad32989f3073
> # Parent  589f4ea15c31383964e2b7d812bb5431b7dd682e
> 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.

In addition to this oddity, I can't get `hg files 'set:lfs()'` to work.   
The pointerfromctx() method only works for commits, so I special cased  
`ctx.rev() == None` to just test the name and size against the lfs.track  
matcher.  (`hg files 'set:lfs()'` seems like a reasonable way to test the  
config before committing.)  The proper files are added to the list  
comprehension here, but the `[f for f in dmap if match(f)]` in  
dirstate.matches() fails each match(f).



More information about the Mercurial-devel mailing list