pcb-rnd knowledge pool


How to safely check out an old revision of pcb-rnd

svn_to_old by Tibor 'Igor2' Palinkas on 2017-12-28

Tags: howto, svn, revision, old, back, update, checkout

node source



Abstract: A simple svn up -r5000 will not result in a compilable rev 5000 in the local working copy, because of all the svn externals under trunk/src_3rd/. This mini-howto explains the reasons and the solution.

  Based on the mailing list archives.

The svn externs are "3rd party" software from different places with different history. When checking out trunk/ to an old revision, one needs to have the externals checked out at the same old state as the main repo is checked out. Because of the externs are different project with different history, revision numbers are independent. What needs to be done is everything checked out at the same date.

We have a script that checks out everything, including the externals, at a specific trunk revision. It's called trunk/util/bisecter/bisecter ; usage:

cd trunk/util/bisecter
./bisecter checkout 4000

(You will need to create a config file, bisecter will guide you.)

The script can also compile and cache compiled binaries in compressed form which are then easy and fast to get from the cache. For example it is useful to build snapshots of every 500th revision. When doing a bisecting, this means only the last ~512 (2^9) revisions need to be compiled, which means 9 compilations. In other words the first few tests of a bisecting can be done from cache, with approximate revisions. Or to put it yet another way, the 5 high bits of the search space are covered by the cache so the first 5 tries are for free.