From a241b7c067132a073c29dc924846952fd7a7391b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 13 Feb 2011 18:52:02 -0800 Subject: [PATCH] * admin/notes/bzr: Add section on undoing a bzr remove. --- admin/notes/bzr | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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. -- 2.39.5