How do I remove the working directory?

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Tue Apr 1 00:44:40 CDT 2008


On Mon, Mar 31, 2008 at 11:04 PM, Giorgos Keramidas
<keramida at ceid.upatras.gr> wrote:
> On Mon, 31 Mar 2008 19:35:25 +0100, "Paul Moore" <p.f.moore at gmail.com> wrote:
>  > I have a clone of a remote repository, which I want to use as a
>  > mirror. As such, there's no need for a working directory, but I'd
>  > missed the -U option when I created it.
>  >
>  > Is there a way of removing the working directory? It's not a big deal,
>  > as I can just reclone with -U, but I'm just curious.
>
>  Yes.  Just remove all the workspace files:
>
>     Unix:       cd repo ; rm -fr *
>
>     Windows:    deltree *
>
>     Others:     Use any file manager or shell, to delete everything
>                 _except_ the special `.hg' directory.  The files under
>                 the `.hg' directory is all you need.
>

This will leave the dirstate (I guess) out of sync, as witnessed by
`hg stat`. So I think `hg update null` as proposed earlier is better.
-peo


More information about the Mercurial mailing list