Subrepo status/diff/revert
Martin Geisler
mg at lazybytes.net
Mon Aug 30 06:13:48 CDT 2010
Tim Henigan <tim.henigan at gmail.com> writes:
> On Wed, Aug 25, 2010 at 2:54 PM, Martin Geisler <mg at lazybytes.net> wrote:
>> Tim Henigan <tim.henigan at gmail.com> writes:
>>
>> While your extension is definitely helpful, I'm planning something more
>> integrated, something that will allow me to do
>>
>> $ hg revert sub/a.txt
>>
>> where the paths are crossing subrepository boundaries.
>
> Have you thought about how to deal with the '--date' and '--rev'
> command-line options? For example, if the user were to :
>
> $ hg revert -r 1 sub/a.txt
>
> does this mean '-r 1' of the outer repo or the inner subrepo?
>
> It seems that to be consistent, the '--rev' and '--date' options would
> need to be applied to the outer repo's history. In this case, the
> order of operation would be:
>
> 1) Determine if the specified file or directory is part of a subrepo.
> 2) If it is, look up the revision of the subrepo in '-r 1' of the
> outer repo's .hgsubstate file.
> 3) hg revert -R sub -r <revision> a.txt
I agree completely, and I believe my current patches for status works
like this. Please feel free to check them out -- after hacking some more
this weekend, they now work very well. The patches are here:
http://hg.lazybytes.net/subrepos-mq/
and I have a repository here where they are already applied:
http://hg.lazybytes.net/subrepos/
So, on Unix-like systems, you can just clone the latter and do 'make
local' inside it to test.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/
More information about the Mercurial-devel
mailing list