Marking subrepos in 'hg status'

Martin Geisler mg at lazybytes.net
Mon Oct 25 16:33:23 CDT 2010


Kevin Bullock <kbullock+mercurial at ringworld.org> writes:

> On Oct 20, 2010, at 3:37 AM, Martin Geisler wrote:
>
>> Matt Mackall <mpm at selenic.com> writes:
>> 
>>> On Tue, 2010-10-19 at 09:26 +0200, Martin Geisler wrote:
>>>> timeless <timeless at gmail.com> writes:
>>>> 
>>>>> On Mon, Oct 18, 2010 at 6:05 PM, Martin Geisler <mg at aragost.com> wrote:
>>>>>> With your suggestion we can have
>>>>>> 
>>>>>>  M sub1/
>>>>>>  M sub1/a
>>>>>>  M sub2/
>>>>>>  M sub2/x
>>>>>>  A sub1/
>>>>>>  A sub1/b
>>>>>>  A sub2/
>>>>>>  A sub2/y
>>>> 
>>>> I agree -- I think this is a nice and consistent way to show the
>>>> status.
>>> 
>>> I don't like it. We've always only listed files.
>> 
>> Yes... but if one thinks of subrepos as versioned directories then it
>> makes some sense.
>
> But unlike svn, hg has never had a concept of versioned directories.
> Seeing directories in a status list seems weird to me too―it doesn't
> provide much indication that the listed dir is a subrepo.

I think it does -- the very fact that you get a line that ends with a /
tells you that it is a subrepository. Or we can drop the / and then
you'll still know it's a subrepository if you stat the path and see it's
a directory.

It also gives us a way to show the user if a subrepo has been updated to
a new revision which will cause a commit in the top-level repo to record
a change in the .hgsubstate file.

> If the goal is to make subrepos fairly transparent, and if committing
> is therefore always recursive, why not make it so that `hg status`
> shows the status of all files, including those in subrepos, sorted as
> normal;

Status will probably eventually do that.

> and then make `hg status -S` behave more like `hg tags -v`, showing
> the subrepo path _after_ the filename, like so:
>
> $ hg status -S
> M f1.txt
> M sub1/f2.txt  (in sub1/)
> A f3.txt
> A sub1/f4.txt  (in sub1/)

Well, that list is not very parsable and there is no way to indicate a
change in subrepo revision.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20101025/a2fb0cac/attachment.pgp>


More information about the Mercurial-devel mailing list