Hi Simon,

http://bugzilla.mkgnu.net/show_bug.cgi?id=746

On Thu, 2009-03-12 at 19:05 +0000, Simon Brooke wrote: 
> In Activity.pm there's a method prepare_product_name(). If this detects that 
> a product name should be auto-detected it calls autodetect_product_name once 
> for each file in the activity.
> 
> However, in the changes I'm trying to make to CVS.pm and 
> CVSConsolidatedActivities.pm, autodetect_product_name is never called, 
> although the debug message:

I'd much, much rather we fixed the consolidate_cvs_messages bug FIRST:

http://bugzilla.mkgnu.net/show_bug.cgi?id=1043

Then we could consider supporting the 'auto' policy. I'd hate to see
changes that break each other. I'd rather we had a Scmbug release that
fixes the consolidate_cvs_messages problem, and then we could go ahead
and play with the 'auto' policy.

> Scmbug notice: Preparing for VERIFICATION
> Scmbug DEBUG> Activity.pm:200:Scmbug::Activity::prepare_product_name - Must 
> autodetect the product name.
> 
> does get printed. This seems to be because there are no files in the 
> activity; and this in turn seems to be because during commit the files are 
> added to the activity by the method prepare_activity_commit_latest(), and 
> there's no equivalent method in the verify path; this contrasts with the 
> Subversion class, where there's a method prepare_activity_verify_or_commit(), 
> which, inter alia, sets up the files in the stanza starting at line 253.

This happens because prepare_activity_verify is not supplied the list of
affected files by the relevant CVS hook (I think it's verifymsg).

> The verifymsg CVS hook appears to be able to use the same %{Vvs} macro as 
> loginfo, and I'm beginning to wonder whether the best option is to write a 
> method prepare_activity_verify_or_commit_latest(), called by both 
> prepare_activity_commit() and prepare_activity_verify() if the version is 
> 1.12.X.

I would say you are on the right track. If I were you I would try to
first extend prepare_activity_verify to support version 1.12.x, rather
try to produce a single prepare_activity_verify_or_commit_latest()
function.

The reason such a function exists in Subversion is that Subversion was
consistent enough to be able to produce both information with the only
difference being a command-line parameter supplied to 'svnlook info'.
CVS hasn't been that consistent...

If you discover that 1.12.x is consistent in activity_verify with
activity_commit, then by all means go for it. But I'd start with the
basic activity_verify implementation and consider a later a possible
re-organization.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to