Bug#481237: View current patch

2011-08-14 Thread Gergely Nagy
tags 481237 + pending
thanks

I opted to make this possible a bit differently: instead of a separate
dpatch-edit-patch-diff or similar command (althouth debian-diff could've
worked with some PATH munglig), dpatch-edit-patch now exports two
environment variables to the subshell:

DPEP_SHELL_REFDIR and DPEP_SHELL_WORKDIR. The former is the full path to
the reference directory, the latter is the full path to the working
directory.

One can then use diff -Nur $DPEP_SHELL_REFDIR $DPEP_SHELL_WORKDIR to see
the current changes without exiting the subshell.

This will be documented on the dpatch-edit-patch manual page aswell, and
will be part of the next dpatch upload.

-- 
|8]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#481237: View current patch

2008-05-14 Thread Joey Schulze
Package: dpatch
Version: 2.0.29
Severity: wishlist
Tags: patch

Hi,

it would be nice if I could see the patch I'm currently working on
in an dpatch-edit-patch session.  Maybe I haven't understood the
documentation or such a command is currently missing.  It would help
me prepare clean patches.

If it's missing indeed attached is a very simple variant which is
sufficient for basic needs.  It does not support different workdir
and reference dir names, though, but dpatch doesn't seem to cope
with them anyway.

Thanks for considering its inclusion ,

Joey

-- 
Every use of Linux is a proper use of Linux.  -- Jon 'maddog' Hall

Please always Cc to me when replying to me on the lists.
#! /bin/sh

# Copyright (c) 2008  Joey Schulze [EMAIL PROTECTED]
#
# 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, see http://www.gnu.org/licenses/.

dir=`pwd`

if ! expr match ${dir} '^/tmp/dpep-work\.b[0-9]*/'  /dev/null
then
echo No apparent dpatch working directory
exit 1
fi

id=$(expr match ${dir} '^/tmp/dpep-work\.b\([0-9]*\)/')
pkg=$(expr match ${dir} '^/tmp/dpep-work\.b[0-9]*/\(.*\)')

id=$[id +1]

ref=/tmp/dpep-ref.w${id}/${pkg}

if [ ! -d ${ref} ]
then
echo Reference directory does not exist.
exit 1
fi

diff -Nur  $ref $dir