Debian Codegraph @

patchview/README.patchview

raw
1 So what is patchview? It is a wrapper of filterdiff for use with numbered files.
2
3 $ patchview
4
5 Without args is equivalent to: lsdiff --number
6
7 $ patchview -F2-
8
9
10 With one or more args is equivalent to: filterdiff args
11
12 There are 4 scripts for working with git repos (gitdiff, gitdiffview, gitshow and gitshowview) and 2 for svn (svndiff and svndiffview).
13 Also these scripts have option -v which shows the full command that is which is being executed.
14
15
16 $ svndiff
17 $ gitdiff
18
19 Without args, will give the list of files modified
20 With args will show the patches according the args, for example, `gitdiff -F1` will show the patch for first file
21
22 $ svndiffview
23 $ gitdiffview
24
25 Without args will pipe all patches through filterdiff to `vim - -R` (in read-only mode, easy to quit), showing complete patch with colors.
26 With args will pipe the patches according the args, for example, `gitsvnview -F2` will pipe the patch for second file to `vim - -R`.
27
28 $ gitshow
29 $ gitshowview
30
31 Is the same of gitdiff but use `git show` instead of `git diff`.
32
33 Example:
34 We can make the following one-line script with the name difftotrunk.sh, to view the differences of two directories or svn repos (trunk and .)
35
36 diff ../trunk . -ru -x .svn | patchview "$@"
37
38 $ ./difftotrunk.sh , will show all different files and his number.
39 $ ./difftotrunk.sh -F3,4 , will show the differences of files #3 and #4 only.
40 $ ./difftotrunk.sh -F3 -#1, will show only hunk #1 of file #3.
41 $ ./difftotrunk.sh -F3 -#x1, will show the differences of files #3 without hunk #1 (x means that exclude).
42