Hi all,
From: Joerg Faschingbauer [mailto:[EMAIL PROTECTED]]
> John Cavanaugh once posted a patch that extends the commitinfo
> parameters with the necessary information. I successfully applied it
> to 1.10.7, but never tried to compile nor test.
I've just used this patch with CVS 1.10.8 successfully, although I had to apply one of
the documentation parts by hand. Caveat: I haven't done much more than a few
add/commit/tag cycles, so there may be small problems I've missed.
I had to apply the following patch over John's to get it to run correctly; otherwise I
got intermittent segmentation faults on "add" commands, as there was no previous
revision and it was trying to printf a NULL pointer. It also removes the spurious
fourth field from the arguments to taginfo, which was part of the printf format but
never passed in, in case that caused problems further down the road.
Useful patch, though! ;-) Thanks to John for making it available.
Andy
diff -r -c cvs-jpatch/src/commit.c cvs-1.10.8/src/commit.c
*** cvs-jpatch/src/commit.c Mon Jun 26 11:50:20 2000
--- cvs-1.10.8/src/commit.c Tue Jun 27 12:21:56 2000
***************
*** 1127,1132 ****
--- 1127,1133 ----
char argBuf[PATH_MAX];
char *type_stat;
char *tag_stat;
+ char *rev_old;
switch (li->type)
{
***************
*** 1144,1150 ****
{ tag_stat="main"; }
else
{ tag_stat=li->tag; }
! sprintf(argBuf,"%s:%s:%s:%s",p->key,type_stat,tag_stat,li->rev_old);
run_arg (argBuf);
}
}
--- 1145,1156 ----
{ tag_stat="main"; }
else
{ tag_stat=li->tag; }
! if ( li->rev_old ) {
! rev_old = li->rev_old;
! } else {
! rev_old = "";
! }
! sprintf(argBuf,"%s:%s:%s:%s",p->key,type_stat,tag_stat,rev_old);
run_arg (argBuf);
}
}
diff -r -c cvs-jpatch/src/rtag.c cvs-1.10.8/src/rtag.c
*** cvs-jpatch/src/rtag.c Mon Jun 26 11:50:20 2000
--- cvs-1.10.8/src/rtag.c Tue Jun 27 12:37:07 2000
***************
*** 534,540 ****
type_stat=(delete_flag ? "BT_DEL" : force_tag_move ? "BT_MOV" : "BT_ADD");
else
type_stat=(delete_flag ? "RT_DEL" : force_tag_move ? "RT_MOV" : "RT_ADD");
! sprintf(argBuf,"%s:%s:%s:%s",p->key,type_stat,p->data);
run_arg (argBuf);
}
}
--- 534,540 ----
type_stat=(delete_flag ? "BT_DEL" : force_tag_move ? "BT_MOV" : "BT_ADD");
else
type_stat=(delete_flag ? "RT_DEL" : force_tag_move ? "RT_MOV" : "RT_ADD");
! sprintf(argBuf,"%s:%s:%s",p->key,type_stat,p->data);
run_arg (argBuf);
}
}
diff -r -c cvs-jpatch/src/tag.c cvs-1.10.8/src/tag.c
*** cvs-jpatch/src/tag.c Mon Jun 26 11:50:20 2000
--- cvs-1.10.8/src/tag.c Tue Jun 27 12:37:26 2000
***************
*** 441,447 ****
type_stat=(delete_flag ? "BT_DEL" : force_tag_move ? "BT_MOV" : "BT_ADD");
else
type_stat=(delete_flag ? "RT_DEL" : force_tag_move ? "RT_MOV" : "RT_ADD");
! sprintf(argBuf,"%s:%s:%s:%s",p->key,type_stat,p->data);
run_arg (argBuf);
}
}
--- 441,447 ----
type_stat=(delete_flag ? "BT_DEL" : force_tag_move ? "BT_MOV" : "BT_ADD");
else
type_stat=(delete_flag ? "RT_DEL" : force_tag_move ? "RT_MOV" : "RT_ADD");
! sprintf(argBuf,"%s:%s:%s",p->key,type_stat,p->data);
run_arg (argBuf);
}
}
***********************************************************************
This transmission contains information which may be confidential and
which may also be privileged. It is intended for the named addressee
only. Unless you are the named addressee, or authorised to receive it
on behalf of the addressee you may not copy or use it, or disclose it
to anyone else. If you have received this transmission in error please
contact the sender. Thank you for your cooperation.
***********************************************************************
If you would like to find out more about AEA Technology, or how we can
harness the power of science and engineering to help deliver complete
solutions for you, please visit our website at http://www.aeat.co.uk
AEA Technology plc registered office 329 Harwell, Didcot, Oxfordshire OX11 0RA.
Registered in England and Wales, number 3095862.