Package: cvsps
Version: 2.1-2
Severity: normal

On some cvs servers you can't get an rlog for the repository root
because some internal assertion fails on the server side when /./ is
present on the path. However, if you use // it works fine. The
attached patch makes cvsps use an empty path ("") instead of "."
which makes it work on such servers.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.22-rc3-gcfb44989-dirty (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cvsps depends on:
ii  cvs                       1:1.12.13-8    Concurrent Versions System
ii  libc6                     2.6~20070518-1 GNU C Library: Shared libraries
ii  zlib1g                    1:1.2.3-15     compression library - runtime

cvsps recommends no packages.

-- no debconf information
--- cvsps-2.1.orig/cvsps.c
+++ cvsps-2.1/cvsps.c
@@ -1041,7 +1041,10 @@
      * from the 'nominal' repository path because of symlinks in the server 
and 
      * the like.  See also the 'parse_file' routine
      */
-    strip_path_len = snprintf(strip_path, PATH_MAX, "%s/%s/", p, 
repository_path);
+    if (strcmp(repository_path, ".") == 0)
+      strip_path_len = snprintf(strip_path, PATH_MAX, "%s//", p);
+    else
+      strip_path_len = snprintf(strip_path, PATH_MAX, "%s/%s/", p, 
repository_path);
 
     if (strip_path_len < 0 || strip_path_len >= PATH_MAX)
     {
--- cvsps-2.1.orig/cvs_direct.c
+++ cvsps-2.1/cvs_direct.c
@@ -864,8 +864,13 @@
        send_string(ctx, "Argument %s\n", date_str);
     }
 
-    send_string(ctx, "Argument %s\n", rep);
-    send_string(ctx, "rlog\n");
+    if (strcmp(rep, ".") == 0) {
+      send_string(ctx, "Argument \n");
+      send_string(ctx, "rlog\n");
+    } else {
+      send_string(ctx, "Argument %s\n", rep);
+      send_string(ctx, "rlog\n");
+    }
 
     /*
      * FIXME: is it possible to create a 'fake' FILE * whose 'refill'

Reply via email to