开发者

How can I specify a Windows drive letter when using subversion svn+ssh

How can I specify a Windows drive letter when using subversion svn+ssh? Is it even possible? On one system this works:

svn list svn+ssh://username@hostname://Preserve/svn_repository

But on that machine, all of svn and the repository and where ssh logs into are all on the C: drive.

On a new machine, the subversion repository is on the N: drive, but ssh and the svn command live on the C: d开发者_如何学Crive.

I haven't been able to come up with a path specification that finds my repository (the repository is in this directory: N:\Preserve\Repositories\jbp)

Note that I can access it when I am logged into the machine via this command:

svn list file:///N:/Preserve/Repositories/jbp

As an example here is a call that FAILS using svn+ssh

svn list svn+ssh://username@hostname/N:/Preserve/Repositories/jbp


If you want a file based reference, you need to use a file based URI.

Note that the hostname is "localhost" and if you omit it, then the URI standard will assume you meant localhost.

If you decide to attempt to access a file from a different machine; well, then you need a network URI (which may be a URL). It is not possible to directly access a file system that lies on the other side of a network, you must use the network to access the file system on your behalf.

For Unix like systems.

file://localhost/etc/fstab
file:///etc/fstab

For Windows like systems, the colon creates issues with the URI format. Some libraries replace the colon in C: with a pipe (or bar) like C|. Other libraries bend the rules on Windows file URIs and allow an extra colon.

For systems that use colon replacement with bar

file://localhost/c|/WINDOWS/clock.avi
file:///c|/WINDOWS/clock.avi

For systems that slightly violate the URI format

file://localhost/c:/WINDOWS/clock.avi
file:///c:/WINDOWS/clock.avi

Wikipedia gets most of the credit on this one, but I've used file based URIs before with Subversion, they work fine (especially for creating a small repository in your own home directory to track changes on one-man hobby projects).


This is not an answer to the question, but a work around. I gave up and just moved the repository to the C: drive. Luckily because of how subversion works, I was able to just copy the repository, and move the old one away so I don't accidentally use it. This makes commands like the following now work remotely, across the Internet, secured by ssh:

svn list svn+ssh://myusername@repositoryhostname/Repositories/jbp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜