Help removing files (and good mercurial usage)

Alexis S. L. Carvalho alexis at cecm.usp.br
Sat Feb 16 13:58:03 CST 2008


Thus spake Francisco Diaz Trepat - gmail:
> 2) The way I am moving the project is simply zipping the top folder and
> sending it by mail (kind of small project).

> But now I notice a problem, when trying to remove a file (and moreover when
> netbens tries to remove a file) it hangs. And when doing it from the console
> I get this message:
> 
> 
> $ hg rm src/com/fdt/cognoscere/gui/forms/.LCKBundle.properties~
> waiting for lock on working directory of c:\stuff\dev\Cognoscere held by
> 'PC-163:2560'

For some operations (including add, remove, commit, copy, update...), hg
creates a .hg/wlock lock file to avoid concurrent updates (and in other
operations it creates a .hg/store/lock file).

The file contains the identity of the process that created the lock.
If you're in the same machine, hg can detect that that process is no
longer around and remove the lock.  But since you're in another
machine, hg has no way to know that the original process is gone.

You've probably accidentally zipped this lock file with the rest of the
repo and so it should be safe to remove it.

Alexis


More information about the Mercurial mailing list