unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 5345@debbugs.gnu.org
Subject: bug#5345: Password asked when visiting a file in a lightweight checkout
Date: Sat, 9 Jan 2010 21:08:58 +0100	[thread overview]
Message-ID: <f7ccd24b1001091208u2fa954a9v51da7b1ad8c868db@mail.gmail.com> (raw)
In-Reply-To: <201001091920.o09JKqPp010697@godzilla.ics.uci.edu>

On Sat, Jan 9, 2010 at 20:20, Dan Nicolaescu <dann@ics.uci.edu> wrote:

> Is that the correct URL syntax?

Yes. This kind of URL is very common when dealing with files on
Windows. According to RFC 1738 ("Uniform Resource Locators (URL)"),
section 3.10 ("FILES"), the syntax is

     file://<host>/<path>

i.e., the slashes are separators. And "[a]s a special case, <host> can
be the string "localhost" or the empty string; this is interpreted as
`the machine from which the URL is being interpreted'.". So
file:///C:/path is a perfectly valid URL for a local file on Windows,
as a shorthand for file://localhost/C:/path. I'm surprised Unix URLs
for absolute paths do not start with file:////.

> But please do it with a system-type test, /C:/emacs/repo/bugs/5313/ is a
> valid unix file name.  Probably not used too much, but valid, so it
> should not be excluded.

Are you OK with the following patch?

    Juanma


=== modified file 'lisp/vc-bzr.el'
--- lisp/vc-bzr.el	2010-01-06 15:11:52 +0000
+++ lisp/vc-bzr.el	2010-01-09 20:06:10 +0000
@@ -361,6 +361,11 @@
 		     ;; look there for the version information.
 		     (when (re-search-forward "file://\\(.+\\)" nil t)
 		       (let ((l-c-parent-dir (match-string 1)))
+			 (when (and (memq system-type '(ms-dos windows-nt))
+				    (string-match-p "^/[[:alpha:]]:" l-c-parent-dir))
+			   ;;; On Windows, file:// URLs often have three slashes,
+			   ;;; so we must remove the remaining one (bug#5345)
+			   (setq l-c-parent-dir (substring l-c-parent-dir 1)))
 			 (setq branch-format-file
 			       (expand-file-name vc-bzr-admin-branch-format-file
 						 l-c-parent-dir))






  reply	other threads:[~2010-01-09 20:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f7ccd24b1001091308y34abf466j1424a588134a83e6@mail.gmail.com>
2010-01-09  2:41 ` bug#5345: Password asked when visiting a file in a lightweight checkout Juanma Barranquero
2010-01-09 10:11   ` Michael Albinus
2010-01-09 12:44     ` Juanma Barranquero
2010-01-09 13:52       ` Eli Zaretskii
2010-01-09 14:36         ` Juanma Barranquero
2010-01-09 18:46           ` Dan Nicolaescu
2010-01-09 19:06             ` Juanma Barranquero
2010-01-09 19:20               ` Dan Nicolaescu
2010-01-09 20:08                 ` Juanma Barranquero [this message]
2010-01-09 20:39                   ` Dan Nicolaescu
2010-01-09 20:57                     ` Lennart Borgman
2010-01-09 21:04                       ` Juanma Barranquero
2010-01-09 21:12                         ` Lennart Borgman
2010-01-10 14:10                   ` Reiner Steib
2010-01-10 17:48                     ` Lennart Borgman
2010-01-10 19:27                       ` Juanma Barranquero
2010-01-10 19:40                         ` Lennart Borgman
2010-01-10 20:06                           ` Juanma Barranquero
2010-01-10 20:10                             ` Lennart Borgman
2010-01-10 20:21                               ` Juanma Barranquero
2010-01-10 20:35                                 ` Lennart Borgman
2010-01-12 18:09                                   ` Reiner Steib
2010-01-09 21:15                 ` Michael Albinus
2010-01-09 21:33                   ` Dan Nicolaescu
2010-01-10  6:51                     ` Michael Albinus
2010-01-10 17:52                       ` Eli Zaretskii
2010-01-10 19:07                         ` Michael Albinus
2010-01-09 18:53       ` Michael Albinus
2010-01-09 21:09   ` bug#5345: marked as done (Password asked when visiting a file in a lightweight checkout) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b1001091208u2fa954a9v51da7b1ad8c868db@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=5345@debbugs.gnu.org \
    --cc=dann@ics.uci.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).