atom feed18 messages in com.selenic.mercurial-develRe: [PATCH 0 of 6] Recursive status a...
FromSent OnAttachments
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerAug 30, 2010 3:01 pm 
Martin GeislerSep 1, 2010 7:13 am 
Martin GeislerSep 1, 2010 7:46 am 
Tim HeniganSep 1, 2010 8:05 am 
Martin GeislerSep 1, 2010 8:24 am 
Tim HeniganSep 1, 2010 9:43 am 
Martin GeislerSep 1, 2010 1:49 pm 
Adrian BuehlmannSep 1, 2010 3:20 pm 
Martin GeislerSep 2, 2010 1:22 am 
Adrian BuehlmannSep 2, 2010 1:56 am 
Martin GeislerSep 2, 2010 2:37 am 
Martin GeislerSep 3, 2010 4:23 am 
Subject:Re: [PATCH 0 of 6] Recursive status and diff for subrepositories
From:Martin Geisler (mg@lazybytes.net)
Date:Sep 1, 2010 8:24:14 am
List:com.selenic.mercurial-devel

Tim Henigan <tim.@gmail.com> writes:

On Wed, Sep 1, 2010 at 10:14 AM, Martin Geisler <mg@lazybytes.net> wrote:

Martin Geisler <mg@lazybytes.net> writes:

These patches add a -S/--subrepos option to the status and diff commands which will make then recurse into subrepositories.

I would like to begin pushing these patches -- let me know if you don't like the choice of -S/--subrepos or if you have any other objections.

I like the direction of these patches very much. They will greatly improve the usability of subrepos.

Thanks a lot for giving them a try, it's much appreciated :)

However, it seems that these commands should also show changes to the revision of the subrepo.

For example, if I do the following: $ hg update -R subrepo -r <different revision than the one in .hgsubstate> $ hg status -S

The output shows something like: $ R subrepo/file.py

That is, the file status changes are shown but not the reason for them changing (subrepo was moved to a different revision).

It would be helpful if both status and diff could show that the revision of the subrepo has changed, in addition to the actual file status.

Ideally, this would show as a modification of the .hgsubstate file in the top-level repo. Then the standard 'hg status' command would show that .hgsubstate was modified and 'hg diff' would show the change to the revision (including the before and after revisions).

Yes, modifying the .hgsubstate file seems like a good way to indicate the change.

I was just about to write that it gives a true picture of what will be committed by the next commit, but that is not 100% accurate: after these commands,

$ hg update -R subrepo -r <X> $ echo hehe >> subrepo/a.txt

we cannot really show

$ hg diff .hgsubstate <X> subrepo

since subrepo is modified and so a commit will produce revision <Y> which is then put into .hgsubstate.

So I guess we should instead put

<X>+ subrepo

into .hgsubstate -- the user will know that this means 'subrepo' is at revision <X> but is dirty.

Also, it would be helpful if there was a config option which allowed the 'subrepos' flag to be enabled by default (via the user's hgrc).

You can use defaults for now:

[defaults] status = --subrepos diff = --subrepos

But I think it would be nicer to have a general setting like you suggest that turns recursion on or off in general.

aragost Trifork Professional Mercurial support http://aragost.com/mercurial/