CVS update: /ccvs/src/
[email protected] 10 Jun 2005 19:03:21 -0000
| Newsgroups | gmane.comp.version-control.cvs.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: dprice Date: 05/06/10 12:03:21 Modified: /ccvs/src/ ChangeLog, logmsg.c, sanity.sh, tag.c Log: * logmsg.c (logmsg_list_to_args_proc): Add format character for destination tag. (Original patch from Todd Vierling <[email protected]>). * tag.c (pretag_list_to_args_proc): Likewise. (check_fileproc): Set destination tag name. (tag_delproc): Delete destination tag name. * sanity.sh (info, taginfo): Test new format strings. File Changes: Directory: /ccvs/src/ ===================== File [changed]: ChangeLog Url: https://ccvs.cvshome.org/source/browse/ccvs/src/ChangeLog?r1=1.3212&r2=1.3213 Delta lines: +11 -0 -------------------- --- ChangeLog 8 Jun 2005 14:02:33 -0000 1.3212 +++ ChangeLog 10 Jun 2005 19:03:19 -0000 1.3213 @@ -1,3 +1,14 @@ +2005-06-10 Derek Price <[email protected]> + + * logmsg.c (logmsg_list_to_args_proc): Add format character for + destination tag. + (Original patch from Todd Vierling <[email protected]>). + + * tag.c (pretag_list_to_args_proc): Likewise. + (check_fileproc): Set destination tag name. + (tag_delproc): Delete destination tag name. + * sanity.sh (info, taginfo): Test new format strings. + 2005-06-08 Derek Price <[email protected]> * parseinfo.c: Restore comparison to NULL in assignment within File [changed]: logmsg.c Url: https://ccvs.cvshome.org/source/browse/ccvs/src/logmsg.c?r1=1.96&r2=1.97 Delta lines: +4 -0 ------------------- --- logmsg.c 24 May 2005 20:59:01 -0000 1.96 +++ logmsg.c 10 Jun 2005 19:03:19 -0000 1.97 @@ -633,6 +633,10 @@ case 's': arg = p->key; break; + case 'T': + li = p->data; + arg = li->tag ? li->tag : ""; + break; case 'V': li = p->data; arg = li->rev_old ? li->rev_old : "NONE"; File [changed]: sanity.sh Url: https://ccvs.cvshome.org/source/browse/ccvs/src/sanity.sh?r1=1.1068&r2=1.1069 Delta lines: +38 -18 --------------------- --- sanity.sh 3 Jun 2005 18:26:09 -0000 1.1068 +++ sanity.sh 10 Jun 2005 19:03:19 -0000 1.1069 @@ -18961,7 +18961,7 @@ dotest info-setup-newfmt-1 "$testcvs -q up -prinfo-start loginfo >loginfo" echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\" %{sVv}" >> loginfo # The following cases test the format string substitution - echo "ALL echo %p %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + echo "ALL echo %p \"%{sTVv}\" >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo @@ -19454,7 +19454,7 @@ cd CVSROOT dotest taginfo-newfmt-init-1 \ "$testcvs -q up -prtaginfo-start taginfo >taginfo" - echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sVv}" >>taginfo + echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sTVv}" >>taginfo dotest taginfo-newfmt-init-2 "$testcvs -q ci -m check-in-taginfo" \ "$TESTDIR/cvsroot/CVSROOT/taginfo,v <-- taginfo new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* @@ -19474,7 +19474,7 @@ if test "\$1" = rejectme; then exit 1 else - while [ -n "\$1" ]; do + while test "\$#" -gt 0; do echo "\$1" >>${TESTDIR}/1/taglog shift done @@ -19507,28 +19507,48 @@ dotest taginfo-newfmt-4 "${testcvs} -q tag tag3" \ "T file 2 T file1" + dotest taginfo-newfmt-5 "$testcvs -q tag -rtag1 tag4" \ +"T file 2 +T file1" dotest taginfo-newfmt-examine-1 "cat ${TESTDIR}/1/taglog" \ -"${TESTDIR}/cvsroot +"$TESTDIR/cvsroot tag1 add N first-dir file 2 + NONE 1\.1 file1 + NONE 1\.1 -${TESTDIR}/cvsroot +$TESTDIR/cvsroot tag3 add N first-dir file 2 + NONE 1\.1 file1 + +NONE +1\.1 +$TESTDIR/cvsroot +tag4 +add +N +first-dir +file 2 +tag1 +NONE +1\.1 +file1 +tag1 NONE 1\.1" @@ -19548,7 +19568,7 @@ EOF dotest taginfo-newfmt-init-7 \ "$testcvs -q up -prtaginfo-start taginfo >taginfo" - echo "ALL ${TESTDIR}/1/loggit %{t} %b %{o} %p %{sVv}" >>taginfo + echo "ALL ${TESTDIR}/1/loggit %{t} %b %{o} %p %{sTVv}" >>taginfo echo "UseNewInfoFmtStrings=yes" >>config dotest taginfo-newfmt-7 "$testcvs -q ci -m check-in-taginfo" \ "$TESTDIR/cvsroot/CVSROOT/config,v <-- config @@ -19649,9 +19669,9 @@ "tag1 N add first-dir br T add first-dir file 2 NONE 1\.1 br T add first-dir/sdir file3 NONE 1\.1 -brtag N mov first-dir file 2 NONE 1\.1 file1 1\.1\.2\.1 1\.1\.2\.2 -brtag N mov first-dir/sdir file3 NONE 1\.1 -tag1 ? del first-dir file 2 1\.1 1\.1 file1 1\.1 1\.1 +brtag N mov first-dir file 2 br NONE 1\.1 file1 br 1\.1\.2\.1 1\.1\.2\.2 +brtag N mov first-dir/sdir file3 br NONE 1\.1 +tag1 ? del first-dir file 2 br 1\.1 1\.1 file1 br 1\.1 1\.1 tag1 ? del first-dir/sdir tag1 ? del first-dir tag1 ? del first-dir/sdir File [changed]: tag.c Url: https://ccvs.cvshome.org/source/browse/ccvs/src/tag.c?r1=1.140&r2=1.141 Delta lines: +12 -4 -------------------- --- tag.c 4 May 2005 02:48:16 -0000 1.140 +++ tag.c 10 Jun 2005 19:03:19 -0000 1.141 @@ -629,6 +629,7 @@ (e.g. numtag is "foo" which gets moved between here and tag_fileproc). */ p->data = ti = xmalloc (sizeof (struct tag_info)); + ti->tag = xstrdup (numtag ? numtag : vers->tag); if (!is_rtag && numtag == NULL && date == NULL) ti->rev = xstrdup (vers->vn_user); else @@ -828,28 +829,32 @@ tag_delproc (Node *p) { struct tag_info *ti; - if (p->data != NULL) + if (p->data) { ti = (struct tag_info *) p->data; if (ti->oldrev) free (ti->oldrev); if (ti->rev) free (ti->rev); - free(p->data); + free (ti->tag); + free (p->data); p->data = NULL; } return; } + + /* to be passed into walklist with a list of tags * p->key = tagname * p->data = struct tag_info * * p->data->oldrev = rev tag will be deleted from * p->data->rev = rev tag will be added to + * p->data->tag = tag oldrev is attached to, if any * * closure will be a struct format_cmdline_walklist_closure * where closure is undefined */ static int -pretag_list_to_args_proc(Node *p, void *closure) +pretag_list_to_args_proc (Node *p, void *closure) { struct tag_info *taginfo = (struct tag_info *)p->data; struct format_cmdline_walklist_closure *c = @@ -859,7 +864,7 @@ char *d; size_t doff; - if (p->data == NULL) return 1; + if (!p->data) return 1; f = c->format; d = *c->d; @@ -871,6 +876,9 @@ case 's': arg = p->key; break; + case 'T': + arg = taginfo->tag ? taginfo->tag : ""; + break; case 'v': arg = taginfo->rev ? taginfo->rev : "NONE"; break;