Mercurial stuck “waiting for lock”

When “waiting for lock on repository”, delete the repository file: .hg/wlock (or it may be in .hg/store/lock) When deleting the lock file, you must make sure nothing else is accessing the repository. (If the lock is a string of zeros or blank, this is almost certainly true).

Changing Mercurial “Default” Parent URL

You can even add multiple entries in the [paths] section of your .hg/hgrc file. [paths] default = /repo_store/hg/project1 sandbox = /repo_store/hg/project1_experimental And then can specify its alias in the mercurial commands. default repo need not be specified but others have to be like, hg in # check incoming changes from default repo hg in default … Read more

Store password in TortoiseHg

Both existing answers suggest storing your username and password unencrypted in plain-text, which is a bit of a no-no. You should use the Keyring extension instead, as it has been specifically designed for securely saving authentication passwords. It already comes bundled with TortoiseHg, so all you have to do is activate it by writing the … Read more

Can you ‘push’ to network share using Mercurial on 64bit Windows 7?

Pushing to a network share is possible, but not recommended by the Mercurial team. See the “shared disk” part in Publishing Repositories in the Mercurial wiki: generally restricted to intranets, not generally recommended due to general issues with network filesystem reliability At my workplace, we are keeping our HG repositories on a network share (on … Read more

Mercurial: Can I rename a branch?

Update to the stiging branch and create a new branch off of it. Then close the old branch. In summary: hg update stiging hg branch staging hg commit -m”Changing stiging branch to staging.” hg update stiging hg commit –close-branch -m”This was a typo; use staging instead.” hg push –new-branch

How to save username and password with Mercurial?

You can make an auth section in your .hgrc or Mercurial.ini file, like so: [auth] bb.prefix = bb.username = foo bb.password = foo_passwd The ‘bb’ part is an arbitrary identifier and is used to match prefix with username and password – handy for managing different username/password combos with different sites (prefix) You can also … Read more