Azendale | I 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 |
---|---|---|
Azendale | Is 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 |
Azendale | I'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 |
mwhudson | Azendale: yes you need to do something like rebase to do that | 23:07 |
Azendale | mwhudson: 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 take | 23:09 |
mwhudson | Azendale: no, i've never used it | 23:09 |
mwhudson | Azendale: if it's just a few commits back you can sort of do it by hand | 23:10 |
Azendale | mwhudson: I think it's something like 5 commits or so | 23:10 |
Azendale | mwhudson: 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 |
mwhudson | Azendale: yeah | 23:12 |
Azendale | mwhudson: Ok, thanks for the help | 23:13 |
lifeless | bzr replay may be a good way to nab those commit messages | 23:16 |
jelmer | Azendale: 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 |
Azendale | ok, thanks :) | 23:17 |
mwhudson | ah yes | 23:25 |
mwhudson | i knew there was an automated solution somewhere :) | 23:25 |
Azendale | mwhudson, 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 |
Azendale | mwhudson, 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!