views:

8552

answers:

9
+15  Q: 

Mercurial "server"

I've been using mercurial for a little while, but mainly for my own usage. Now though, I have a project I'm working on where two of us are building the same project, and we will probably be modifiying each other's files.

I would like to setup a mercurial repo on a server, make that repo the "server", so my changes and the other editor's changes both push to that server (so basically the subversion / cvs model); I like mercurial though, and don't want to switch to something like subversion.

Here in my own network, everything is done on linux, and my "server" has openssh installed. So pushing my changes (I work on multiple computers) from one computer to the server is just a matter of "hg push"; the protocol used is ssh for transfering the changes.

The problem is that I use linux, the server will be windows (so no openssh, right?) and the other editor will be using windows too. As far as I know, the best way of working in mercurial in these types of setups is for the repo to pull changes from the source, rather then the source pushing to the "server". I'm behind several firewall's (not entirely my network) and my computer won't be visible from the server, and I'm assuming the other editor will be behind a firewall too (so we can't just start up the local mercurial http server and get the "server" computer to pull from that).

What's the best way for both editors to get our changes to the server repo? (I should add that the server is a server on the internet, so just as visible as something like google.com. It's a hosted windows server, but I would probably have permission to install software if needed for this)

+2  A: 

mercurial and putty is a well supported and a well documented solution

dfa
+17  A: 

I believe reading the project's documentation is a nice start: http://mercurial.selenic.com/wiki/PublishingRepositories.

Milen A. Radev
+4  A: 

There are certainly many SSH servers available for Windows. Here are two examples:

Check out the Putty examples in the Mercurial: The Definitive Guide book for the Windows user connectivity.

Dave K
+4  A: 

It might also simplify the administration to outsource it -- if you only have one repo and a couple of guys pushing/pulling it, you could do a lot worse than just hosting it somewhere like BitBucket. (And for a one-repo solution it's actually free.)

Alistair Bell
That would work for an opensource application, but not proprietary...
Sure it would. BitBucket has the concept of private repos, which the rest of the world can't see (they can't even see that it's there). If you're sufficiently paranoid that putting your code on a machine somebody else owns is a problem, fair enough; but for everyone else, it's quite doable.
Alistair Bell
that'll be a hard sell to management
TJ
@TJ, not if you explain how much of their time you'll spend figuring out how to manage your own central repo.
Chris Stewart
Chris... why do you insist on thinking company policy is changeable? Comments like yours do nothing to help myself or anybody who is in the same position.
+2  A: 

The simplest solution seems to be to use Samba shared folders, especially in Windows-only environment. I've just set it up, seems to work.

AnSGri
Thats the same solution we use in my team.
mizipzor
+1  A: 

Help porting mercurial-server to Cygwin would be very much appreciated :-)

Paul Crowley
+3  A: 

Suggest Kiln from www.fogbugz.com? Its a commercial source control solution, basically a Windows wrapper with Mercurial under the hood.

Gravitas
Please see my comments to mizipzor and Alistair Bell.
I am afraid that you don't understand what [Kiln](http://www.fogcreek.com/kiln/) offering by Fogcreek entails.Kiln is not a hosted service - to be fair, you can use FogCreek provided hosted service if you like, but Kiln is an autonomously installable server software.(All the gritty details of pricing are discussed on this page -- http://www.fogcreek.com/Kiln/Details.html#forYourServer )
Roland Tepp
I'd suggest you don't understand what the Kiln offering by Fogcreek entails. I purchased and installed Kiln on our Amazon EC2 server, and its running nicely right now. Its just a very nice wrapper around Mercurial.
Gravitas
You're right, didn't realize kiln could be installed on my own server. Thanks for the tip.
+3  A: 

I recommend putting your project on http://bitbucket.org/ a mercurial repository hosting site. If you dont want the source to be seen by others they have settings to create private repositories. I think youre allowed one private repos before they start charging you for it.

mizipzor
I don't think you understand commercial development practices; there is no way that raw source code from this company is going to be hosted on somebody else's server, regardless of whatever "private" repositories exist. It's just not an option.
Commercial doesn't imply ignorance.
Chris Stewart
@Chris: different companies have different paranoia levels, and that's fine. If 85116 can't persuade his company to outsource this stuff to BitBucket or Fog Creek (some will, some won't) his best option will probably be to buy a copy of Kiln that he can run locally. Personally I'd outsource, but in many companies that goes in the 'too hard politically' bucket.
Alistair Bell
@user85116: I doubt that anyone working at BitBucket even care about your precious source code, much less understand it.
Gravitas
Wow, talking about ignorance... some of you just don't get it. Please read Alistair's comment above again, and again, and ...
+1  A: 

Why not share a dropbox folder that contains your 'server repository'?

Rabarberski
Why not ditch sharing at all? It's useless in the end.
Valentin Vasiliev