Dean Roehrich wrote:
> On Thu, Aug 07, 2008 at 06:54:11PM -0700, David.Marker at sun.com wrote:
>   
>> Author: David Marker <David.Marker at sun.com>
>> Repository: /hg/scm-migration/onnv-gk-tools
>> Latest revision: 13c87b174da31bebe6de23f5ad9a4ecbdfbcb4ef
>> Total changesets: 1
>> Log message:
>> HOME environment var almost always needs to be set for hg and trust.
>> Fix other boneheaded mistakes I made (sadly only discovered while running on 
>> gate).
>> Finally update config so it exists outside just gate repos.
>>
>> Files:
>>      update: clone-closed-hgrc
>>      update: clone-hgrc
>>      update: etc/config.py
>>      update: gate-closed-hgrc
>>      update: gate-hgrc
>>      update: hook/notify.py
>>      update: lib/mail.py
>>      update: lib/utility.py
>>      update: on-hg.py
>>      update: periodic/incremental.py
>>      update: periodic/nightly-build.py
>>     
>
> David,
>
> While the changegroup.x hooks are running in gate-hgrc I don't see how you're
> preventing a new changegroup from arriving.  I guess I expected changegroup.0
> would use hg push --rev for this situation.
>
> Maybe the hg update should use --clean and --rev in gate-hgrc, or maybe it
> shouldn't be there at all.  That update could run while a new changegroup is
> in the pretxnchangegroup hooks.  And why do you need update on both the push
> and the pull gates (I guess you call them 'gate' and 'clone')?  I think hg
> update in 'gate' is a good way to create a bit of confusion.
>
> Dean
>   

I think you will find that the push lock is held until even changegroup 
hooks are run.

    def push_addchangegroup(self, remote, force, revs):
        lock = remote.lock()
        try:
            ret = self.prepush(remote, force, revs)
            if ret[0] is not None:
                cg, remote_heads = ret
                return remote.addchangegroup(cg, 'push', self.url())
            return ret[1]
        finally:
            del lock


Notice it is inside addchangegroup() that both pretxnchangegroup and 
changegroup hooks are run.

Am I missing something?

Anyway people still use cscopt from NFS for "gate" repo. So I do need to 
have it updated.

If I am wrong about lock being held for the duration of the "push" (even 
the changegroup hooks) then I agree I have a problem and should use "--rev".

-dvd

Reply via email to