hg remove without erasing file in working dir ?

Joe Bruce joe.bruce.psu at gmail.com
Tue Nov 28 14:34:12 CST 2006

Unfortunately I don't have an answer -- I just wanted to chime in with, "Me
too."  I had a need for this when I put my /etc under Mercurial control. I
soon realized that several files (e.g., /etc/mtab) should not be under
version control, as they regularly change during the course of use.

I ended up doing a "cp -p" to a different filename (preserving the
timestamp), 'hg rm', and then 'cp -p' to restore the file.

The 'hg rm' command supports the '--after' option, which is sort of opposite
what is needed. Mercurial needs a
option.  ;-)


On 11/28/06, Mathieu Clabaut <mathieu.clabaut at gmail.com> wrote:
> Hello,
>   is there a way to remove a file from a repo without erasing it from
> the working dir (I'd like to not mv/cp the file in order to preserve
> timestmaps et al.)
> -mathieu
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.selenic.com/pipermail/mercurial/attachments/20061128/1a30ab72/attachment.htm

More information about the Mercurial mailing list