D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
Herald added a subscriber: mercurial-patches. This revision now requires changes to proceed. baymax added a comment. baymax requested changes to this revision. There seems to have been no activities on this Diff for the past 3 Months. By policy, we are automatically moving it out of the `need-review` state. Please, move it back to `need-review` without hesitation if this diff should still be discussed. :baymax:need-review-idle: REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6026/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers, baymax Cc: mercurial-patches, marmoute, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
marmoute added a comment. Gentle ping on this. This has been around for a long time, what's the status of it? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6026/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: marmoute, pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. In https://phab.mercurial-scm.org/D6026#88552, @pulkit wrote: > I am not sure the new message is much helpful. As JordiGH and others pointed out on IRC, it will definitely be helpful if we can show which operation has the lock right now. > > Something like: > > `waiting for lock on working directory of b held by process '*' running on host '*'` So for which commands we can show this message, like i got message when i run hg commit --amend sometimes REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. okay @pulkit let me work upon your suggestion and INLINE COMMENTS > pulkit wrote in test-lock-badness.t:18 > still here are unrealted changes. I accept these changes while running test, if i am not changing this then it will cause test failing REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
pulkit added a comment. I am not sure the new message is much helpful. As JordiGH and others pointed out on IRC, it will definitely be helpful if we can show which operation has the lock right now. Something like: `waiting for lock on working directory of b held by process '*' running on host '*'` INLINE COMMENTS > test-extdiff.t:155 > + diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) >diffing */extdiff.*/a.46c0e4daeb72/a a.81906f2b98ac/a (glob) >making snapshot of 2 files from rev 46c0e4daeb72 unrelated changes. > pulkit wrote in test-lock-badness.t:18 > unrelated changes in the test file here and below. still here are unrealted changes. > test-lock-badness.t:62 >waiting for lock on working directory of b held by process '*' on host '*' > (glob) > + Another Mercurial process seems to be running in > + this repository, e.g. an editor opened by 'hg commit'. The output is not correctly aligned. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14291. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14279=14291 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py mercurial/lock.py tests/test-check-pyflakes.t tests/test-clone.t tests/test-extdiff.t tests/test-lock-badness.t tests/test-phases-exchange.t tests/test-remotefilelog-bgprefetch.t CHANGE DETAILS diff --git a/tests/test-remotefilelog-bgprefetch.t b/tests/test-remotefilelog-bgprefetch.t --- a/tests/test-remotefilelog-bgprefetch.t +++ b/tests/test-remotefilelog-bgprefetch.t @@ -282,8 +282,13 @@ $ hg prefetch --repack waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) got lock after * seconds (glob) (?) + Another Mercurial process seems to be running in + * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) + this repository, e.g. an editor opened by 'hg commit'. + Please make sure all processes are terminated then + try again. + got lock after 1 seconds (running background incremental repack) - * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) $ sleep 0.5 $ hg debugwaitonrepack >/dev/null 2>%1 diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -1319,6 +1319,10 @@ $ hg push ../Phi --config ui.timeout=1 pushing to ../Phi waiting for lock on repository $TESTTMP/Upsilon held by '' + 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. abort: repository $TESTTMP/Upsilon: timed out waiting for lock held by '' (lock might be very busy) [255] diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,14 @@ $ 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) @@ -62,6 +59,10 @@ $ cat preup-stdout $ cat preup-stderr waiting for lock on working directory of b held by process '*' on host '*' (glob) + 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. got lock after * seconds (glob) $ cat stdout adding b @@ -105,6 +106,10 @@ $ cat preup-stdout calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) + 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. got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr @@ -122,6 +127,10 @@ $ cat preup-stdout calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) + 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. got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t --- a/tests/test-extdiff.t +++ b/tests/test-extdiff.t @@ -151,8 +151,8 @@ Test --per-file option for gui tool: $ hg --config extdiff.gui.alabalaf=True alabalaf -c 6 --per-file --debug + diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) diffing */extdiff.*/a.46c0e4daeb72/a a.81906f2b98ac/a (glob) - diffing */extdiff.*/a.46c0e4daeb72/b a.81906f2b98ac/b (glob) making snapshot of 2 files from rev 46c0e4daeb72 a b diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -1141,6 +1141,10 @@ $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock (sharing
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 marked an inline comment as done. akshjain.jain74 added a comment. @pulkit done changes as per your suggestion in lock file too but what did you meant by storelock? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14279. akshjain.jain74 marked 2 inline comments as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14277=14279 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py mercurial/lock.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -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) diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -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) diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -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', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
pulkit added inline comments. INLINE COMMENTS > journal.py:310 > self.ui.warn( > -_("waiting for lock on %s held by %r\n") % (desc, > inst.locker)) > +_("waiting for lock on %s held by %r\n" "on host %r\n" > +"""Another Mercurial process seems to be running in This is only for locking namejournal.lock and not for working directory lock and store lock. We need to improve message there too. > journal.py:316 > + may have crashed in this repository earlier: > + remove the file manually to continue.\n""") % (desc, inst.locker)) > # default to 600 seconds timeout remove which file manually to continue? I think we should delete the `If it still fails, . remove the file manually to continue` part. > test-lock-badness.t:18 >> from mercurial import error, registrar > - > >> cmdtable = {} unrelated changes in the test file here and below. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14277. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14274=14277 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -15,17 +15,14 @@ $ 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) @@ -107,6 +104,7 @@ waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat preup-stderr $ cat stdout adding e @@ -124,6 +122,7 @@ waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat preup-stderr $ cat stdout adding f diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,13 @@ 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" "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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14274. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14273=14274 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -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) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -307,7 +307,13 @@ 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" "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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14273. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14272=14273 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -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) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -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" "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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14272. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14271=14272 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -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) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -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" "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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 updated this revision to Diff 14271. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6026?vs=14244=14271 REVISION DETAIL https://phab.mercurial-scm.org/D6026 AFFECTED FILES hgext/journal.py tests/test-lock-badness.t CHANGE DETAILS diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t --- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -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) @@ -106,6 +106,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout @@ -123,6 +129,12 @@ calling hook pre-update: hghook_pre-update.sleephalf waiting for lock on working directory of b held by process '*' on host '*' (glob) got lock after * seconds (glob) + + 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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue. 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat preup-stderr $ cat stdout diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -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" "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. If it still fails, a Mercurial process + may have crashed in this repository earlier: + remove the file manually to continue.\n""") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( vfs, 'namejournal.lock', To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
akshjain.jain74 added a comment. Ya I am sending that just trying to find out the file REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)
pulkit added a comment. This patch does not changes any code. It only changes some test output. You need to change the error message in the code. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6026 To: akshjain.jain74, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel