Solving a problem with svn: Revision range is not allowed
Not a lot of background.
I often update the files for our project Bookmarks on pictures (picfor.me) and for this I used the svn export ... command, but the trouble is, if I need to upload only changes between revisions, then this is not so simple in the console:
- $ svnexport -r1123:1167 . /tmp/export_dir
- svn: Revision range is not allowed
Of course there are solutions if you use the TortoiseSVN client, here is an article from the Haber where it is described.
I came up with a solution for the console.
Here is a simple bash script that solves this problem in the console and, moreover, saves the folder structure:
- #!/bin/bash
- srev=1180
- erev=HEAD
- list=`svn log -vqr$srev:$erev |egrep '^\ +[M|A]' |uniq|awk '{print "." $2 " \ "};' `
- tar -cjf /tmp/export.tar.gz $list
srev and erev - specify revision numbers between which we want to get the export
list - this is a list of files that
export.tar.gz for export is a ready-made archive for copying to the server.
That's all. Perhaps there are other implementation methods. Share!