[PATCH 4 of 6 V2] subrepo: implement "storeclean" method for mercurial subrepos

Angel Ezquerra angel.ezquerra at gmail.com
Tue Mar 12 14:00:41 CDT 2013


On Tue, Mar 12, 2013 at 7:52 PM, Augie Fackler <raf at durin42.com> wrote:
>
> On Mar 12, 2013, at 10:55 AM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote:
>
>> On Tue, Mar 12, 2013 at 1:31 AM, Augie Fackler <raf at durin42.com> wrote:
>>>
>>> On Mar 8, 2013, at 6:12 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote:
>>>
>>>> # HG changeset patch
>>>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>>>> # Date 1360973933 -3600
>>>> #      Sat Feb 16 01:18:53 2013 +0100
>>>> # Node ID c363610c5a98db8167102cde019fdca4966e7c02
>>>> # Parent  68ebd12161c9fb787c378630307840ec95a16cf1
>>>> subrepo: implement "storeclean" method for mercurial subrepos
>>>
>>> I'm not a subrepos expert, so I'd like someone else to eyeball this before it goes in. That said, LGTM.
>>>
>>> For Git you only need to hash the state of the repository's refs, which would be doable as sha1(os.system("git show-ref"))[0].
>>>
>>> For Subversion I *think* you can just check if the wc is dirty. If the wc is dirtied, we need to take action, and if not we're already set. Maybe that already happens at commit time?
>>>
>>> AF
>>>
>>> [0]: Don't actually use os.system()! Here for illustrative purposes only.
>>
>> Thank you Augie,
>>
>> would you be ok with the git and subrepo support being added on a
>> separate patch series, once this series has made it in?
>
> I think this "subrepo" was supposed to be "subversion"?

Yes, that is what I meant. Sorry!

> Yeah, that's fine.
>
>> As for subversion, I'm not an expert, but I guess you are right. Maybe
>> we should also check if the current working copy points to the
>> revision number that is pointed to by the parent repository? This
>> would be just in case someone used a svn command to checkout a
>> different revision... Maybe a subversion expert could give us some
>> advice (maybe Dan?)...
>
> I'm 95% sure clean-wc is right. Added some people that have done some Subversion pondering with me in the past for consultation.
>

Awesome, thanks!

Angel


More information about the Mercurial-devel mailing list