Subrepos question

Martin Geisler mg at aragost.com
Thu Jan 20 07:26:39 CST 2011


Didly <didlybom at gmail.com> writes:

> On Thu, Jan 20, 2011 at 8:42 AM, Martin Geisler <mg at aragost.com> wrote:
>
>> Mads Kiilerich <mads at kiilerich.com> writes:
>>
>> > Keith Gardner wrote, On 01/19/2011 06:16 PM:
>> >>
>> >> Is there a way to have a subrepo specified in the .hgsub point to
>> >> a named branch? I know that a user can do it with a script
>> >> afterwards but I am looking for native support in mercurial.
>> >
>> > You might however be asking for a way to say "whoever checks out
>> > the outer repo should get the latest revision of repo X on branch
>> > Y". That is intentionally not possible with Mercurial. Mercurial is
>> > a tool for controlling versions and ensuring that the working
>> > directory content is tracked and 100% reproducible. Updating to the
>> > latest revision (which then should be tracked) must be done
>> > manually or by scripts. There might be some demand for an extension
>> > for automating that, but nobody has needed it enough to write it.
>>
>> I wrote an extension for my client that does this:
>>
>>  http://mercurial.selenic.com/wiki/OnsubExtension
>>
>> It executed a command on each subrepository.
>>
>> --
>> Martin Geisler
>>
>
> This is a very cool and useful extension Martin!
>
> I have a question though. Are the commands applied recursively to the
> subrepos within the subrepos?

Yes, it recurses on Mercurial subrepos and you can switch between
depth-first and breadth-first traversal.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/en/services/mercurial/blog/


More information about the Mercurial mailing list