Subrepo status/diff/revert

Tim Henigan tim.henigan at gmail.com
Wed Aug 25 07:18:44 CDT 2010


On Mon, Aug 23, 2010 at 4:59 PM, Martin Geisler <mg at lazybytes.net> wrote:
> Tim Henigan <tim.henigan at gmail.com> writes:
>
>> On Mon, Aug 23, 2010 at 12:10 PM, Martin Geisler <mg at lazybytes.net> wrote:
>>> Tim Henigan <tim.henigan at gmail.com> writes:

>>>>     2) Modify `hg revert` to update subrepos to the SHA1 listed in .hgsubstate.
>>>
>>> It is actually a good question what 'hg revert --all sub/' should do.
>>> My client has not said how they want this to be handled so it's in
>>> the wiki.
>>>
>>> I guess it should recurse, that is, do 'hg revert --all' inside the
>>> sub/ repository. Now, the next question is how to reset the state of
>>> the subrepo to what .hgsubstate say? Perhaps we could let
>>>
>>>  hg revert --no-recurse sub
>>>
>>> do that? I hope we can find an interpretation that is consistent and
>>> natural...
>>
>> I feel that revert should do the following by default:
>>     1) `hg revert --all` any uncommitted changes in the subrepo
>>     2) `hg update` the subrepo to the revision listed in .hgsubstate
>>
>> I have a working extension which does #2 via a dedicated command
>> (subrepo-revert), but I want to change this extension to wrap the
>> existing revert command.
>
> That sounds nice. I'm not going to work on revert so please give it a
> shot.

I created a repo on BitBucket for my "subrepo-revert" command [1].  It
is currently implemented as an extension.  Once I am satisfied with
the design, I will look at wrapping the core revert command.

If you have time to review, I would appreciate it.  I will send it to
the devel list for review once it is complete.

Thanks,
Tim

[1] http://bitbucket.org/thenigan/subrepo-extensions


More information about the Mercurial-devel mailing list