From: Glenn Morris Date: Mon, 14 Feb 2011 02:52:02 +0000 (-0800) Subject: * admin/notes/bzr: Add section on undoing a bzr remove. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~885 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a241b7c067132a073c29dc924846952fd7a7391b;p=emacs.git * admin/notes/bzr: Add section on undoing a bzr remove. --- diff --git a/admin/notes/bzr b/admin/notes/bzr index 07a3c6dd09f..11f0af17a3b 100644 --- a/admin/notes/bzr +++ b/admin/notes/bzr @@ -134,3 +134,27 @@ right thing to do is merge everything else, resolve the conflict by choosing either the trunk or branch version, then run `make -C lisp autoloads' to update the md5sums to the correct trunk value before committing. + +* Re-adding a file that has been removed from the repository + +It's easy to get this wrong. Let's suppose you've done: + +bzr remove file; bzr commit + +and now, sometime later, you realize this was a mistake and file needs +to be brought back. DON'T just do: + +bzr add file; bzr commit + +This restores file, but without its history (`bzr log file' will be +very short). This is because file gets re-added with a new file-id +(use `bzr file-id file' to see the id). + +Insteading of adding the file, try: + +bzr revert -rN file; bzr commit + +where revision N+1 is the one where file was removed. + +You could also try `bzr add --file-ids-from', if you have a copy of +another branch where file still exists.