Reputation: 379
Right now I have my repo on my local drive. In order to back it up, I have to copy .hg to a window's network drive.
At Is it a good idea to put Mercurial Repository in shared Network drive?, Lasse Karlsen said the repo shouldn't be on a shared folder on a network server because "mercurial cannot reliably hold locks in all situations".
Would this still be an issue when the repository is only updated by a single user?
If so, can someone explain to me why the corruption happens?
A while back our IT had problem setting up a mercurial server.
I am very fond of mercurial (it has a great interface and is very easy to work with), but if it's going to be such a pain in the neck to set up for multiple users, I am willing to look for something else. Does anyone have any suggestions (with reasons)?
I am looking for a revision control program that has the following attributes: 2. Good interface (allow you to easily see revision and changes to the code over multiple revisions). 3. Work as a local repo or a network repo. 4. IT will feel comfortable installing on their network.
Thanks, Stephen
Upvotes: 3
Views: 3463
Reputation: 11045
We manged our central Mercurial repositories for a small team on shared network drives (Windows environment) without any problems.
Mercurial managed the locks well and all the developers were happy.
On top of this, we also had a backup of the repositories from the shared drive to a backup system.
This setup worked well for over a year and was eventually replaced by putting the central repositories on a dedicated server that exposed them using hg serve. This was done to allow easier access for remote users, and also improved performance.
EDIT: An example on redirecting from httpd to hg serve. The Mercurial hg serve is running with the following command:
hg serve --address 2.2.2.2 --port 8081 --prefix mercurial --accesslog /opt/mercurial/access.log --errorlog /opt/mercurial/error.log --webdir-conf /opt/mercurial/hgweb.config --pid-file /opt/mercurial/hg.pid --encoding utf8
In the httpd.conf
# Mercurial web server
ProxyPass /mercurial http://2.2.2.2:8081/mercurial
ProxyPassReverse /mercurial http://2.2.2.2:8081/mercurial
<Proxy http://2.2.2.2:8081/mercurial*>
Order deny,allow
Allow from all
</Proxy>
Any call to http://<my httpd host>/mercurial
will be redirected to http://2.2.2.2:8081/mercurial
I hope this helps.
Upvotes: 1
Reputation: 21426
Here is a Mercurial list thread about "repository on Samba Share" where Matt Mackall (Mercurial developer) says "lots and lots of people do just fine with Mercurial on networked filesystems".
That hasn't been my personal experience though. At home (single user scenario), I was running Mercurial repo over SMB on a very cheap no-name brand NAS server (implying a low quality protocol implementation) and it would reliably corrupt the repo.
I also ran a personal repo at work on a more serious enterprise NAS setup (implying a higher quality protocol implementation) and it seemed to work fine for the short time I used it (moved the repo off to a proper setup pretty quickly after the problems at home).
So I guess it depends on your confidence in the quality of the network file system provided by your IT ("problems setting up a Mercurial server" would not inspire confidence in me personally).
Upvotes: 4
Reputation: 97260
I suppose, in solo-mode (only one user|one proccess, initiated by used modify repository) repository on network drive will not lost locks and will be not broken.
But any DVCS by design offer more natural and reliable way of having backup: creating clones of original repository and syncing with upstream (hg serve
+ http-repo is easy way, ssh-host and ssh-type remote repo is only slightly harder way)
Upvotes: 4