lock: Improve the waiting for lock message which will help newcomers (issue6081)
Needs ReviewPublic

Authored by akshjain.jain74 on Feb 26 2019, 4:30 AM.

Details

Reviewers
None
Group Reviewers
hg-reviewers

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped
pulkit added a subscriber: pulkit.Feb 26 2019, 9:21 AM

This patch does not changes any code. It only changes some test output. You need to change the error message in the code.

Ya I am sending that just trying to find out the file

pulkit added inline comments.Feb 28 2019, 4:31 PM
hgext/journal.py
310–314

This is only for locking namejournal.lock and not for working directory lock and store lock. We need to improve message there too.

316

remove which file manually to continue?

I think we should delete the If it still fails, ..... remove the file manually to continue part.

tests/test-lock-badness.t
18

unrelated changes in the test file here and below.

akshjain.jain74 marked 2 inline comments as done.
akshjain.jain74 marked an inline comment as done.Feb 28 2019, 5:14 PM

@pulkit done changes as per your suggestion in lock file too but what did you meant by storelock?

pulkit added a comment.Mar 6 2019, 8:40 AM

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 <cmd-name> on host '*'

tests/test-extdiff.t
155

unrelated changes.

tests/test-lock-badness.t
18

still here are unrealted changes.

62

The output is not correctly aligned.

okay @pulkit let me work upon your suggestion and

tests/test-lock-badness.t
18

I accept these changes while running test, if i am not changing this then it will cause test failing

In 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 <cmd-name> on host '*'

So for which commands we can show this message, like i got message when i run hg commit --amend sometimes