Quite simple really, once I'd bought a book on perl and printed off 
Cederqvist on cvs ;-)

LyX has a 1:1 correspondence between the top-level dirs in the repository 
and module names. As such, this patch is safe because we always pass 
log_accum the module name (see loginfo). 

Happy to commit this Lars?

-- 
Angus
? log_accum.diff
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/CVSROOT/ChangeLog,v
retrieving revision 1.5
diff -u -p -r1.5 ChangeLog
--- ChangeLog	23 May 2002 09:15:30 -0000	1.5
+++ ChangeLog	21 Jan 2003 00:03:56 -0000
@@ -1,8 +1,13 @@
+2003-01-20  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* bin/log_accum (main): Fill $dir correctly for commits of files in
+	the top-level directory. This fixes the cvsview of these files.
+
 2002-05-23  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
 	* avail: give Levon karma.
 
-	* bin/log_accum (write_commitlog): handle cvsview of new files.
+	* bin/log_accum (main): handle cvsview of new files.
 
 2002-05-10  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
@@ -10,7 +15,7 @@
 
 2002-05-08  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
-	* avail: leeming loose karma until 1.2.0 is out.
+	* avail: leeming lose karma until 1.2.0 is out.
 
 2002-03-12  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
Index: bin/log_accum
===================================================================
RCS file: /usr/local/lyx/cvsroot/CVSROOT/bin/log_accum,v
retrieving revision 1.3
diff -u -p -r1.3 log_accum
--- bin/log_accum	23 May 2002 07:35:54 -0000	1.3
+++ bin/log_accum	21 Jan 2003 00:03:56 -0000
@@ -382,8 +382,15 @@ if ($replyto eq '') {
 if ($modulename eq "") {
     $modulename = $path[0];	# I.e. the module name == top-level dir
 }
+
+# In the loginfo file for the LyX repository,
+# the module name is passed to log_accum as -M module_name.
+# Moreover, each module resides in a separate dir.
+# Thus, we can always calculate $dir relative to $CVSROOT even if $path -eq '',
+# as is the case for files in the top-level dir.
+# 
 if ($#path == 0) {
-    $dir = ".";
+    $dir = $modulename;
 } else {
     $dir = join('/', @path);
 }

Reply via email to