* [announce] 'patchview' ver. 003
@ 2005-07-21 20:30 randy_dunlap
2005-07-22 2:26 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: randy_dunlap @ 2005-07-21 20:30 UTC (permalink / raw)
To: lkml; +Cc: njw
Hi,
[version 003]
'patchview' merges a patch file and a source tree to a set of
temporary modified files. This enables better patch (re)viewing
and more viewable context. (hopefully)
The patchview script is here:
http://www.xenotime.net/linux/scripts/patchview
usage: patchview [-f] patchfile srctree {ver. 003}
-f : force tkdiff even if 'patch' has errors
-s : single tkdiff even if patchfile contains multiple files
It uses (requires) lsdiff (from patchutils) and tkdiff.
patchutils: http://cyberelk.net/tim/patchutils/
tkdiff: http://sourceforge.net/projects/tkdiff/
---
~Randy
Changes for ver. 003:
- handle patch making empty .orig files (for new files)
with permission of 000
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [announce] 'patchview' ver. 003
2005-07-21 20:30 [announce] 'patchview' ver. 003 randy_dunlap
@ 2005-07-22 2:26 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2005-07-22 2:26 UTC (permalink / raw)
To: randy_dunlap; +Cc: lkml, njw
randy_dunlap wrote:
> Hi,
>
> [version 003]
>
> 'patchview' merges a patch file and a source tree to a set of
> temporary modified files. This enables better patch (re)viewing
> and more viewable context. (hopefully)
>
>
> The patchview script is here:
> http://www.xenotime.net/linux/scripts/patchview
>
>
> usage: patchview [-f] patchfile srctree {ver. 003}
> -f : force tkdiff even if 'patch' has errors
> -s : single tkdiff even if patchfile contains multiple files
>
>
> It uses (requires) lsdiff (from patchutils) and tkdiff.
>
> patchutils: http://cyberelk.net/tim/patchutils/
> tkdiff: http://sourceforge.net/projects/tkdiff/
>
> ---
> ~Randy
>
>
> Changes for ver. 003:
> - handle patch making empty .orig files (for new files)
> with permission of 000
Hi, Randy.
Here's a small modification to make it work with mtkdiff (my hacked
version of tkdiff which supports multiple files). mtkdiff+patchview
tarball is available at the following url.
http://home-tj.org/mtkdiff/files/patchview-mtkdiff.tar.gz
--- patchview.orig 2005-07-22 11:19:26.000000000 +0900
+++ patchview/patchview 2005-07-22 11:21:01.000000000 +0900
@@ -5,7 +5,7 @@
# uses patchutils (lsdiff) and tkdiff
PROG=patchview
-VERSION=003
+VERSION=004
# usage: help message and exit
function usage()
@@ -40,7 +40,12 @@
force=0
single=0
+mtkdiff=0
VIEWER="tkdiff"
+if [ -x "`which mtkdiff`" ]; then
+ VIEWER="mtkdiff"
+ mtkdiff=1
+fi
# or maybe "sh -c colordiff" would work
while [ -n "$1" ]
@@ -117,15 +122,29 @@
exit 1
fi
-for pf in $pfiles ; do
- $VIEWER $WORKDIR/$pf.orig $WORKDIR/$pf &
- if [ ${single} -eq 1 ]; then
- wait # for viewer to exit
- fi
-done
+if [ $mtkdiff -ne 0 ]; then
+ i=0
+ argv[i++]="-gdesc"
+ argv[i++]=`diffstat $patchfile`
+ for pf in $pfiles ; do
+ argv[i++]="-fname"
+ argv[i++]="$pf"
+ argv[i++]="$WORKDIR/$pf.orig"
+ argv[i++]="$WORKDIR/$pf"
+ done
-if [ ${single} -eq 0 ]; then
- wait # for all viewers to exit
+ mtkdiff "${argv[@]}"
+else
+ for pf in $pfiles ; do
+ $VIEWER $WORKDIR/$pf.orig $WORKDIR/$pf &
+ if [ ${single} -eq 1 ]; then
+ wait # for viewer to exit
+ fi
+ done
+
+ if [ ${single} -eq 0 ]; then
+ wait # for all viewers to exit
+ fi
fi
rm -rf $WORKDIR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-22 2:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 20:30 [announce] 'patchview' ver. 003 randy_dunlap
2005-07-22 2:26 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox