/srv/irclogs.ubuntu.com/2012/12/14/#bzr.txt

=== slank is now known as slank_away
=== bradm_ is now known as bradm
=== yofel_ is now known as yofel
=== mthaddon` is now known as mthaddon
=== slank_away is now known as slank
qenghoHi ho. Suppose that a dozen commits ago I screwed something up, and I'd like to go repair it.  What's the best way?15:19
mgzgenerally, just fix it and commit15:20
qenghoYeah, I could append a new change, but if Joe wants to take only the first five commits, he doesn't get my fix that's on the end.15:22
mgzif it's something along the lines of "accidentally committed your password" then, then you probably need to rewrite history15:22
qenghoI think I can do it with some ugly (bzr uncommit; bzr shelve -m ...;) and (bzr unshelve; bzr commit -m...), but getting the log message in and out isn't automatic, sadly.15:22
mgzyour joe example is the same regardless. people with older versions of software don't have the bug fixes (and bugs) since then15:23
LeoNerdYou can possibly pull it out a bit via   LOGMESSAGE=$(some scriptery here $(bzr log --line -r-1)); bzr uncommit; bzr shelve -m $LOGMESSAGE15:23
mgzwith dvcs you generally assume people know to pull15:23
qenghoThere's no one else with the commits I'm talking about, mgz.15:24
mgzwhat I'd do to rewrite is just `bzr branch -rLASTGOOD trunk pristine && bzr merge -rLASTGOOD..-1 -d pristine trunk` then fixup the changes and commit with a summary message noting it's a history rewrite15:26
mgzif it's my own branch, I generally don't care too much about the intermeduary commits and their messages, but it's reasonably trivial to preserve them via a little scripting as LeoNerd suggested15:27
mgzyou just do -rLASTGOOD..(LASTGOOD+1) as the cherrypick+fixup then replay the subsequent changes afterwards15:28
mgzthe `bzr replay` command provided by rebase is enough for that15:30
mgzsorry, bzr-rewrite15:30
qenghoThanks, guys.15:31
mgzhaving two branches is helpful because if you screw up you just nuke the new one and try again.15:32
LeoNerdYah.15:33
qenghoNot perfect, but a first try on pushing/popping.  lp:~cmiller/+junk/bzr-pushpop16:19
=== deryck is now known as deryck[lunch]
=== deryck[lunch] is now known as deryck
=== slank is now known as slank_away

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