Hi.
Diff below adds support to opencvs to display commitid for status
commands.
.joris
Index: status.c
===================================================================
RCS file: /cvs/src/usr.bin/cvs/status.c,v
retrieving revision 1.94
diff -u -p -r1.94 status.c
--- status.c 16 Jan 2015 06:40:07 -0000 1.94
+++ status.c 15 Feb 2015 19:14:28 -0000
@@ -121,6 +121,7 @@ cvs_status_local(struct cvs_file *cf)
size_t len;
RCSNUM *head;
const char *status;
+ struct rcs_delta *rdp;
char buf[PATH_MAX + CVS_REV_BUFSZ + 128];
char timebuf[CVS_TIME_BUFSZ], revbuf[CVS_REV_BUFSZ];
struct rcs_sym *sym;
@@ -211,6 +211,16 @@ cvs_status_local(struct cvs_file *cf)
}
cvs_printf(" Repository revision:\t%s\n", buf);
+
+ if (cf->file_rcs != NULL && head != NULL) {
+ rdp = rcs_findrev(cf->file_rcs, head);
+ if (rdp == NULL) {
+ fatal("cvs_status_local: No head revision delta");
+ }
+
+ cvs_printf(" Commit Identifier:\t%s\n",
+ (rdp->rd_commitid != NULL) ? rdp->rd_commitid : "(none)");
+ }
if (cf->file_ent != NULL) {
if (cf->file_ent->ce_tag != NULL)