Integrating bfiles status with 'hg status' (proposal)
Greg Ward
greg-hg at gerg.ca
Fri Feb 5 01:15:48 UTC 2010
On Thu, Feb 4, 2010 at 2:17 PM, Anton Markov <anton.markov at gmail.com> wrote:
> Here are some thoughts about how 'hg bfstatus' could be integrated with 'hg
> status'. For now, I am mostly looking for feedback on the functionality,
> but any suggestions on implementation are also welcome.
>
> Example setup:
> $ touch bfile.bin textfile.txt
> $ hg bfadd bfile.bin
> $ hg add textfile.txt
>
> Without integration:
>
> $ hg status
> A .hgfiles/bfile.bin
> A textfile.txt
>
> $ hg bfstatus
> BPA bfile.bin
...which is the status quo, for anyone who's following this but not
familiar with bfiles.
> Auto-status integration would be enabled with a config file option:
>
> $ cat > .hg/hgrc
> [bfiles]
> autostatus = true
> ^EOF
Yup.
> With integration enabled:
>
> $ hg status
> BPA bfile.bin
> --A textfile.txt
1) I don't think we should modify the format for regular files. Plain
old A/M/R/!/etc works today; let's not break that.
2) I think big files should come last. Don't know *why* I think that,
I just do. It might be knowledge of how 'status' is implemented
leaking into another part of my brain, in which case it's dumb.
> $ hg status --bfile-placeholders
> BHA .hgfiles/bfile.bin
> BPA bfile.bin
> --A textfile.txt
They're called "standins", not "placeholders". One term is enough! I
think the option should be --show-standins. And they should look like
regular files ("A .hgbfiles/bfile.bin"), because they are regular
files.
> $ hg status --bfiles-ignore
> A .hgfiles/bfile.bin
> A textfile.txt
That just turns off the 'autostatus = true' configuration, right?
I.e. it's shorthand for "--config bfiles.autostatus=false"? If so,
let's make it --no-bfiles.
> Note that 'hg status' has a lot of options that 'hg bfstatus' does not have.
> The filtering options will probably be easy to implement. Comparing
> arbitrary revisions will be more difficult.
Ooh, good point. It should mostly boil down to figuring out the
status in .hgbfiles and transforming it in some way. I think.
> Tracking of copies in bfiles is not supported yet.
...because you get it for free via standin files. Hmmm: I guess
another "auto integration" feature would be for "hg rename" to do the
right thing on big files.
> Open question: should we warn the user if they use an option that is not
> fully integrated with bfiles?
Not sure what you mean by that. Example?
Greg
More information about the Mercurial-devel
mailing list