From 43be9e46bad325dab77bd742719b39c6f41ce5a5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 20 Aug 2000 04:08:56 +0000 Subject: [PATCH] Add code to strip off remote-repository prefix in "CVS/Root" files. This assumes that the repository is actually local but is being accessed using a remote mechanism. The right thing to do might be to generate the log using cvs and then merge it, but this is quite a pain. --- v7/src/rcs/logmer.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/v7/src/rcs/logmer.scm b/v7/src/rcs/logmer.scm index 6aacc286a..383bf5886 100644 --- a/v7/src/rcs/logmer.scm +++ b/v7/src/rcs/logmer.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: logmer.scm,v 1.26 2000/07/09 01:44:54 cph Exp $ +$Id: logmer.scm,v 1.27 2000/08/20 04:08:56 cph Exp $ Copyright (c) 1988-2000 Massachusetts Institute of Technology @@ -402,11 +402,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (merge-pathnames (read-one-line-file (merge-pathnames "Repository" cvs)) (pathname-as-directory - (read-one-line-file (merge-pathnames "Root" cvs)))))) + (strip-cvs-remote-prefix + (read-one-line-file (merge-pathnames "Root" cvs))))))) (scan-directory #t pathname pathname)) (scan-directory #f pathname pathname)))) files)) +(define (strip-cvs-remote-prefix string) + (let ((regs + (re-string-match ":\\(\\(ext\\|.?server\\):[^:]+\\|local\\):" + string #t))) + (if regs + (string-tail string (re-match-end-index 0 regs)) + string))) + (define (read-one-line-file pathname) (call-with-input-file pathname read-line)) -- 2.25.1