Last active
March 10, 2022 05:45
-
-
Save WorksOnMyBox/746131cdb0d4dbb17c461f6e7e684ced to your computer and use it in GitHub Desktop.
Read a git svn .rev_map file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileStream fs = new FileStream(@".rev_map.a7f757b4-5dc9-1e4e-bcaa-e126dea94035", FileMode.Open); | |
BinaryReader br = new BinaryReader(fs); | |
while (br.BaseStream.Position < br.BaseStream.Length) | |
{ | |
byte[] bRevision = br.ReadBytes(4); | |
Array.Reverse(bRevision); | |
int revision = BitConverter.ToInt32(bRevision, 0); | |
byte[] bHash = br.ReadBytes(20); | |
string hash = BitConverter.ToString(bHash).Replace("-", "").ToLower(); | |
Console.WriteLine(revision.ToString() + " : " + hash); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment