Mercurial push locks
durwin at mgtsciences.com
durwin at mgtsciences.com
Thu Sep 25 17:33:15 UTC 2014
Simon King <simon at simonking.org.uk> wrote on 09/25/2014 03:09:50 AM:
> From: Simon King <simon at simonking.org.uk>
> To: durwin <durwin at mgtsciences.com>
> Cc: Mercurial mailing list <mercurial at selenic.com>
> Date: 09/25/2014 03:10 AM
> Subject: Re: Mercurial push locks
>
> 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 atthat
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.
I am trying this suggestion. Will need to wait till next time someone
pushes.
>
> You could also try setting ui.verbose or ui.debug on the server - that
> might give you some more information.
Already had debug=true. Added verbose=true
>
> 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.
I suspected this, so I had one person create a new clone with the username
'svnuser'
(Don't let the name fool you, this is a mercurial repository). It still
locked up.
As part of my debugging I would regularly re-cursively set username/group
to svnuser.
If there was a wrong permission, wouldn't it fail or not complete?
>
> Hope that helps,
>
> Simon
This email message and any attachments are for the sole use of the
intended recipient(s) and may contain proprietary and/or confidential
information which may be privileged or otherwise protected from
disclosure. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient(s), please contact the
sender by reply email and destroy the original message and any copies of
the message as well as any attachments to the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140925/dbb3aed9/attachment-0002.html>
More information about the Mercurial
mailing list