[PATCH 1 of 1] Add basic subrepo support to 'hg status'

Marcus Lindblom macke at yar.nu
Mon Feb 1 09:49:37 CST 2010


On 2010-02-01 16:38, Matt Mackall wrote:
> On Sun, 2010-01-31 at 21:13 +0100, macke at yar.nu wrote:
>> # HG changeset patch
>> # User Marcus Lindblom<macke at yar.nu>
>> # Date 1264968249 -3600
>> # Node ID b0832622ac10c81047279302589b43f460b8139f
>> # Parent  b47a9e591e41e81b6836bf9425eabecf80eb7a00
>> Add basic subrepo support to 'hg status'
>>
>> Shows status recursively, for hg and svn subrepos.
>> Does not yet show status of subrepos when --rev is specified.
>
> Hmm, this is not quite the direction I wanted to go in. I was planning
> to have a subrepo method that would return a set of lists (modified,
> added, removed) to the higher level to display.

Ok. That should be doable. I'll try to just fill the same data 
structures that status uses today.

Should I parse/extract the status output from svn and show that from 
commands.status() too? Any preferred way to do that? (I can always hack 
a regex.)

(Also, I'll just ignore any externals info here, I think... so we get a 
nice quiet status when nothing has changed...)

> Also, simply always displaying status in subrepos will break tools (like
> IDE plug-ins) that expect to be able to perform hg operations on files
> that are reported by status, so this has to be hidden behind a switch.

Ok. Do you want to show subrepo info by default or not?

(I'd like to have it on by default, as aliasing is a bit messy and I 
(and others) are sure forget it sometime and then commit too much, and 
we don't have rollback now, and it's not available at all for svn..)

About the output:

Do you like the current output format "showing status in subrepo xx/yy" 
or should we merge everything into one list?

Additionally, should we show the file's full path from the main repo 
always, or use the short easy route as I've done now?

Cheers,
/Marcus






More information about the Mercurial-devel mailing list