emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v


From: Sam Steingold
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v
Date: Wed, 12 Nov 2008 04:47:21 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Sam Steingold <sds>     08/11/12 04:47:21

Index: vc-cvs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-cvs.el,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -b -r1.157 -r1.158
--- vc-cvs.el   4 Nov 2008 07:27:26 -0000       1.157
+++ vc-cvs.el   12 Nov 2008 04:47:20 -0000      1.158
@@ -720,10 +720,16 @@
                (buffer-substring (point)
                                  (line-end-position))))))))
 
+(defun vc-cvs-parse-uhp (path)
+  "parse address@hidden/path into (address@hidden /path)"
+  (if (string-match "\\([^/]+\\)\\(/.*\\)" path)
+      (list (match-string 1 path) (match-string 2 path))
+      (list nil path)))
+
 (defun vc-cvs-parse-root (root)
   "Split CVS ROOT specification string into a list of fields.
 A CVS root specification of the form
-  [:METHOD:address@hidden:]/path/to/repository
+  [:METHOD:address@hidden:?/path/to/repository
 is converted to a normalized record with the following structure:
   \(METHOD USER HOSTNAME CVS-ROOT).
 The default METHOD for a CVS root of the form
@@ -745,17 +751,16 @@
             ;; Invalid CVS root
             nil)
            ((= len 1)
-            ;; Simple PATH => method `local'
-            (cons "local"
-                  (cons nil root-list)))
+            (let ((uhp (vc-cvs-parse-uhp (car root-list))))
+              (cons (if (car uhp) "ext" "local") uhp)))
            ((= len 2)
             ;; address@hidden:PATH => method `ext'
             (and (not (equal (car root-list) ""))
                  (cons "ext" root-list)))
            ((= len 3)
-            ;; :METHOD:PATH
+            ;; :METHOD:PATH or :METHOD:address@hidden/PATH
             (cons (cadr root-list)
-                  (cons nil (cddr root-list))))
+                  (vc-cvs-parse-uhp (caddr root-list))))
            (t
             ;; :METHOD:address@hidden:PATH
             (cdr root-list)))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]