hg rm without removing the file?

Matt Mackall mpm at selenic.com
Thu Apr 26 11:21:56 CDT 2007

On Thu, Apr 26, 2007 at 05:42:05PM +0200, Marcin Kasperski wrote:
> I wrote:
> > One can of course workaround by renaming file, hg rm --after
> > it, and renaming it back, but it is problematic when the file
> > is used by some processess (say, casus of pidfile, lockfile
> > etc)
> and you gave similar workaround:
> > To get Hg to stop tracking a file, you need to 'hg rm' the
> > file and add the filename into .hgignore. After the commit,
> > you can 'hg cat' to retrieve the file.
> which nevertheless does not solve the actual problem: there are 
> cases when I do not want to remove the file which I want to stop 
> tracking. Because, for instance, it is actively used by some 
> running processess. 

There's a patch in the bug tracker to add this feature, we'll get to
it soon.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial mailing list