Changing the root of a Mercurial repository

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the root of a Mercurial repository

Stephen Gerstacker-2

I migrated an old project from SVN to hg recently.  It went great and I’ve been using hg for a while.  This is a Ruby on Rails application.

 

Originally, the Ruby on Rails projects root was in a couple of subdirectories in the repository. (/src/Project).  Rails uses Capistrano to deploy to remote servers.  With SVN, I could specify a part of the repository to check out, but with hg, this doesn’t seem to be so.

 

What I’d like to do is remove the other stuff from the repository and then move the /src/Project folder to the root of the repository.  Is there a good way to do this?

 

Just for the record, the source tree looks like:

 

/docs

/libs

/src/Project

 

I’d like to remove docs and libs and then make /src/Project the root.  I’m still a bit new to hg, so I don’t want to completely destroy everything :P.

 

- Stephen


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.2/894 - Release Date: 7/10/2007 17:44


_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Changing the root of a Mercurial repository

Benoit Boissinot
On 7/11/07, Stephen Gerstacker <[hidden email]> wrote:
>
> I'd like to remove docs and libs and then make /src/Project the root.  I'm
> still a bit new to hg, so I don't want to completely destroy everything :P.
>

If the repository is relatively small, you might be able to just hg rm
docs libs,
hg mv src/Project/* . ; hg rm src

(this will keep all the history, another solution might be using the
transplant extension if it supports path-based filtering)

regards,

Benoit
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial