? testcvs/repos_0 ? testcvs/testcvs_0.err ? testcvs/testcvs_0.out ? testcvs/testcvs_0.tmp ? testcvs/tree_0 Index: src/rcs.cpp =================================================================== RCS file: /usr/local/cvs/cvsnt/src/rcs.c,v retrieving revision 1.80.2.214.4.54.2.21 diff -c -r1.80.2.214.4.54.2.21 rcs.cpp *** src/rcs.cpp 30 Jan 2018 04:42:09 -0000 1.80.2.214.4.54.2.21 --- src/rcs.cpp 13 Nov 2018 03:14:35 -0000 *************** *** 3759,3765 **** /* Loosened this a bit - RCS doesn't really matter these days */ bool RCS_check_tag (const char *tag, bool report_error, bool versioned_tag, bool numeric_tag) { ! char *invalid = "$,.:;@"; /* invalid RCS tag characters */ const char *cp; unsigned char c; --- 3759,3765 ---- /* Loosened this a bit - RCS doesn't really matter these days */ bool RCS_check_tag (const char *tag, bool report_error, bool versioned_tag, bool numeric_tag) { ! const char *invalid = "$,.:;@"; /* invalid RCS tag characters */ const char *cp; unsigned char c; *************** *** 3822,3828 **** quotes. Comma separates multiple bugs on a revision */ bool RCS_check_bugid (const char *bugid, bool allow_comma) { ! char *invalid = "\"' "; /* invalid bugid characters -- tab (HT and VT) and CR/LF are all non-printing */ const char *cp; unsigned char c; --- 3822,3828 ---- quotes. Comma separates multiple bugs on a revision */ bool RCS_check_bugid (const char *bugid, bool allow_comma) { ! const char *invalid = "\"' "; /* invalid bugid characters -- tab (HT and VT) and CR/LF are all non-printing */ const char *cp; unsigned char c; *************** *** 5477,5483 **** Deltatext *dtext; Node *nodep; char *tmpfile, *changefile, *chtext; ! char *diffopts; size_t bufsize; int buflen, chtextlen; int status, checkin_quiet, allocated_workfile; --- 5477,5483 ---- Deltatext *dtext; Node *nodep; char *tmpfile, *changefile, *chtext; ! char *diffopts, __diffopts_default[100]; size_t bufsize; int buflen, chtextlen; int status, checkin_quiet, allocated_workfile; *************** *** 6023,6029 **** /* Diff options should include --binary if the RCS file has -kb set in its `expand' field. */ if(kf.flags&KFLAG_BINARY) ! diffopts = "-a -n --binary-input --binary-output"; else if(kf.flags&KFLAG_ENCODED && !server_active) { static char __diffopts[64] = "-a -n --binary-output --encoding="; --- 6023,6032 ---- /* Diff options should include --binary if the RCS file has -kb set in its `expand' field. */ if(kf.flags&KFLAG_BINARY) ! { ! strcpy(__diffopts_default,"-a -n --binary-input --binary-output"); ! diffopts = __diffopts_default; ! } else if(kf.flags&KFLAG_ENCODED && !server_active) { static char __diffopts[64] = "-a -n --binary-output --encoding="; *************** *** 6033,6039 **** diffopts = __diffopts; } else ! diffopts = "-a -n --binary-output"; rcsdiff_param_t rcsdiff_args; --- 6036,6045 ---- diffopts = __diffopts; } else ! { ! strcpy(__diffopts_default,"-a -n --binary-output"); ! diffopts = __diffopts_default; ! } rcsdiff_param_t rcsdiff_args; *************** *** 6273,6279 **** { // Unified diff if(kf.flags&KFLAG_BINARY) ! diffopts = "-a -u --binary-input --binary-output"; else if(kf.flags&KFLAG_ENCODED && !server_active) { static char __diffopts[64] = "-a -u --binary-output --encoding="; --- 6279,6288 ---- { // Unified diff if(kf.flags&KFLAG_BINARY) ! { ! strcpy(__diffopts_default,"-a -u --binary-input --binary-output"); ! diffopts = __diffopts_default; ! } else if(kf.flags&KFLAG_ENCODED && !server_active) { static char __diffopts[64] = "-a -u --binary-output --encoding="; *************** *** 6283,6289 **** diffopts = __diffopts; } else ! diffopts = "-a -u --binary-output"; } if(diffopts) --- 6292,6301 ---- diffopts = __diffopts; } else ! { ! strcpy(__diffopts_default,"-a -u --binary-output"); ! diffopts = __diffopts_default; ! } } if(diffopts) *************** *** 7962,7967 **** --- 7974,7980 ---- Returns a pointer into static readonly storage. */ static char *month_printname (char *month) { + static const char __nomonth[] = "???\0"; static const char *const months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; *************** *** 7969,7975 **** mnum = atoi (month); if (mnum < 1 || mnum > 12) ! return "???"; return (char *)months[mnum - 1]; } --- 7982,7988 ---- mnum = atoi (month); if (mnum < 1 || mnum > 12) ! return (char *)__nomonth; return (char *)months[mnum - 1]; } *************** *** 8593,8598 **** --- 8606,8612 ---- static RCSVers *getdelta (struct rcsbuffer *rcsbuf, char *rcsfile, char **keyp, char **valp) { + static const char dead_rcsstate[] = "dead\0"; RCSVers *vnode; char *key, *value, *cp; Node *kv; *************** *** 8744,8750 **** vnode->dead = 1; if (vnode->state != NULL) rcsbuf_valfree(rcsbuf,&vnode->state); ! vnode->state ="dead"; continue; } --- 8758,8764 ---- vnode->dead = 1; if (vnode->state != NULL) rcsbuf_valfree(rcsbuf,&vnode->state); ! vnode->state =(char *)dead_rcsstate; continue; } Index: testcvs/testcvs.py =================================================================== RCS file: /usr/local/cvs/cvsnt/testcvs/testcvs.py,v retrieving revision 1.20.2.12.6.11.4.8 diff -c -r1.20.2.12.6.11.4.8 testcvs.py *** testcvs/testcvs.py 3 Aug 2018 05:17:19 -0000 1.20.2.12.6.11.4.8 --- testcvs/testcvs.py 13 Nov 2018 03:21:00 -0000 *************** *** 152,157 **** --- 152,165 ---- if(verbose): print "Copy "+srcfile+" -> "+destfile shutil.copyfile(srcfile,destfile) + def touch(fname, times=None): + if(verbose): print "touch "+fname + fhandle = open(fname, 'a') + try: + os.utime(fname, times) + finally: + fhandle.close() + def file_compare(file1,file2): if(verbose): print "Compare "+file1+" -> "+file2 if(filecmp.cmp(file1,file2) == 0): *************** *** 634,664 **** --- 642,710 ---- start_test('Checkout/Diff different versions of a text file') chdir(current_tree+'/testcvs') + print ' - first add diff_test.txt' file_copy(test_data+'/diff_test.txt.1',current_tree+'/testcvs/diff_test.txt') cvs_pass('add diff_test.txt') + print ' - commit first add diff_test.txt' + file_copy(test_data+'/diff_test.txt.1',current_tree+'/testcvs/diff_test.txt') cvs_pass('commit -m "" diff_test.txt') file_copy(test_data+'/diff_test.txt.2',current_tree+'/testcvs/diff_test.txt') + print ' - commit first change (diff_test.txt.2) diff_test.txt' cvs_pass('commit -f -m "" diff_test.txt') + print ' - first tag diff_test.txt' cvs_pass('tag sticky_tag_test_symbolic_tag diff_test.txt') + print ' - log after tag diff_test.txt' + cvs_pass('log diff_test.txt') + file_wild_compare(outfile,test_data+'/diff_test.log.2.txt') file_copy(test_data+'/diff_test.txt.3',current_tree+'/testcvs/diff_test.txt') + print ' - commit second change (diff_test.txt.3) diff_test.txt' cvs_pass('commit -f -m "" diff_test.txt') + print ' - log after 2nd change diff_test.txt' + cvs_pass('log diff_test.txt') + file_wild_compare(outfile,test_data+'/diff_test.log.3.txt') file_copy(test_data+'/diff_test.txt.4',current_tree+'/testcvs/diff_test.txt') + print ' - commit third change (diff_test.txt.4) diff_test.txt' cvs_pass('commit -f -m "" diff_test.txt') + print ' - log after third cange diff_test.txt' + cvs_pass('log diff_test.txt') + file_wild_compare(outfile,test_data+'/diff_test.log.4.txt') + print ' - update sandbox to rev 1.3 of diff_test.txt' + cvs_pass('update -r 1.3 diff_test.txt') + file_exists(current_tree+'/testcvs/diff_test.txt') + file_compare(test_data+'/diff_test.txt.3',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.2 of diff_test.txt' + cvs_pass('update -r 1.2 diff_test.txt') + file_exists(current_tree+'/testcvs/diff_test.txt') + file_compare(test_data+'/diff_test.txt.2',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.1 of diff_test.txt' + cvs_pass('update -r 1.1 diff_test.txt') + file_exists(current_tree+'/testcvs/diff_test.txt') + file_compare(test_data+'/diff_test.txt.1',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.4 of diff_test.txt' + cvs_pass('update -r 1.4 diff_test.txt') + file_exists(current_tree+'/testcvs/diff_test.txt') + file_compare(test_data+'/diff_test.txt.4',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.1 of diff_test.txt' cvs_pass('update -r 1.1 diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.1',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.2 of diff_test.txt' cvs_pass('update -r 1.2 diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.2',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.3 of diff_test.txt' cvs_pass('update -r 1.3 diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.3',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.4 of diff_test.txt' cvs_pass('update -r 1.4 diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.4',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to rev 1.1 (again) of diff_test.txt' cvs_pass('update -r 1.1 diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.1',current_tree+'/testcvs/diff_test.txt') + print ' - update sandbox to AUTO of diff_test.txt' cvs_pass('update -A diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_compare(test_data+'/diff_test.txt.4',current_tree+'/testcvs/diff_test.txt') *************** *** 729,737 **** --- 775,793 ---- cvs_pass('update -r branch_test diff_test.txt') file_exists(current_tree+'/testcvs/diff_test.txt') file_copy(test_data+'/branch_test.txt.1',current_tree+'/testcvs/diff_test.txt') + #touch(current_tree+'/testcvs/diff_test.txt') cvs_pass('commit -m "" diff_test.txt') + file_compare(outfile,test_data+'/branch_test.txt.A') + # raw_input("Press Enter to continue...") + print " - wait a couple of seconds... " + time.sleep(2) file_copy(test_data+'/branch_test.txt.2',current_tree+'/testcvs/diff_test.txt') + #touch(current_tree+'/testcvs/diff_test.txt') cvs_pass('commit -m "" diff_test.txt') + file_compare(outfile,test_data+'/branch_test.txt.B') + # raw_input("Press Enter to continue...") + print " - wait a couple of seconds... " + time.sleep(2) cvs_pass('log -t diff_test.txt') file_compare(outfile,test_data+'/branch_test.txt.3') cvs_pass('rlog -t -rbranch_test testcvs/diff_test.txt') *************** *** 797,802 **** --- 853,860 ---- file_compare(outfile,test_data+'/merge_test.txt.2') file_compare('diff_test.txt',test_data+'/merge_test.txt.3') file_copy(test_data+'/merge_test.txt.4',current_tree+'/testcvs/diff_test.txt') + print " - touch before commit... " + touch(current_tree+'/testcvs/diff_test.txt') cvs_pass('commit -m "" diff_test.txt') cvs_pass('update -r branch_test diff_test.txt') file_copy(test_data+'/merge_test.txt.5',current_tree+'/testcvs/diff_test.txt') Index: testcvs/test_data/branch_test.txt.A =================================================================== RCS file: testcvs/test_data/branch_test.txt.A diff -N testcvs/test_data/branch_test.txt.A *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testcvs/test_data/branch_test.txt.A 13 Nov 2018 02:54:33 -0000 *************** *** 0 **** --- 1,4 ---- + Checking in diff_test.txt; + /repos/testcvs/diff_test.txt,v <-- diff_test.txt + new revision: 1.3.2.1; previous revision: 1.3 + done Index: testcvs/test_data/branch_test.txt.B =================================================================== RCS file: testcvs/test_data/branch_test.txt.B diff -N testcvs/test_data/branch_test.txt.B *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testcvs/test_data/branch_test.txt.B 13 Nov 2018 02:55:15 -0000 *************** *** 0 **** --- 1,4 ---- + Checking in diff_test.txt; + /repos/testcvs/diff_test.txt,v <-- diff_test.txt + new revision: 1.3.2.2; previous revision: 1.3.2.1 + done Index: testcvs/test_data/diff_test.log.2.txt =================================================================== RCS file: testcvs/test_data/diff_test.log.2.txt diff -N testcvs/test_data/diff_test.log.2.txt *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testcvs/test_data/diff_test.log.2.txt 13 Nov 2018 00:30:25 -0000 *************** *** 0 **** --- 1,21 ---- + + RCS file: /repos/testcvs/diff_test.txt,v + Working file: diff_test.txt + head: 1.2 + branch: + locks: strict + access list: + symbolic names: + sticky_tag_test_symbolic_tag: 1.2 + keyword substitution: kv + total revisions: 2; selected revisions: 2 + description: + ---------------------------- + revision 1.2 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +3 -3; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.1 + date: ????/??/?? ??:??:??; author: *; state: Exp; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ============================================================================= Index: testcvs/test_data/diff_test.log.3.txt =================================================================== RCS file: testcvs/test_data/diff_test.log.3.txt diff -N testcvs/test_data/diff_test.log.3.txt *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testcvs/test_data/diff_test.log.3.txt 13 Nov 2018 00:47:54 -0000 *************** *** 0 **** --- 1,25 ---- + + RCS file: /repos/testcvs/diff_test.txt,v + Working file: diff_test.txt + head: 1.3 + branch: + locks: strict + access list: + symbolic names: + sticky_tag_test_symbolic_tag: 1.2 + keyword substitution: kv + total revisions: 3; selected revisions: 3 + description: + ---------------------------- + revision 1.3 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +2 -2; commitid: *; username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.2 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +3 -3; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.1 + date: ????/??/?? ??:??:??; author: *; state: Exp; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ============================================================================= Index: testcvs/test_data/diff_test.log.4.txt =================================================================== RCS file: testcvs/test_data/diff_test.log.4.txt diff -N testcvs/test_data/diff_test.log.4.txt *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testcvs/test_data/diff_test.log.4.txt 13 Nov 2018 01:16:38 -0000 *************** *** 0 **** --- 1,29 ---- + + RCS file: /repos/testcvs/diff_test.txt,v + Working file: diff_test.txt + head: 1.4 + branch: + locks: strict + access list: + symbolic names: + sticky_tag_test_symbolic_tag: 1.2 + keyword substitution: kv + total revisions: 4; selected revisions: 4 + description: + ---------------------------- + revision 1.4 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +2 -2; commitid: *; username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.3 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +2 -2; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.2 + date: ????/??/?? ??:??:??; author: *; state: Exp; lines: +3 -3; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + ---------------------------- + revision 1.1 + date: ????/??/?? ??:??:??; author: *; state: Exp; kopt: kv; commitid: * username: *; filename: diff_test.txt; + *** empty log message *** + =============================================================================