From: Michael Haggerty Date: Mon, 11 Mar 2013 13:53:44 GMT Subject: Re: Rewriting references to existing commits in commit messages with filter-branch Message-ID: <513DE1E8.7010302@alum.mit.edu> In-Reply-To: On 03/11/2013 12:45 PM, Vadim Zeitlin wrote: > [...] > The first thing I'd like to do is to replace all references to subversion > revision numbers in the commit messages with the corresponding git commit > SHA1s. [...] I have a couple of dozens of errors which happen > because the file .git-rewrite/map/$commit doesn't exist yet when I'm trying > to look it up. The quick and dirty solution would be to rewrite your script such that if the commit is still unknown to Git, it emits a warning and leaves the commit message unchanged (i.e., leaves the Subversion revision number untouched). Then simply run the filter-branch a few times until it emits no warnings. Michael -- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/