开发者

How to avoid physical path in bzr+ssh://myserver/C:\mydir?

I am starting with Bazaar (switching from Subversion, sorry if terminology is a bit off sometimes). Using Bazaar locally no problems.

Got bzr+ssh:// working on my Windows server (finally! and even ssh agent is working wow!)

Now I want a shared repository on the server from which 开发者_如何转开发the developers can branch to their machines. I want the repository in a specific folder, for example in C:\bzr\MyProject.

When I do:

bzr init-repo --no-trees bzr+ssh://myserver.com/MyProject

it creates the repository in C:\cygwin\home\user\MyProject in the home directory of my user account - it is understandable, but worrying.

Then as an experiment I also tried and succeeded:

bzr init-repo --no-trees bzr+ssh://myserver.com/C:\bzr\MyProject

This created the repository where I wanted. But how do I "map" or "alias" the URL (or bzr) so my developers can logon under their accounts and use URL

bzr+ssh://myserver.com/MyProject

to access the shared repository in C:\bzr\MyProject?

Obviously I don't want developers to use bzr+ssh://myserver.com/C:\bzr\MyProject because of the physical path in the URL.


Ok my own answer is if you want to run Bazaar on a Windows server for a development team who will access it over the internet, and you are not familiar with Linux, Cygwin, SSHD and related stuff then it might turn out more complicated than you can bear.

I actually abandoned the Bazaar idea and gone with Mercurial. I must say Mercurial install on the server is also steep, but at least it is just Windows, IIS and only a bit of Python. Got it running in half a day.

Some of the problems that I had with bzr+ssh:// on a Windows server are:

  1. Needs SSHD installed on the server. SSHD (from stripped down Cygwin) supplied with Bazaar refused to work. Had to install Cygwin and learn a bit of Linux stuff, how to run as a service, how to configure, how to generate keys.

  2. Hard to add a new user in a way that does not request passwords typing for each command. Will need to generate a keypair, mock with copying the keys to th server in two locations (Cygwin's home user folder and Window's too). Probably need to log on the user to Windows to create a profile. Don't want developers logging on to the server actually.

  3. Hard to set up a shared repository in a specific location on the server. Does not seem possible with bzr+ssh. Possible with sftp. Might need to use symlinks as bialix suggested above.

  4. As a newbie to linux stuff I don't understand all implications of running sshd on the server and giving shell access to the developer accounts. Have to use bzr shell limited... documentation is scarce.

Basically, bzr+ssh:// on a Windows server seems to be what installing Subversion on a Windows server was like several years ago - hard. Hopefully it will get better with Bazaar too because I chose it over Mercurial initially.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜