Revert lp branch

Asked by Dylan Millikin

Hi,

I recently pushed my trunk code into another one of my series by mistake. I'm now struggling to revert back to it's original state.
I tried bzr revert -r XXX lp:YYY/1.0 but that comes back with a "No working tree exists" error
So I figured I would just revert the branch localy and then do a bzr push --overwrite lp:YYY/1.0 but that just tells me there are no new revisions to push.

How should I go about this?

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jelmer Vernooij
Solved:
Last query:
Last reply:
Revision history for this message
Best Jelmer Vernooij (jelmer) said :
#1

Hi Dylan,

"bzr revert -rX" will only change the working tree back to the contents of what was in revision X. It will not actually change the branch history. To change the branch history, you can either use "bzr up -rX" (I think) or alternatively, "bzr pull --overwrite -rX ." (note the dot).

Revision history for this message
Dylan Millikin (dylan-millikin) said :
#2

"bzr up -r X "didn't solve my issue as it would still tell me no changes were made to the branch while trying to push it into launchpad.
"bzr pull --overwrite -r XXX lp:YYY/1.0" and then pushing that branch back into lp:YYY/1.0 did work though.

Thank you plenty!

Revision history for this message
Dylan Millikin (dylan-millikin) said :
#3

Thanks Jelmer Vernooij, that solved my question.

Revision history for this message
Dylan Millikin (dylan-millikin) said :
#4

Oh and as an extra piece of information I had to append the --overwrite tag while pushing (obviously). Just in case anyone needs that extra piece of info.