After getting annoyed at the slowness of svn_load_dirs dealing with
large kernel trees, and the general cumbersomeness of applying
patches, I wrote svnpatch. It's a simple Python script that is a
wrapper around patch. It will run patch, detect what has been added
or removed, and execute appropriate svn add / svn rm commands.

You run it like this, from your working directory:

bzcat ~/kernel/patch-2.4.20.bz2 | svnpatch -p1

The -p1 (and any other arguments) get paseed to patch.

Feel free to include it in Subversion. You can get it from the file
svnpatch in the Subversion repository at
http://svn.complete.org/misc/svnpatch/head. I'm also attaching a copy
below. While it is written in Python, it does not require the
Subversion python libraries.

-- John

#!/usr/bin/env python2.2

# COPYRIGHT #
# Copyright (C) 2003 John Goerzen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# END OF COPYRIGHT #