|
@@ -64,22 +64,14 @@ Show usage::
|
64
|
64
|
|
65
|
65
|
cdiff -h
|
66
|
66
|
|
67
|
|
-View a diff (patch) file:
|
68
|
|
-
|
69
|
|
-.. code:: sh
|
70
|
|
-
|
71
|
|
- cdiff foo.patch # view colored incremental udiff
|
72
|
|
- cdiff foo.patch -s # view side by side
|
73
|
|
- cdiff foo.patch -s -w 90 # use text width 90 other than default 80
|
74
|
|
-
|
75
|
67
|
Read diff from local modification in a svn, git, or hg workspace:
|
76
|
68
|
|
77
|
69
|
.. code:: sh
|
78
|
70
|
|
79
|
71
|
cd proj-workspace
|
80
|
|
- cdiff
|
81
|
|
- cdiff -s
|
82
|
|
- cdiff -s -w 90
|
|
72
|
+ cdiff # view colored incremental udiff
|
|
73
|
+ cdiff -s # view side by side
|
|
74
|
+ cdiff -s -w 90 # use text width 90 other than default 80
|
83
|
75
|
|
84
|
76
|
Pipe in a diff:
|
85
|
77
|
|
|
@@ -90,18 +82,35 @@ Pipe in a diff:
|
90
|
82
|
svn diff -r PREV | cdiff -s
|
91
|
83
|
diff -u foo foo.new | cdiff -s
|
92
|
84
|
|
|
85
|
+View a diff (patch) file:
|
|
86
|
+
|
|
87
|
+.. code:: sh
|
|
88
|
+
|
|
89
|
+ cdiff foo.patch
|
|
90
|
+ cdiff foo.patch -s
|
|
91
|
+ cdiff foo.patch -s -w 90
|
|
92
|
+
|
93
|
93
|
Redirect output to another patch file is safe:
|
94
|
94
|
|
95
|
95
|
.. code:: sh
|
96
|
96
|
|
97
|
97
|
svn diff | cdiff -s > my.patch
|
98
|
98
|
|
99
|
|
-Known issue
|
100
|
|
------------
|
|
99
|
+Notes
|
|
100
|
+-----
|
101
|
101
|
|
102
|
|
-- Only support unified diff for input format
|
|
102
|
+- Works with python >= 2.5.0 (subprocess.Popen seems not working with PIPE in
|
|
103
|
+ 2.4.3, maybe you can fix it)
|
|
104
|
+- Only takes unified diff for input
|
103
|
105
|
- Side by side mode has alignment problem for wide chars
|
104
|
106
|
|
|
107
|
+Pull request is very welcome, make sure run ``make test`` to verify. It only
|
|
108
|
+has minimal verification today and that depends on human eyes too (`issue #7
|
|
109
|
+<https://github.com/ymattw/cdiff/issues/7>`_). Single commit in pull request
|
|
110
|
+would make it easier for review, for example to collapse last 3 commits into 1
|
|
111
|
+before *push*, use ``git rebase -i HEAD~3``, *pick* the first and *squash* the
|
|
112
|
+other two.
|
|
113
|
+
|
105
|
114
|
See also
|
106
|
115
|
--------
|
107
|
116
|
|