=== 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 | ||
qengho | Hi 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 |
---|---|---|
mgz | generally, just fix it and commit | 15:20 |
qengho | Yeah, 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 |
mgz | if it's something along the lines of "accidentally committed your password" then, then you probably need to rewrite history | 15:22 |
qengho | I 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 |
mgz | your joe example is the same regardless. people with older versions of software don't have the bug fixes (and bugs) since then | 15:23 |
LeoNerd | You can possibly pull it out a bit via LOGMESSAGE=$(some scriptery here $(bzr log --line -r-1)); bzr uncommit; bzr shelve -m $LOGMESSAGE | 15:23 |
mgz | with dvcs you generally assume people know to pull | 15:23 |
qengho | There's no one else with the commits I'm talking about, mgz. | 15:24 |
mgz | what 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 rewrite | 15:26 |
mgz | if 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 suggested | 15:27 |
mgz | you just do -rLASTGOOD..(LASTGOOD+1) as the cherrypick+fixup then replay the subsequent changes afterwards | 15:28 |
mgz | the `bzr replay` command provided by rebase is enough for that | 15:30 |
mgz | sorry, bzr-rewrite | 15:30 |
qengho | Thanks, guys. | 15:31 |
mgz | having two branches is helpful because if you screw up you just nuke the new one and try again. | 15:32 |
LeoNerd | Yah. | 15:33 |
qengho | Not perfect, but a first try on pushing/popping. lp:~cmiller/+junk/bzr-pushpop | 16: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!