svn versus cvs emails

FreshPorts processes the cvs commit logs from the FreeBSD cvs-all mailing list. It parses these emails into XML. FreeBSD is in the process of moving to svn.

This email will demonstrate of the differences between the two email formats and highlight any issues that might surround the move to processing svn instead of cvs logs.

CVS emails

The following is a cvs email for a recent commit.

Message-Id: <200809050207.m8527Tu1007048@repoman.freebsd.org>
X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to davidxu@repoman.freebsd.org using -f
From: David Xu <davidxu@FreeBSD.org>
Date: Fri, 5 Sep 2008 02:07:25 +0000 (UTC)
To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject: cvs commit: src/sys/kern uipc_mqueue.c
X-FreeBSD-CVS-Branch: HEAD

davidxu     2008-09-05 02:07:25 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_mqueue.c 
  Log:
  SVN rev 182776 on 2008-09-05 02:07:25Z by davidxu
  
  Fix lock name conflict.
  
  PR:     kern/127040
  
  Revision  Changes    Path
  1.32      +1 -1      src/sys/kern/uipc_mqueue.c

SVN emails

Message-Id: <200809050207.m8527Pod090353@svn.freebsd.org>
From: David Xu <davidxu@FreeBSD.org>
Date: Fri, 5 Sep 2008 02:07:25 +0000 (UTC)
To: src-committers@freebsd.org
Subject: svn commit: r182776 - head/sys/kern
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: davidxu
Date: Fri Sep  5 02:07:25 2008
New Revision: 182776
URL: http://svn.freebsd.org/changeset/base/182776

Log:
  Fix lock name conflict.
  
  PR:	kern/127040

Modified:
  head/sys/kern/uipc_mqueue.c

Modified: head/sys/kern/uipc_mqueue.c
==============================================================================
--- head/sys/kern/uipc_mqueue.c	Fri Sep  5 01:36:30 2008	(r182775)
+++ head/sys/kern/uipc_mqueue.c	Fri Sep  5 02:07:25 2008	(r182776)
@@ -1499,7 +1499,7 @@ mqueue_alloc(const struct mq_attr *attr)
 		mq->mq_maxmsg = default_maxmsg;
 		mq->mq_msgsize = default_msgsize;
 	}
-	mtx_init(&mq->mq_mutex, "mqueue", NULL, MTX_DEF);
+	mtx_init(&mq->mq_mutex, "mqueue lock", NULL, MTX_DEF);
 	knlist_init(&mq->mq_rsel.si_note, &mq->mq_mutex, NULL, NULL, NULL);
 	knlist_init(&mq->mq_wsel.si_note, &mq->mq_mutex, NULL, NULL, NULL);
 	atomic_add_int(&curmq, 1);

XML

Both emails must produce the same XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE UPDATES PUBLIC "-//FreshPorts//DTD FreshPorts 2.0//EN" "http://www.freshports.org/docs/fp-updates.dtd">

<UPDATES Version="1.3.2.1">
    <UPDATE>
        <DATE Year="2008" Month="9" Day="5"></DATE>
        <TIME Timezone="UTC" Hour="2" Second="25" Minute="7"></TIME>
        <OS Id="FreeBSD" Branch="HEAD"></OS>
        <LOG>SVN rev 182776 on 2008-09-05 02:07:25Z by davidxu

Fix lock name conflict.

PR:     kern/127040</LOG>
        <PEOPLE>
            <UPDATER Handle="davidxu"></UPDATER>
        </PEOPLE>
        <MESSAGE EncodingLosses="false" Subject="cvs commit: src/sys/kern uipc_mqueue.c" Id="200809050207.m8527Tu1007048@repoman.freebsd.org">
            <DATE Year="2008" Month="9" Day="5"></DATE>
            <TIME Timezone="UTC" Hour="2" Second="25" Minute="7"></TIME>
            <REPOSITORY>src</REPOSITORY>
            <TO Email="src-committers@FreeBSD.org"></TO>
            <TO Email="cvs-src@FreeBSD.org"></TO>
            <TO Email="cvs-all@FreeBSD.org"></TO>
        </MESSAGE>
        <FILES>
            <FILE Revision="1.32" Action="Modify" Path="src/sys/kern/uipc_mqueue.c" Changes="+1 -1"></FILE>
        </FILES>
        <PR Id="kern/127040"></PR>
    </UPDATE>
</UPDATES>

Analysis will reveal what, if any, information is missing from the svn commit email.

Other issues

FreshPorts avoids processing duplicate commits by using the message ID as a unique identifier. We must consider that the SVN and the CVS commit emails use different message IDs for the same commit. Therefore we must be careful not to proces s both CVS and SVN email for the same commit.

We may be able to do this via procmail.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top