subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Reedick <>
Subject RE: How to checkout only the changes
Date Mon, 27 Mar 2017 15:08:53 GMT
> From: [] 
> Sent: Friday, March 24, 2017 4:04 PM
> To:
> Subject: How to checkout only the changes
> Is there a way to export only the changes, that occured in a specific revision? Like
export or checkout only the added or modified files in their respective paths? Deletions and
cheap copies cannot be treated that way, obviously. Please CC as I am not subscribed.

FYI, 'svn copy' counts as an Add.  That may or may not be a concern?

Mostly Untested But Seems to Work in the Average Case(tm), so user beware:


# usage: 1234   http://svn_server/repo_name

svn log -qv -r $REV $SVNREPO 

# Yes we're grepping on XML because :laziness:
# And we're using perl because I can't be bothered with sed/awk subtleties 
svn log -qv --xml -r $REV "$SVNREPO" | perl -ne 'chomp; $a=1 if /^   action="[AD]"/; print
"$1\n" if ( $a && /^   kind="file">(.*)<\/path>/ ); $a=0 if /<\/path>/;'
| while read i
	D=./`dirname "$i"`
	mkdir -p "$D"
	svn export --force "$SVNREPO/$i@$REV" "$D/"

View raw message