aboutsummaryrefslogtreecommitdiffstats
path: root/admin/notes
diff options
context:
space:
mode:
authorGlenn Morris2012-12-29 10:15:47 -0800
committerGlenn Morris2012-12-29 10:15:47 -0800
commit4d4056371fef0661d65b9cb3aa91de1fd4c7c010 (patch)
tree26fb6cfa7bfd2abbbfe1b6f6c81f8d6e206f5b14 /admin/notes
parent8d23a331207808396cf7359314f506158900f024 (diff)
downloademacs-4d4056371fef0661d65b9cb3aa91de1fd4c7c010.tar.gz
emacs-4d4056371fef0661d65b9cb3aa91de1fd4c7c010.zip
How to uncommit
Diffstat (limited to 'admin/notes')
-rw-r--r--admin/notes/bzr65
1 files changed, 65 insertions, 0 deletions
diff --git a/admin/notes/bzr b/admin/notes/bzr
index 50eaf3710ee..cdcfa7e7e3d 100644
--- a/admin/notes/bzr
+++ b/admin/notes/bzr
@@ -182,6 +182,71 @@ where revision N+1 is the one where file was removed.
182You could also try `bzr add --file-ids-from', if you have a copy of 182You could also try `bzr add --file-ids-from', if you have a copy of
183another branch where file still exists. 183another branch where file still exists.
184 184
185* Undoing a commit (uncommitting)
186
187It is possible to undo/remove a bzr commit (ie, to uncommit).
188Only do this if you really, really, need to. For example, if you
189somehow made a commit that triggers a bug in bzr itself.
190Don't do it because you made a typo in a commit or the log.
191
192If you do need to do this, do it as soon as possible, because the
193longer you leave it, the more work is involved.
194
1950. First, tell emacs-devel that you are going to do this, and suggest
196people not commit anything to the affected branch for the duration.
197
198In the following, replace USER with your Savannah username, and
199BRANCH with the name of the branch.
200Let's assume that revno 100 is the bad commit, and that there have
201been two more commits after that (because nothing is ever easy).
202
2031. Ensure your copy of the branch is up-to-date (for a bound
204branch, bzr up; for an unbound branch, bzr pull) and has no local
205changes (bzr st).
206
2072. Make a record of the commits you are going to undo:
208bzr diff -c 102 > /tmp/102.diff
209etc
210
211Also record the commit message, author, and any --fixes information.
212
2133. Most Emacs branches are set up to prevent just this kind of thing.
214So we need to disable that protection:
215
216bzr config append_revisions_only=False \
217 -d bzr+ssh://USER@bzr.savannah.gnu.org/emacs/BRANCH/
218
2194. Undo the commits:
220bzr uncommit -r -4
221
222This will show the commits it is going to undo, and prompt you to confirm.
223
2245. If using an unbound branch:
225bzr push --overwrite
226
2276. Now, replay the commits you just undid (obviously, fix whatever it
228was in the bad commit that caused the problem):
229
230patch -p0 < /tmp/100.diff
231bzr commit --author ... --fixes ... -F /tmp/100.log
232etc
233
2347. If using an unbound branch:
235bzr push
236
2378. Finally, re-enable the branch protection:
238bzr config append_revisions_only=True \
239 -d bzr+ssh://USER@bzr.savannah.gnu.org/emacs/BRANCH/
240
2419. Tell emacs-devel that it is ok to use the branch again.
242Anyone with local changes should back them up before doing anything.
243
244For a bound branch, bzr up will convert any of the undone commits to a
245pending merge. Just bzr revert these away.
246
247For an unbound branch, bzr pull will complain about diverged branches
248and refuse to do anything. Use bzr pull --overwrite.
249
185* Loggerhead 250* Loggerhead
186 251
187Loggerhead is the bzr tool for viewing a repository over http (similar 252Loggerhead is the bzr tool for viewing a repository over http (similar