Splitting history

Asked by Francois Trahan

Is it possible to "split" history...

Here's what i want to do :

I'm working on a big project. I started a feature branch, created a subfolder and worked for a while in this folder (hack, commit, hack, commit).

In the end, I don't want to merge this work because I want it to be a separate project. I know I could split but the original project is not open source while this part will be... The problem with a split is that you end up with the entire history which exposes the proprietary project and makes the new project quite big.

Is there a way to take this branch and pretend it did not originate from the other project or to "forget" history before the branch. One thing I'd like to be able to do is to "merge" the past commits, as if it was an original import of code.

Even better : Is there a way to keep only history for a subset of files (i.e. forget things about what has been deleted)

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
John A Meinel
Solved:
Last query:
Last reply:
Revision history for this message
Best John A Meinel (jameinel) said :
#1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francois Trahan wrote:
> New question #103922 on Bazaar:
> https://answers.launchpad.net/bzr/+question/103922
>
> Is it possible to "split" history...
>
> Here's what i want to do :
>
> I'm working on a big project. I started a feature branch, created a subfolder and worked for a while in this folder (hack, commit, hack, commit).
>
> In the end, I don't want to merge this work because I want it to be a separate project. I know I could split but the original project is not open source while this part will be... The problem with a split is that you end up with the entire history which exposes the proprietary project and makes the new project quite big.
>
> Is there a way to take this branch and pretend it did not originate from the other project or to "forget" history before the branch. One thing I'd like to be able to do is to "merge" the past commits, as if it was an original import of code.
>
> Even better : Is there a way to keep only history for a subset of files (i.e. forget things about what has been deleted)
>
> Thanks
>

You might look into "bzr fast-export" and "bzr fast-import-filter"
provided by the 'bzr-fastimport' plugin. (lp:bzr-fastimport)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuYCh4ACgkQJdeBCYSNAAMDwgCeMZsPb78/vhuWYlsNM2N4n0+U
LI4AnAkludayj9cfYUz0HgtSIPUdC18R
=FluM
-----END PGP SIGNATURE-----

Revision history for this message
Francois Trahan (francois-trahan) said :
#2

Thanks John A Meinel, that solved my question.

Revision history for this message
Francois Trahan (francois-trahan) said :
#3

Oh wow... there should be a more publicity around this !!!