Changeset 781 in tailor
- Timestamp:
- 09/07/05 19:02:24 (8 years ago)
- Hash name:
- 20050907170224-7a6fb-949b72e3c6d9df658a5013ce0c33131759050a04
- Location:
- vcpx
- Files:
-
- 3 edited
-
cvs.py (modified) (2 diffs)
-
tests/cvs.py (modified) (14 diffs)
-
tests/tailor.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/cvs.py
r777 r781 299 299 from os.path import join, exists 300 300 from datetime import timedelta 301 302 from codecs import getreader 301 303 302 304 branch = '' … … 349 351 "%s returned status %d" % (str(cvslog), cvslog.exit_status)) 350 352 353 reader = getreader(self.repository.encoding) 354 log = reader(log) 351 355 return changesets_from_cvslog(log, self.repository.module) 352 356 -
vcpx/tests/cvs.py
r721 r781 44 44 """Ensure the cvs log parser does its job.""" 45 45 46 SIMPLE_TEST = """\46 SIMPLE_TEST = u"""\ 47 47 cvs rlog: Logging docutils 48 48 … … 94 94 self.assertEqual(entry.action_kind, entry.UPDATED) 95 95 96 DOUBLE_TEST = """\96 DOUBLE_TEST = u"""\ 97 97 cvs rlog: Logging docutils/docutils 98 98 … … 188 188 self.assertEqual(cset.date, datetime(2004, 6, 20, 16, 3, 17)) 189 189 190 DELETED_TEST = """\190 DELETED_TEST = u"""\ 191 191 cvs rlog: Logging docutils 192 192 … … 228 228 self.assertEqual(entry.action_kind, entry.DELETED) 229 229 230 COLLAPSE_TEST = """\230 COLLAPSE_TEST = u"""\ 231 231 cvs rlog: Logging PyObjC/Doc 232 232 … … 312 312 self.assertEqual(cset.date, datetime(1996, 10, 18, 13, 48, 45)) 313 313 314 BRANCHES_TEST = """\314 BRANCHES_TEST = u"""\ 315 315 cvs rlog: Logging Archetypes/tests 316 316 … … 350 350 self.assertEqual(cset.log,"Fixed deepcopy problem in validations") 351 351 352 REPOSPATH_TEST = """\352 REPOSPATH_TEST = u"""\ 353 353 cvs rlog: Logging Zope/spurious/dummy/dir 354 354 cvs rlog: Logging Zope/lib/python/DateTime … … 384 384 self.assertEqual(entry.name, 'lib/python/DateTime/DateTime.py') 385 385 386 LONGLOG_TEST = """\386 LONGLOG_TEST = u"""\ 387 387 cvs rlog: Logging ATContentTypes 388 388 … … 680 680 self.assertEqual(entry.action_kind, entry.UPDATED) 681 681 682 SILLY_TEST = """\682 SILLY_TEST = u"""\ 683 683 RCS file: /cvsroot/docutils/docutils/THANKS.txt,v 684 684 head: 1.2 … … 692 692 changesets_from_cvslog, log, 'docutils') 693 693 694 CREATED_IN_BRANCH_TEST = """\694 CREATED_IN_BRANCH_TEST = u"""\ 695 695 cvs rlog: Logging dsssl-utils/bigdiesel/src 696 696 … … 723 723 self.assertEqual(len(csets), 1) 724 724 725 DESCRIPTION_TEST = """\725 DESCRIPTION_TEST = u"""\ 726 726 cvs rlog: Logging Zope 727 727 … … 756 756 csets = changesets_from_cvslog(log, 'zope') 757 757 758 ADD_DEL_ADD_AGAIN_TEST = """\758 ADD_DEL_ADD_AGAIN_TEST = u"""\ 759 759 cvs rlog: Logging test 760 760 … … 820 820 self.assertEqual(entry.action_kind, entry.ADDED) 821 821 822 MULTI_MODULE_TEST = """\822 MULTI_MODULE_TEST = u"""\ 823 823 cvs rlog: Logging apache-1.3/src/test/vhtest/logs 824 824 … … 867 867 csets = changesets_from_cvslog(log, 'apache-1.3') 868 868 869 ENTRY_NAMES_TEST = """869 ENTRY_NAMES_TEST = u""" 870 870 cvs rlog: Logging Products/PluggableAuthService 871 871 … … 894 894 entry = cset.entries[0] 895 895 self.assertEqual(entry.name, 'COPYRIGHT.txt') 896 897 ENCODING_TEST = u""" 898 cvs rlog: Logging pxlib/src 899 900 RCS file: /cvsroot/pxlib/pxlib/src/px_head.h,v 901 head: 1.8 902 branch: 903 locks: strict 904 access list: 905 keyword substitution: kv 906 total revisions: 9; selected revisions: 2 907 description: 908 ---------------------------- 909 revision 1.8 910 date: 2005/08/17 16:07:40; author: steinm; state: Exp; lines: +1 -0 911 - added prototype for px_delete_data_from_block() 912 ---------------------------- 913 revision 1.7 914 date: 2005/08/17 05:16:24; author: steinm; state: Exp; lines: +1 -1 915 new prototype for px_add_data_to_block() 916 ============================================================================= 917 """ 918 def testUnicode(self): 919 """Verify cvs parser returns unicode strings""" 920 921 log = StringIO(self.ENCODING_TEST) 922 csets = changesets_from_cvslog(log, 'pxlib') 923 924 self.assertEqual(len(csets), 2) 925 926 log = csets[0].log 927 self.assertEqual(type(log), type(u'€')) 928 self.assertEqual(len(log), 42) 929 self.assertRaises(UnicodeEncodeError, log.encode, 'ascii') 930 self.assertEqual(len(log.encode('ascii', 'ignore')), 41) -
vcpx/tests/tailor.py
r768 r781 101 101 repository = :pserver:anonymous@cvs.sf.net:/cvsroot/pxlib 102 102 module = pxlib 103 encoding = iso-8859-1 103 104 104 105 [cvs2hg]
Note: See TracChangeset
for help on using the changeset viewer.
