2

So I found a file inside .svn folder which has filename like this.

.svn/pristine/fa/faa0544abc11c14647e18c2ee1283b445a1fa1e1.svn-base

Now by looking at contents of this file I want to figure out which filename it had in SVN tree. It has been deleted now from tree. So how do I reverse look up this file in history?

ckain
  • 383
  • 5
  • 13

1 Answers1

2

In the .svn folder of your repository you will find a file wc.db. This is a sqlite db.

The filename in the pristine folder is actually its sha1 checksum.

So you can try something like this:

SELECT local_relpath  FROM `NODES` WHERE checksum=`$sha1$faa0544abc11c14647e18c2ee1283b445a1fa1e1`

or

SELECT repos_path FROM `NODES` WHERE checksum=`$sha1$faa0544abc11c14647e18c2ee1283b445a1fa1e1`
mellow
  • 253
  • 1
  • 7
  • Yes, thanks! This exactly does it. Format of DB is SQlite3 (at least for SVN version 1.8.1) – ckain Apr 14 '14 at 11:09
  • This does not return a path for me. `NODES` only has 27 entries while there are and certainly have been more files in this repo than that. I'm unable to find another table in wc.db that contains the checksum I'm looking for. – Bram Sep 30 '19 at 13:48