Changeset 865 in tailor
- Timestamp:
- 10/02/05 23:20:50 (8 years ago)
- Hash name:
- 20051002212050-97f81-4a825b665bae966f0bd94786081f61137ee14299
- Location:
- vcpx
- Files:
-
- 2 edited
-
cvs.py (modified) (2 diffs)
-
tests/cvs.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/cvs.py
r854 r865 123 123 key = (timestamp, author, changelog) 124 124 if self.changesets.has_key(key): 125 return self.changesets[key].addEntry(entry, revision) 125 cs = self.changesets[key] 126 for e in cs.entries: 127 if e.name == entry: 128 return e 129 return cs.addEntry(entry, revision) 126 130 else: 127 131 cs = Changeset(_getGlobalCVSRevision(timestamp, author), … … 281 285 282 286 if previous and last.action_kind == last.DELETED: 283 previous.action_kind = previous.ADDED 287 # For unknown reasons, sometimes there are two dead 288 # revision is a row. 289 if previous.action_kind <> last.DELETED: 290 previous.action_kind = previous.ADDED 284 291 285 292 previous = last -
vcpx/tests/cvs.py
r781 r865 929 929 self.assertRaises(UnicodeEncodeError, log.encode, 'ascii') 930 930 self.assertEqual(len(log.encode('ascii', 'ignore')), 41) 931 932 DOUBLE_DEAD_TEST = """\ 933 cvs rlog: Logging composestar/temp/ComposestarVSAddin/ComposestarVSAddin 934 935 RCS file: /cvsroot/composestar/composestar/temp/ComposestarVSAddin/Attic/Ini.cs,v 936 head: 1.3 937 branch: 938 locks: strict 939 access list: 940 keyword substitution: kv 941 total revisions: 3; selected revisions: 3 942 description: 943 ---------------------------- 944 revision 1.3 945 date: 2004/07/15 08:28:02; author: sverre_boschman; state: dead; lines: +0 -0 946 *** empty log message *** 947 ---------------------------- 948 revision 1.2 949 date: 2004/07/15 08:28:02; author: sverre_boschman; state: dead; lines: +0 -0 950 *** empty log message *** 951 ---------------------------- 952 revision 1.1 953 date: 2004/07/14 15:39:55; author: sverre_boschman; state: Exp; 954 Backup 955 ============================================================================= 956 """ 957 958 def testDoubleDead(self): 959 """Verify the parser collapse multiple deletions on a single entry""" 960 961 log = StringIO(self.DOUBLE_DEAD_TEST) 962 csets = changesets_from_cvslog(log, 'composestar') 963 964 self.assertEqual(len(csets), 2) 965 966 cset = csets[0] 967 self.assertEqual(len(cset.entries), 1) 968 entry = cset.entries[0] 969 self.assertEqual(entry.name, 'temp/ComposestarVSAddin/ComposestarVSAddin/Ini.cs') 970 self.assertEqual(entry.new_revision, '1.1') 971 self.assertEqual(entry.action_kind, entry.ADDED) 972 973 cset = csets[1] 974 self.assertEqual(len(cset.entries), 1) 975 entry = cset.entries[0] 976 self.assertEqual(entry.name, 'temp/ComposestarVSAddin/ComposestarVSAddin/Ini.cs') 977 self.assertEqual(entry.new_revision, '1.3') 978 self.assertEqual(entry.action_kind, entry.DELETED) 979
Note: See TracChangeset
for help on using the changeset viewer.
