Comments
Patch
@@ -15,17 +15,17 @@
$ cat > testlock.py << EOF
> from mercurial import error, registrar
- >
+ >
> cmdtable = {}
> command = registrar.command(cmdtable)
- >
+ >
> def acquiretestlock(repo, releaseexc):
> def unlock():
> if releaseexc:
> raise error.Abort(b'expected release exception')
> l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock')
> return l
- >
+ >
> @command(b'testlockexc')
> def testlockexc(ui, repo):
> testlock = acquiretestlock(repo, True)
@@ -113,11 +113,19 @@
# show more details for new-style locks
if ':' in locker:
host, pid = locker.split(":", 1)
- msg = (_("waiting for lock on %s held by process %r on host %r\n")
+ msg = (_("waiting for lock on %s held by process %r on host %r\n"
+ """Another Mercurial process seems to be running in
+ this repository, e.g. an editor opened by 'hg commit'.
+ Please make sure all processes are terminated then
+ try again.\n""")
% (pycompat.bytestr(l.desc), pycompat.bytestr(pid),
pycompat.bytestr(host)))
else:
- msg = (_("waiting for lock on %s held by %r\n")
+ msg = (_("waiting for lock on %s held by %r\n"
+ """Another Mercurial process seems to be running in
+ this repository, e.g. an editor opened by 'hg commit'.
+ Please make sure all processes are terminated then
+ try again.\n""")
% (l.desc, pycompat.bytestr(locker)))
printer(msg)
@@ -307,7 +307,11 @@
l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc)
except error.LockHeld as inst:
self.ui.warn(
- _("waiting for lock on %s held by %r\n") % (desc, inst.locker))
+ _("waiting for lock on %s held by %r\n"
+ """Another Mercurial process seems to be running in
+ this repository, e.g. an editor opened by 'hg commit'.
+ Please make sure all processes are terminated then
+ try again.\n""") % (desc, inst.locker))
# default to 600 seconds timeout
l = lock.lock(
vfs, 'namejournal.lock',