/srv/irclogs.ubuntu.com/2013/06/30/#bzr.txt

AzendaleI have a project that so far I have only worked on. I would eventually like to release it to the public with BZR revision history eventually. The problem is that I just realized that I accidentally committed a password to the branch a few commits ago.22:58
AzendaleIs it possible to remove that password from the branch (which has not been shared with anyone) without loosing the commits since, or worse, all the commit history up to this point?22:58
AzendaleI'm thinking bzr rebase is the key, but my head isn't wrapping around the time travel involved well enough to come up with what steps I would have to take.22:59
mwhudsonAzendale: yes you need to do something like rebase to do that23:07
Azendalemwhudson: Do you know the general steps I would follow? I've read the man page but haven't been able to figure out the steps I would take23:09
mwhudsonAzendale: no, i've never used it23:09
mwhudsonAzendale: if it's just a few commits back you can sort of do it by hand23:10
Azendalemwhudson: I think it's something like 5 commits or so23:10
Azendalemwhudson: I have considered branching before the bad commit, then using bzr diff to make a patch to apply, then manually copying the commit messages. Is that what you're suggesting I do?23:12
mwhudsonAzendale: yeah23:12
Azendalemwhudson: Ok, thanks for the help23:13
lifelessbzr replay may be a good way to nab those commit messages23:16
jelmerAzendale: in theory the diff + patch step can be done by "bzr replay" (which is part of the bzr-rewrite plugin that rebase also lives in)23:16
Azendaleok, thanks :)23:17
mwhudsonah yes23:25
mwhudsoni knew there was an automated solution somewhere :)23:25
Azendalemwhudson, lifeless, jelmer: I got it to work. Branched before the commit with the password. Then did a cherry pick merge of the bad commit (bzr merge -c <badcommit>), because I did have changes I wanted in there. Then I had it forget the merge (bzr revert --forget-merges). I removed the password and commited that. (Thereby keeping the good changes from the commit with the password)23:51
Azendalemwhudson, lifeless, jelmer: Then I did bzr replay -r<commit_after_the_password_commit>.. <path_to_branch_with_password>23:52

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!