Ver código fonte

Version bump up; document update

Matthew Wang 11 anos atrás
pai
commit
d7c1db8160
3 arquivos alterados com 21 adições e 19 exclusões
  1. 5
    0
      CHANGES
  2. 15
    18
      README.rst
  3. 1
    1
      cdiff.py

+ 5
- 0
CHANGES Ver arquivo

2
 Change log
2
 Change log
3
 ==========
3
 ==========
4
 
4
 
5
+Version 0.5 (2013-02-18)
6
+
7
+  - Support read output from ``svn diff --log`` and ``hg log -p``
8
+  - Streamline reading large patch set
9
+
5
 Version 0.4 (2013-02-16)
10
 Version 0.4 (2013-02-16)
6
 
11
 
7
   - New option *-c WHEN* (*--color WHEN*) to support auto test
12
   - New option *-c WHEN* (*--color WHEN*) to support auto test

+ 15
- 18
README.rst Ver arquivo

45
 Download directly
45
 Download directly
46
 ~~~~~~~~~~~~~~~~~
46
 ~~~~~~~~~~~~~~~~~
47
 
47
 
48
-Both ``pip`` and ``setup.py`` installs cdiff to system wide directory, if you
49
-want a minimal tool without the boring external dependencies (like me), just
50
-save `cdiff.py <https://raw.github.com/ymattw/cdiff/master/cdiff.py>`_ to
48
+Just save `cdiff.py <https://raw.github.com/ymattw/cdiff/master/cdiff.py>`_ to
51
 whatever directory which is in your ``$PATH``, for example, ``$HOME/bin`` is in
49
 whatever directory which is in your ``$PATH``, for example, ``$HOME/bin`` is in
52
 my ``$PATH``, so I save the script there and name as ``cdiff``.
50
 my ``$PATH``, so I save the script there and name as ``cdiff``.
53
 
51
 
59
 Usage
57
 Usage
60
 -----
58
 -----
61
 
59
 
62
-Cdiff reads diff from diff (patch) file if given, or stdin if redirected, or
63
-diff produced by revision tool if in a git/svn/hg workspace.  Use option ``-s``
64
-to enable side by side view, and option ``-w N`` to set a text width other than
65
-default ``80``.  See examples below.
60
+Show usage:
66
 
61
 
67
-Show usage::
62
+.. code:: sh
68
 
63
 
69
     cdiff -h
64
     cdiff -h
70
 
65
 
71
-Read diff from local modification in a svn, git, or hg workspace:
66
+Read diff from local modification in a *svn*, *git*, or *hg* workspace:
72
 
67
 
73
 .. code:: sh
68
 .. code:: sh
74
 
69
 
75
     cd proj-workspace
70
     cd proj-workspace
76
-    cdiff                   # view colored incremental udiff
77
-    cdiff -s                # view side by side
78
-    cdiff -s -w 90          # use text width 90 other than default 80
71
+    cdiff                       # view colored incremental udiff
72
+    cdiff -s                    # view side by side
73
+    cdiff -s -w 90              # use text width 90 other than default 80
79
 
74
 
80
 Pipe in a diff:
75
 Pipe in a diff:
81
 
76
 
93
     cdiff foo.patch -s
88
     cdiff foo.patch -s
94
     cdiff foo.patch -s -w 90
89
     cdiff foo.patch -s -w 90
95
 
90
 
96
-View diff between two files (wrapper of ``diff``)::
91
+View diff between two files (wrapper of ``diff``):
92
+
93
+.. code:: sh
97
 
94
 
98
-    cdiff foo foo.new       # equivalent to diff -u foo foo.new | cdiff
95
+    cdiff foo foo.new           # equivalent to diff -u foo foo.new | cdiff
99
     cdiff foo foo.new -s
96
     cdiff foo foo.new -s
100
 
97
 
101
 Redirect output to another patch file is safe:
98
 Redirect output to another patch file is safe:
112
 - Only takes unified diff for input
109
 - Only takes unified diff for input
113
 - Side by side mode has alignment problem for wide chars
110
 - Side by side mode has alignment problem for wide chars
114
 
111
 
115
-Pull request is very welcome, make sure run ``make test`` to verify.  Single
116
-commit in pull request would make it easier for review, for example to collapse
117
-last 3 commits into 1 before *push*, use ``git rebase -i HEAD~3``, *pick* the
118
-first and *squash* the other two.
112
+Pull request is very welcome, make sure run ``make test`` and ``make test3`` to
113
+verify.  Single commit in pull request would make it easier for review, for
114
+example to collapse last 3 commits into 1 before *push*, use ``git rebase -i
115
+HEAD~3``, *pick* the first and *squash* the other two.
119
 
116
 
120
 See also
117
 See also
121
 --------
118
 --------

+ 1
- 1
cdiff.py Ver arquivo

8
 """
8
 """
9
 
9
 
10
 META_INFO = {
10
 META_INFO = {
11
-    'version'     : '0.4',
11
+    'version'     : '0.5',
12
     'license'     : 'BSD-3',
12
     'license'     : 'BSD-3',
13
     'author'      : 'Matthew Wang',
13
     'author'      : 'Matthew Wang',
14
     'email'       : 'mattwyl(@)gmail(.)com',
14
     'email'       : 'mattwyl(@)gmail(.)com',