how to use svndumpfilter to exclude a certain revision

10,233

svndumpfilter tool uses the stdin as input and filters only on certain paths, so you cannot exclude a specific revision. However you can try to dump your repository from rev 0 to rev. 22 and continue from rev 24 to HEAD, however, this will work only if no file changed in rev 23 is changed after rev 23 again.

Here a small script:

svnadmin dump my -r0:22 code > /path/to/dumpfile_1.dmp
svnadmin dump --incremental -r24:HEAD code > /path/to/dumpfile_2.dmp

If you want to create a new repository out of dumpfiles:

svnadmin create code_correct
svnadmin load code_correct <  /path/to/dumpfile_1.dmp 
svnadmin load code_correct <  /path/to/dumpfile_2.dmp
Share:
10,233

Related videos on Youtube

Nate Glenn
Author by

Nate Glenn

Language processing engineer interested in cognitive modeling, multi-lingual computing, and NLP for language learning.

Updated on June 04, 2022

Comments

  • Nate Glenn
    Nate Glenn almost 2 years

    I have an SVN repository with a bad revision or two. I need to get rid of them! I was planning on using the svndumpfilter tool, which has an exclude command. However, I cannot figure out how to use it to exclude a revision. Everytime I use it, I end up with a Malformed dumpfile header error. See the command below; I want to exclude revision 23, and code is the directory containing the repository.

    >svndumpfilter exclude 23 code
    Excluding prefixes:
       '/23'
       '/code'
    
    SVN-fs-dump-format-version: 2
    
    <waits for me to type something and press enter>
    
    'vndumpfilter: E140001: Malformed dumpfile header '
    
    • Peter Parker
      Peter Parker almost 12 years
      can you give us the exact commands you are using ?
  • ITL
    ITL over 9 years
    I'm forced to exclude a revision because its MD5 hash is corrupted. I'm not able to dump or svnsync. I've found a few mailings when searching the internet describing a method for fixing this (like: [this](entropyfarm.org/things/svn-checksum-mismatch-recovery ), but they are not applicable for my installation as the file structure is different. ( I don't have folder structure like repos-name/db/revs/ in 1.7.9 svn) Do you have an alternative for that scenario?