Skip to content

How to checkout private SVN revisions of TFS

Daniel Speichert edited this page Apr 29, 2020 · 3 revisions

Example: If want to check out revision 3777:

  1. Clone this repository: git clone https://github.com/otland/tfs-old-svn.git
  2. Enter the directory: cd tfs
  3. Reset to the commit you want: git reset --hard `git log --grep="trunk@3780" --oneline | cut -f 1 -d ' '

(replace 3780 with the revision you want)

List authors:

git log HEAD --format="%aN <%aE>" --reverse | perl -e 'my %dedupe; while (<STDIN>) { print unless $dedupe{$_}++}'

Find commit by svn revision:

git log --oneline --grep="trunk@5964"

Checkout commit by svn revision:

git reset --hard `git log --grep="trunk@3780" --oneline | cut -f 1 -d ' '`

Fixing compilation issues

sed -i 's/it->leaf()/it->path().filename().string()/g' *.cpp
sed -i 's/#define BOOST_FILESYSTEM_VERSION 2/#define BOOST_FILESYSTEM_VERSION 3/g' definitions.h
sed -i 's/  -lxml2$/ -lxml2 -lpthread/' Makefile