1PATCHVIEW(1)                       Man pages                      PATCHVIEW(1)
2
3
4

NAME

6       patchview - Without options, show numbered files modified by the patch.
7       With options, behave as filterdiff.
8

SYNOPSIS

10       patchview [[-n] | [--line-number]] [[-p n] | [--strip-match=n]]
11                 [--strip=n] [--addprefix=PREFIX] [[-s] | [--status]] [[-E] |
12                 [--empty-files-as-removed]] [[-i PATTERN] |
13                 [--include=PATTERN]] [[-x PATTERN] | [--exclude=PATTERN]]
14                 [[-z] | [--decompress]] [[-# RANGE] | [--hunks=RANGE]]
15                 [--lines=RANGE] [[-FRANGE] | [--files=RANGE]] [[-H] |
16                 [--with-filename]] [[-h] | [--no-filename]] [[-v] |
17                 [--verbose]...] [file...]
18
19       patchview {[--help] | [--version] | [--filter ...] | [--grep ...]}
20

DESCRIPTION

22       So what is patchview? It is a wrapper of filterdiff for use with
23       numbered files.
24
25           patchview
26
27       (without args) is equivalent to: lsdiff --number
28
29           patchview -F2-
30
31       (or with any other args) is equivalent to: filterdiff -F2- (or whatever
32       arguments are supplied)
33
34       There are two scripts for working with git (gitdiff and gitdiffview)
35       and two for svn (svndiff and svndiffview).
36
37           svndiff
38
39
40
41           gitdiff
42
43       (without args) will give the list of files modified
44
45           svndiff -F1
46
47
48
49           gitdiff -F1
50
51       will show the patch of file #1
52
53           svndiffview
54
55
56
57           gitdiffview
58
59       pipe all patches through filterdiff to vim - -R (in read-only mode,
60       easy to quit), showing complete patch with color.
61
62           svndiffview -F2
63
64
65
66           gitdiffview -F2
67
68       (or any other args) will pipe patch of file #2 to vim - -R
69

OPTIONS

71       -n, --line-number
72           Display the line number that each patch begins at. If verbose
73           output is requested (using -nv), each hunk of each patch is listed
74           as well.
75
76           For each file that is modified, a line is generated containing the
77           line number of the beginning of the patch, followed by a Tab
78           character, followed by the name of the file that is modified. If -v
79           is given once, following each of these lines will be one line for
80           each hunk, consisting of a Tab character, the line number that the
81           hunk begins at, another Tab character, the string “Hunk #”, and the
82           hunk number (starting at 1).
83
84           If the -v is given twice in conjunction with -n (i.e.  -nvv), the
85           format is slightly different: hunk-level descriptive text is shown
86           after each hunk number, and the --number-files option is enabled.
87
88       -N, --number-files
89           File numbers are listed, beginning at 1, before each filename.
90
91       -# RANGE, --hunks=RANGE
92           Only list hunks within the specified RANGE. Hunks are numbered from
93           1, and the range is a comma-separated list of numbers or
94           “first-last” spans, optionally preceded by a modifier 'x' which
95           inverts the entire range; either the first or the last in the span
96           may be omitted to indicate no limit in that direction.
97
98       --lines=RANGE
99           Only list hunks that contain lines from the original file that lie
100           within the specified RANGE. Lines are numbered from 1, and the
101           range is a comma-separated list of numbers or “first-last” spans,
102           optionally preceded by a modifier 'x' which inverts the entire
103           range; either the first or the last in the span may be omitted to
104           indicate no limit in that direction.
105
106       -F=RANGE, --files=RANGE
107           Only list files indicated by the specified RANGE. Files are
108           numbered from 1 in the order they appear in the patch input, and
109           the range is a comma-separated list of numbers or “first-last”
110           spans, optionally preceded by a modifier 'x' which inverts the
111           entire range; either the first or the last in the span may be
112           omitted to indicate no limit in that direction.
113
114       -p n, --strip-match=n
115           When matching, ignore the first n components of the pathname.
116
117       --strip=n
118           Remove the first n components of the pathname before displaying it.
119
120       --addprefix=PREFIX
121           Prefix the pathname with PREFIX before displaying it.
122
123       -s, --status
124           Show file additions, modifications and removals. A file addition is
125           indicated by a “+”, a removal by a “-”, and a modification by a
126           “!”.
127
128       -E, --empty-files-as-removed
129           Treat empty files as absent for the purpose of displaying file
130           additions, modifications and removals.
131
132       -i PATTERN, --include=PATTERN
133           Include only files matching PATTERN.
134
135       -x PATTERN, --exclude=PATTERN
136           Exclude files matching PATTERN.
137
138       -z, --decompress
139           Decompress files with extensions .gz and .bz2.
140
141       -H, --with-filename
142           Print the name of the patch file containing each patch.
143
144       -h, --no-filename
145           Suppress the name of the patch file containing each patch.
146
147       -v, --verbose
148           Verbose output.
149
150       --help
151           Display a short usage message.
152
153       --version
154           Display the version number of patchview.
155
156       --filter
157           Behave like filterdiff(1) instead.
158
159       --grep
160           Behave like grepdiff(1) instead.
161

SEE ALSO

163       lsdiff(1),filterdiff(1), grepdiff(1)
164

EXAMPLES

166       We can make the following one-line script with the name difftotrunk.sh,
167       to view the differences of two directories or svn repos (trunk and .)
168
169           diff ../trunk . -ru -x .svn | patchview "$@"
170
171           ./difftotrunk.sh , will show all different files and his number.
172
173
174
175           ./difftotrunk.sh -F3,4 , will show the differences of files #3 and #4 only.
176
177
178
179           ./difftotrunk.sh -F3 -#1 , will show only hunk #1 of file #3.
180
181
182
183           ./difftotrunk.sh -F3 -#x1 , will show the differences of files #3 without hunk #1 (x means that exclude).
184
185

AUTHOR

187       Tim Waugh <twaugh@redhat.com>
188           Package maintainer
189
190
191
192patchutils                        02 Jul 2020                     PATCHVIEW(1)
Impressum