How do I pull or merge an orphan revision back into a branch?

Asked by Julien

Not sure how this happened, but I "lost" some changes I had earlier committed while unbound from the master branch. Roughly, the sequence of events was

bzr checkout sftp://....
(just one revision)
(made changes)
bzr commit # committed rev no. 2
(made changes)
bzr unbind
bzr commit # committed rev no.3
(realized I messed up the commit)
bzr uncommit
(now try again)
bzr commit # commit another rev no. 3
(not all changed files were committed)
bzr bind
bzr update
(this put my local branch back to rev no. 2, with uncommited changes, bzr says I should merge)
bzr revert
(because i didn't want to deal with some unimportant uncommited changes)
bzr status
(no longer shows any pending merges!!)

If I run "bzr check" it says I have 4 revisions in the repository, as expected. But I have just two revisions in the branch. How do "pull" the orphaned rev no. 3 back into my branch ?

I can't even figure out how to list all revisions stored in the repository. There doesn't seem to be a command for this ! If I could find the right revid, then I think I could just pull or merge it back in, couldn't I ?

Any help appreciated.

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Pool
Solved:
Last query:
Last reply:
Revision history for this message
Best Martin Pool (mbp) said :
#1

The 'bzr heads' command from bzrtools will show you all revisions in
the branch that are not in any branch. You can then use 'bzr merge -r
REVID'.

--
Martin

Revision history for this message
Julien (julien-ollivier) said :
#2

Thanks Martin Pool, that solved my question.