Bug 3417 - repo.status(unknown=True) returns all largefiles in the list of unknown files
Summary: repo.status(unknown=True) returns all largefiles in the list of unknown files
Status: RESOLVED WONTFIX
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 09:56 UTC by Matt Oswald
Modified: 2012-05-13 04:51 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Oswald 2012-05-02 09:56 UTC
`hg status -u` reports no unknown files. However, if I create a repository 
object in python and call `repo.status(unknown=True)`, all largefiles in the 
repository are listed in the unknown files list.

I am using the debugshell extension in order to quickly access my repository 
in a python shell.
Comment 1 Matt Mackall 2012-05-02 11:12 UTC
Degrading to wish: you're way into unsupported country.
Comment 2 Na'Tosha Bard 2012-05-02 14:01 UTC
Largefiles does so much wrapping and filtering before what the user sees in 
the hg ui in order to provide accurate output, I can't imagine trying to 
support something like what's described here.

Not to say it is absolutely impossible or will necessarily never happen, but 
certainly it's not on my roadmap...
Comment 3 Matt Oswald 2012-05-02 14:27 UTC
Yikes. Ok, good to know.

Well, as a workaround, is there a way to query whether or not a file name is a 
largefile?
Comment 4 Greg Ward 2012-05-02 18:14 UTC
> Well, as a workaround, is there a way to query whether or not a file name 
> is a largefile?

Open the largefiles dirstate and test if the filename is in it?

(Random, off-the-top-of-my-head, completely untested, no idea if it'll work,
etc.)
Comment 5 Na'Tosha Bard 2012-05-03 02:32 UTC
Yes, in the code, checking if the file is in the lfdirstate is the most
common way; you can also check if the hash for the file exists in the main
repo inside the .hglf directory.
Comment 6 Matt Oswald 2012-05-03 09:18 UTC
For anyone else looking for the same information, I found that 
`lfutil.listlfiles(repo)` will return the list of largefiles, which is a 
little easier than opening the largefiles dirstate.
Comment 7 Bugzilla 2012-05-12 09:30 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:30 EDT  ---

This bug was previously known as _bug_ 3416 at http://mercurial.selenic.com/bts/issue3416