Create a new branch of the last two revisions of an existing branch?
I 'accidentally' created some revisions in an existing branch, it now turns out that this revisions are worth a completely new branch in a different project. How can I create a new branch out of the last revisions of an existing branch, with forgetting all other changes?
Let's have a look at an example:
*let's say I have the following branch structure:
mkdir base
cd base
bzr init
echo 1 > 1
bzr add
bzr commit -m "rev 1"
echo 2 > 2
bzr add
bzr commit -m "rev 2"
echo 3 > 3
bzr add
bzr commit -m "rev 3"
echo 4 > 4
bzr add
bzr commit -m "rev 4"
* now it turns out that revision 3 and 4 are unrelated to this branch, how can I create a new branch having the old revision #3 as revision #1 and the old revision #4 as revision #2?
the result should look like the result of:
bzr diff -r -3.. > ../diff.diff
mkdir ../new
cd ../new
bzr init
bzr patch ../diff.diff
bzr add
bzr commit -m "rev 3 and 4"
plus the revision history
My first idea was to try something like
bzr branch base -r -3.. , but bzr branch is not working for ranges of revisions
luks showed me how to use bzr replay on #bzr, but this way I did not get the expected result (maybe I did not do it the right way)
Is it even possible with bzr?
Thanks for your help,
Markus
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Marius Kruger
- Solved:
- Last query:
- Last reply: