[PATCH 09 of 14] localrepo: add shallow awareness

Vishakh Harikumar vsh426 at gmail.com
Fri Jul 16 03:46:21 CDT 2010


On Fri, Jul 16, 2010 at 1:35 PM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> On Fri, 16 Jul 2010 12:45:17 +0530
> Vishakh H <vsh426 at gmail.com> wrote:
>
>> # HG changeset patch
>> # User Vishakh H <vsh426 at gmail.com>
>> # Date 1279263210 -19800
>> # Node ID 6235071ccd5e7973389a890abb64a88c6d8ccb27
>> # Parent  0218b69c65e2014af11f287cac005ffd206d45c5
>> localrepo: add shallow awareness
>>
>> when a shallow repo is created we store the shallowroot in shallow file
>> under .hg. when the repo is instantiated it reads the file find shallowroot.
>
> "to find shallowroot" I guess?

yup.

>> the shallow root is passed to the changelog so it can keep track of all
>> nodes available in repo and create revlogs with shallow flag.
>>
>> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
>> --- a/mercurial/localrepo.py
>> +++ b/mercurial/localrepo.py
>> @@ -23,7 +23,7 @@
>>      capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey'))
>>      supported = set('revlogv1 store fncache shared'.split())
>>
>> -    def __init__(self, baseui, path=None, create=0):
>> +    def __init__(self, baseui, path=None, create=False, shallow=None):
>
> So what kind of data will be passed in "shallow"?
> Is it fundamentally different from what you call elsewhere "shallowroot"?
> If not, you might want to use the name everywhere.

The nodeid of the shallowroot will be passed. So i will change that.

-- 
vsh


More information about the Mercurial-devel mailing list