Mercurial push locks
Simon King
simon at simonking.org.uk
Thu Sep 25 09:09:50 UTC 2014
On Wed, Sep 24, 2014 at 8:06 PM, <durwin at mgtsciences.com> wrote:
> Simon King <simon at simonking.org.uk> wrote on 09/24/2014 12:46:36 PM:
>
>> From: Simon King <simon at simonking.org.uk>
>> To: durwin at mgtsciences.com
>> Cc: Mercurial mailing list <mercurial at selenic.com>
>> Date: 09/24/2014 12:46 PM
>> Subject: Re: Mercurial push locks
>>
>> On 24 Sep 2014, at 16:16, durwin at mgtsciences.com wrote:
>>
>> > I have users when push'ing get locked. If they interrupt the
>> push, it appears to complete. Also, if I delete the lock file in
>> .hg/store/ it also will complete. I see no evidence of lost code,
>> it *does* seem to complete. This occurs when run from command line
>> and from Netbeans. I have tried to duplicate the issue, but all
>> works for me normally. I had one user do a clean clone, but the
>> problem still occurs. I tried duplicating problem as one of the
>> users, but again it all works for me. I am at a loss. I included
>> one of the users console output. Notice where user interrupted process.
>> >
>> > project:UsersExample username$ hg commit -m "Added a slider to
>> filter detail.
>> > Also fixed Joe layout"
>> > abort: no username supplied (see "hg help config")
>> > project:UsersExample username$ hg commit -m "Added a slider to
>> filter detail.
>> > Also fixed Joe layout" -u username
>> > project:UsersExample username$ hg push
>> > pushing to ssh://server//home/svnuser/project-hg/WebApplication
>> > searching for changes
>> > remote: listing keys for "bookmarks"
>> > ^Cinterrupted!
>> > remote: adding changesets
>> > remote: changesets: 1 chunks
>> > remote: add changeset 4fde4613957f
>> > remote: adding manifests
>> > remote: manifests: 1/1 chunks (100.00%)
>> > remote: adding file changes
>> > remote: adding UsersExample/web/secure/css/main.css revisions
>> > remote: files: 1/8 chunks (12.50%)
>> > remote: adding UsersExample/web/secure/css/userInfo.css revisions
>> > remote: files: 2/8 chunks (25.00%)
>> > remote: adding UsersExample/web/secure/index.jsp revisions
>> > remote: files: 3/8 chunks (37.50%)
>> > remote: adding UsersExample/web/secure/main.js revisions
>> > remote: files: 4/8 chunks (50.00%)
>> > remote: adding UsersExample/web/secure/microtasks/DetailsTask.js
>> > revisions
>> > remote: files: 5/8 chunks (62.50%)
>> > remote: adding
>> > UsersExample/web/secure/summer_api/renderable_alpha/Edge.js
>> > revisions
>> > remote: files: 6/8 chunks (75.00%)
>> > remote: adding UsersExample/web/secure/view/Node.js revisions
>> > remote: files: 7/8 chunks (87.50%)
>> > remote: adding UsersExample/web/secure/view/ValidationEdge.js revisions
>> > remote: files: 8/8 chunks (100.00%)
>> > remote: added 1 changesets with 8 changes to 8 files
>> > remote: updating the branch cache
>> > remote: calling hook changegroup.push: hgext.push-ep.push
>> > remote: Killed by signal 2.
>> >
>>
>> What does the remote changegroup.push hook do? Does it complete?
>
> It calls a python hook.
>
> [hooks]
> changegroup.push = python:hgext.push-ep.push
>
> This is the code.
>
> import logging
> import os
> import pwd
> import syslog
>
> def push(ui, repo, node, hooktype, **kwargs):
> call(["sudo", "-u", "svnuser", "/usr/bin/hg-svnuser", "push", "-f",
> "--debug", "-R", "/home/svnuser/project-hg/WebApplication/"])
> syslog.syslog("Mercurial push by " + pwd.getpwuid(os.getuid())[0])
> syslog.syslog(hooktype)
> return False
>
> The syslog messages are in the log, and when I do hg incoming/outgoing, it
> indicates both repositories are in sync.
>
> One user pushes to repository B, it pushes to A. Other users push to A and
> it pushes to B.
>
> This use to work without the locking. And as I mentioned, it works for me
> (no locking).
>
> A bit more history. It use to lock on me and not on others. Then, without
> any changes that I am aware of, the reverse began to occur (not at that same
> time).
>
>
I'm still suspicious of that hook - if I were you I would try
disabling it to see if the problem goes away.
You could also try setting ui.verbose or ui.debug on the server - that
might give you some more information.
The fact that it works for some users and not others suggests some
sort of file permissions problem, perhaps with a cache file? Have a
poke around in the .hg and .hg/cache directories to see if there are
files with unexpected permissions.
Hope that helps,
Simon
More information about the Mercurial
mailing list