Преглед изворни кода

Document update and clean up for v0.6

Matthew Wang пре 11 година
родитељ
комит
4835304ffa
4 измењених фајлова са 11 додато и 11 уклоњено
  1. 6
    0
      CHANGES
  2. 1
    1
      README.rst
  3. 1
    1
      cdiff.py
  4. 3
    9
      tests/test_cdiff.py

+ 6
- 0
CHANGES Прегледај датотеку

2
 Change log
2
 Change log
3
 ==========
3
 ==========
4
 
4
 
5
+Version 0.6 (2013-02-20)
6
+
7
+  - A few performance tuning and code clean up
8
+  - Add unit test cases with coverage report
9
+  - Show merge history in svn log
10
+
5
 Version 0.5.1 (2013-02-19)
11
 Version 0.5.1 (2013-02-19)
6
 
12
 
7
   - Fixed incorrect yield on diff missing eof
13
   - Fixed incorrect yield on diff missing eof

+ 1
- 1
README.rst Прегледај датотеку

117
   2.4.3, maybe you can fix it)
117
   2.4.3, maybe you can fix it)
118
 - Only takes unified diff for input
118
 - Only takes unified diff for input
119
 - Side by side mode has alignment problem for wide chars
119
 - Side by side mode has alignment problem for wide chars
120
-- Pull requests are very welcome (please run ``make test test3`` to verify)
120
+- Pull requests are very welcome (please run ``make test`` to verify)
121
 
121
 
122
 See also
122
 See also
123
 --------
123
 --------

+ 1
- 1
cdiff.py Прегледај датотеку

8
 """
8
 """
9
 
9
 
10
 META_INFO = {
10
 META_INFO = {
11
-    'version'     : '0.5.1',
11
+    'version'     : '0.6',
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',

+ 3
- 9
tests/test_cdiff.py Прегледај датотеку

49
 
49
 
50
     def test_read_stream_header(self):
50
     def test_read_stream_header(self):
51
         stream = cdiff.PatchStream(Sequential([]))
51
         stream = cdiff.PatchStream(Sequential([]))
52
-        self.assertEqual(
53
-                stream.read_stream_header(1),
54
-                [])
52
+        self.assertEqual(stream.read_stream_header(1), [])
55
 
53
 
56
         items = ['hello', 'world', 'again']
54
         items = ['hello', 'world', 'again']
57
 
55
 
79
         hunk.append(('-', 'foo\n'))
77
         hunk.append(('-', 'foo\n'))
80
         hunk.append(('+', 'bar\n'))
78
         hunk.append(('+', 'bar\n'))
81
         hunk.append((' ', 'common\n'))
79
         hunk.append((' ', 'common\n'))
82
-        self.assertEqual(
83
-                hunk._get_old_text(),
84
-                ['foo\n', 'common\n'])
80
+        self.assertEqual(hunk._get_old_text(), ['foo\n', 'common\n'])
85
 
81
 
86
     def test_get_new_text(self):
82
     def test_get_new_text(self):
87
         hunk = cdiff.Hunk([], '@@ -1,2 +1,2 @@', (1,2), (1,2))
83
         hunk = cdiff.Hunk([], '@@ -1,2 +1,2 @@', (1,2), (1,2))
88
         hunk.append(('-', 'foo\n'))
84
         hunk.append(('-', 'foo\n'))
89
         hunk.append(('+', 'bar\n'))
85
         hunk.append(('+', 'bar\n'))
90
         hunk.append((' ', 'common\n'))
86
         hunk.append((' ', 'common\n'))
91
-        self.assertEqual(
92
-                hunk._get_new_text(),
93
-                ['bar\n', 'common\n'])
87
+        self.assertEqual(hunk._get_new_text(), ['bar\n', 'common\n'])
94
 
88
 
95
 
89
 
96
 class TestDiff(unittest.TestCase):
90
 class TestDiff(unittest.TestCase):