Conceptual Question about Repos and structuring development workspaces...

Marek Gilbert gil at fooplanet.com
Mon Mar 26 18:33:01 CDT 2007


On Mar 20, 2007, at 9:53 AM, Paul Moore wrote:

> On 20/03/07, Matt Mackall <mpm at selenic.com> wrote:
>> > I am a bit worried, that if I jump in making repos here, there and
>> > everywhere, I might come to regret it later.
>>
>> You should probably just do one then until you're comfortable with  
>> how
>> it works.
>
> Excuse me butting in, but I suspect I'm going to want to think about
> this sort of thing at some point, as well...
>
> Assuming I went for the "one big repository" approach, is it
> easy/possible to later split off a part of the whole (say, one
> project) into its own repository, while preserving history?
>
> Given that this isn't possible with something like Subversion, it'd be
> hard to claim that it was a "problem" with Mercurial if I couldn't do
> this, but it would be neat if it could :-)

Sorry to jump in so late, but this is possible in subversion, but not  
in the most straightforward way.  You need to take a dump of the  
repository and then use a dump filter to select the things you want  
into a new dump.  If you restore into a new repository you'll have  
created a repository with just a subset of the original.  See here  
for an idea of the kinds of commands you'd issue (though this example  
demonstrates removing something from the repository permanently):  
http://textsnippets.com/posts/show/385.

Regardless, I've always found it good policy to put each client into  
a separate repository.  That way they can ask for and you can easily  
provide them their code without any information leakage and without  
any stress on your part.

--Gil


More information about the Mercurial mailing list