Pulling out directory

Steve Barnes gadgetsteve at hotmail.com
Tue Jan 22 08:39:45 UTC 2013


On 22/01/13 03:39, Adrian Klaver wrote:
> On 01/21/2013 06:30 PM, Becker, Mischa J wrote:
>>> -----Original Message-----
>>> From: mercurial-bounces at selenic.com [mailto:mercurial-
>>> bounces at selenic.com] On Behalf Of Adrian Klaver
>>> Sent: Monday, January 21, 2013 6:17 PM
>>> To: mercurial
>>> Subject: Re: Pulling out directory
>>>
>>> On 01/20/2013 05:37 PM, Adrian Klaver wrote:
>>>> Wonder if it is possible to pull a directory out of one repo and put
>>>> it into another along with its history?
>>>>
>>>> The situation is:
>>>>
>>>> 1) Converted a bzr directory to hg.
>>>> 2) Realized it was good time to split the project.
>>>> 3) Use hg convert the hg repo created into two smaller hg repos
>>>> leaving out some directories that I thought where not necessary.
>>>> 4) Then realized one of those left out directories really needed to be
>>>> moved into one of the new repos.
>>>> 5) Would like to do so and keep the history for the code in that
>>> directory.
>>>>
>>>
>>> So I guess not?
>>
>> You can use hg convert to pull out that directory and forcibly put it 
>> into the repo it was left out of but doing so results in new 
>> changesets unrelated to the current ones. (Probably not what you are 
>> wanting.) It would be better to go back and redo the hg convert 
>> correctly to create a brand new repo.
>
> That is what I ended up doing since I was not that to far into the new 
> repo. Figured there might be a way to do this, should I ever get in 
> deeper.
>
>>
>> Mischa Becker
>>
>>
>>
>
>
I think that your best bet would be to enable mq, (patch queuing tool), 
and generate patches for all the changes since the convert, generate a 
new mercurial repository, (with a new name), that includes the missing 
directories using convert again, then apply the patches to the new 
repository.

Or am I being too simplistic?

-- 
Steve /Gadget/ Barnes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130122/6a2cfc63/attachment-0002.html>


More information about the Mercurial mailing list