3

I'm currently getting this message whenever I try to push to one of our repositories:

waiting for lock on repository <repo_path> held by '<hostname>:4228'

The hostname is the PC I'm trying to push from, and the port number changes each time I try.

I've searched and found this answer which suggests deleting the file .hg/store/lock but this file is not present on my computer.

Interestingly I see the lock file appear when I run the command, and see it removed again when I cancel the operation with ctrl-C. It's almost like the hg process doesn't recognise that it is its own lock.

Any ideas?

Community
  • 1
  • 1
UpTheCreek
  • 31,444
  • 34
  • 152
  • 221

2 Answers2

1

Seems like there is a stale file in the Bitbucket server.

Contact the support of the server and forward them the error message. Or just try again. Chances are that they have a cleanup process which removes stale locks after a timeout.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • Thanks, I'll do that. Don't you think it's strange that the port is changing with each attempt though? I mean, if it was a stale lock file, wouldn't the port number remain constant until that file was removed? – UpTheCreek Jul 21 '14 at 09:37
  • Same host? In that case, maybe someone has written a script which connects to the repo every 5 seconds... – Aaron Digulla Jul 21 '14 at 10:07
  • @UpTheCreek: That port is the _client_ port. This is mostly random from the pool of free ports on your computer. – Sherlock70 Jul 22 '14 at 07:56
0

Go to your local .hg directory and delete the wlock file.

Umberto
  • 2,011
  • 1
  • 23
  • 27