-
Notifications
You must be signed in to change notification settings - Fork 630
SVN to Git hash
In debugging, we often find a need to dial way back in the code to the Subversion (SVN) days. The repo that houses this code is in firemodels/fds-smv_deprecated. But it is hard in Git to find the old SVN numbers. This page provides a trick for getting there.
Suppose you know the SVN number from running, say, version 6.1.2 of FDS and looking at the error file. It says, SVN 20564
. You can look this number up in a list tracked in the current FDS repo store here:
Utilities/Misc/GoogleCode_Commit_Log.txt
Note that this log file is large and so GitHub will not display it. You will need to clone the repo and look at the file locally. When you do you can find the following:
r20564 | mcgratta | 2014-09-26 15:27:10 -0400 (Fri, 26 Sep 2014) | FDS Source: Revert change in 20337 and fix ADJUST_BURN_RATE problem.
This line tells you the commit message used in SVN. Now you can use this message in a Git log grep command as follows:
[rmcdermo@burn fds-smv_deprecated]$ git log --grep="FDS Source: Revert change in 20337 and fix ADJUST_BURN_RATE problem."
commit 689afcd4c59504cc031b860fd081d935a2a3351f
Author: mcgratta <[email protected]>
Date: Fri Sep 26 19:27:10 2014 +0000
FDS Source: Revert change in 20337 and fix ADJUST_BURN_RATE problem.
This identifies the Git hash you want: 689afcd4c59504cc031b860fd081d935a2a3351f
. Take the first 7 characters of this string and do this:
git checkout 689afcd