clone 602236 -1 retitle -1 support for specifying patch filenames thanks On Tue, Nov 02, 2010 at 10:40:10PM +0100, Bernhard R. Link wrote: > * Niko Tyni <nt...@debian.org> [101102 22:36]:
> > In that case I suppose this becomes two wishlist items: > > > > - support for importing .dsc files with subdirectories in debian/patches > > This one definitly makes sense. > > > - support for specifying the filename of each patch (perhaps with a > > special header in the commit information?) > > I guess this is possible, too. (Though I cannot yet access how > complicated). OK, thanks. Cloning. FWIW the attached quick patch seems to work for me for the first issue. -- Niko Tyni nt...@debian.org
>From 32c5603d2c63f71904e8c4c9169a09ceaa7cf768 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Wed, 3 Nov 2010 09:22:52 +0200 Subject: [PATCH] Support subdirectories in debian/patches Don't die when the patch filename contains a slash, create a debian/patches subdirectory instead. --- git-dpm.sh | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/git-dpm.sh b/git-dpm.sh index 478795e..6f40246 100755 --- a/git-dpm.sh +++ b/git-dpm.sh @@ -1962,8 +1962,9 @@ function apply_patches() { num_lines=0 while read filename option options ; do if [ x"$filename" != x"${filename##*/}" ] ; then - printerror "patch filename contains slash!" - return 1 + dirname=$(dirname "$filename") + [ -d "$dirname" ] || mkdir --parents "$dirname" || return 1 + [ -d "$gitdir/dpm/import/$dirname" ] || mkdir "$gitdir/dpm/import/$dirname" || return 1 fi case "$filename" in ''|'#'*) -- 1.7.2.3