Host Mercurial on my company's intranet? - mercurial

Instead of using an external web-based Mercurial host, I want to set one up on my company's intranet. Is there a web-based tool for Mercurial that lets you have an interface like Bitbucket's but let's you host Mercurial locally?

Mercurial ships with hgwebdir.cgi, which can be configured to provide a basic interface for repository hosting. It's quite straightforward to setup with Apache.
I use this on my OSX box at home; took about an hour - most of that was permissions related to kludging in server operations on a desktop box.
It's not Bitbucket. If you have a decent-sized budget, you might be able to purchase a bitbucket license for your company - I don't know.

Hgwebdir provides you a web interface for your hg repos. It's little simpler than what your can get from Bitbucket but good enough.
You have to setup a webserver(apache) and mercurial on a server.

With Deveo you can manage Mercurial, Git and Subversion repositories, as well as WebDAV repositories for binary storage. It also has other features such as project Wiki's and issue tracking, which makes it like Github/Gitlab but with support for multiple VCS's.
(Disclaimer: I'm working at Deveo)

codeBeamer is a complete Application Lifecycle Management platform that does everything that BitBucket and more. It comes with commercial support, and can be installed on any Java compliant server, also behind your company firewall.
The space is limited here to go into details, but the codeBeamer user guide should answer all your questions.
(Disclaimer: we are the developers of the product.)

Related

Using versioning on a VM with several users

We are looking for a way to use GitHub on an internal system that we are developing at work. We have developed it in PHP and MySQL, with a fair bit of jQuery/Ajax, on a Windows Server VM running IIS. Other staff can access the frontend over the network using the IP address.
There are currently three people working on it and at the moment we directly edit the file on the VM as we need it to still communicate with the database to check our changes have worked. There is no option to install anything like WAMP on our individual machines and there are the usual group policy restrictions so the only access we have to a database is via the VM. We have been working with copies of files/folders and the database but there is always the risk that then merging these would be a massive task.
I do use GitHub (mainly desktop but I can just about get by with using the command line as long as I have a list of the command in front of me) at home to sync between my PC and Laptop, via GitHub.com and believe that the issues we get with several people needing to update the same file would be eradicated by using it here at work.
However, there are some queries we need to ensure we have straight in our heads before putting forward a request.
Is what we are asking for viable? Can several branches on the same server be worked on at the same time or would this only work on an individual machine.
Given that our network is fairly restricted, is there any way that we can work on the files on our machine and connect to a VM hosted database? I believe that an IDE will allow us to run php files on a standard machine (although a request for Eclipse is now around 6 weeks old and there is still no confirmation that we will get it any time soon) but will this also allow .
The stuff we do is not overly sensitive but the company would certainly not want what we do out there in a public repository (and also would not be likely to pay for a premium GitHub account) so we would need to branch/pull/merge directly from our machines to the VM.
Does anyone have any advice/suggestions/solutions to this? Although GitHub would be a preferred option as I already use it, we are open to any suggestion that will allow three people, on different machines, simultaneously work on a central system while ensuring that we do not overwrite or affect each others stuff.
Setting up a git repo on Windows is not trivial and may require a fair bit of work. You can try using SVN it is fairly straight forward to install on windows and has a better learning curve than Git. I am not saying SVN is better/worse as compared to Git, it's much better suited to your needs. We have a similar setup and we use Tortoise SVN https://subversion.apache.org/ as a client. SVN also has branches and stuff.
SVN for server side repository https://subversion.apache.org/
If you would still prefer Git on windows, check this out - https://www.linkedin.com/pulse/step-guide-setup-secure-git-remote-repository-windows-nivedan-bamal
1) It is possible to work on many branches and then merge them into a single branch. That's the preferred Git development way. You can do the same on SVN.

How Does Mercurial Communicate Changes Between Clients?

Forgive me if this question sounds ridiculously naive, but I don't seem to be able to find a straightforward answer to this anywhere.
I am considering using Mercurial for source control on a small (2-3 developers) project. I like the idea of not having to subscribe to a central repository, and I like that everyone effectively has a complete copy of the project. What I don't understand is how the Mercurial clients communicate changes to each other. Does it require opening a specific port or something similar?
Any pointers to help on Mercurial or comments from people who have used it would be gratefully received.
Mercurial can access remote repositories in a number of ways. The main ones are:
File access (i.e. look at the repo at this path)
HTTP / HTTPS (i.e. look at the repo being served at this web address)
SSH (i.e. log into this machine / user, and look at the repo at this path)
The first only really works if your team is all working on a shared file-system, but is also useful if you personally have multiple clones that you want to move information between.
HTTP is how you would access something like Bitbucket, or some other "available to all" server. You can set-up a temporary server on a machine with the command hg serve, and that's useful if you need to share with a colleague quickly and don't care about security, but normally HTTP Mercurial servers sit behind Apache, or some other web server software.
An SSH based set-up is just a machine running an SSH server which has Mercurial installed. Mercurial logs on to the machine, and invokes hg remotely. The local hg and the remote hg then talk over the link. Very easy to set-up in my opinion. Credentials are all handled in normal SSH ways.
Further reading:Publishing Repositories

Free mercurial repo hosting that supports pull using web browser

I'm looking for the ideal free mercurial hosting site. Ideally it should support
Public and private repos.
Allows Non Open Source projects.
The ability for mercurial users, in some cases, to anonymously access the repo without requiring a login
The ideal would be if people who did not even have Mercurial installed could use a web browser to pull the code as I'm not sure I can mandate the installation of Mercurial on all the users machines.
I have begun my search with Assembla and am working my way through this list, will probably try BitBucket next. So are some or all of the above possible?
BitBucket fits to all your requirements.
Edit - update: Not anymore. It will offer Mercurial hosting until 2020-05-31, before going Git-only.

Is there a way to provide self-hosted web-based forking of Mercurial repos like BitBucket/Kiln?

I'm currently using self-hosted SVN with Trac for a FOSS project, and am slowly moving to Mercurial. I've got HgWeb set up, so I can view the repository and check out over HTTP, but I'd like to be able to offer web-based branching a la BitBucket, Kiln and the like.
My server already has PHP and Python installed. Python is already taking up enough memory, so I don't think it'll cope with Java as well.
I've found this question, but there isn't a good answer and I don't need the full BitBucket feature set (basically just branch/clone and pull requests). There's also this question but it mainly got answers about simple hosting through HgWeb. There are also other questions about BitBucket alternatives, but they focus on externally hosted options, and I want the control and integration with my existing Trac install.
So, are there any free options available that let my developer community make their own branches that they can check into so that I can easily pull from them to get changes into the Master repo?
Thanks.
Making an answer out of my comment, as Ry4an suggested.
In this answer, a system named RhodeCode is mentioned, which its official site describes as
Open source repository browser/management tool with a built in push/pull server, LDAP, permissions sytem and full text search.
It has web admin support, forks, and other server-side repo management. Even though it has no Trac integration, I myself consider it a better hosted option than hgweb which I use now.

How can I host a Mercurial repository for several users myself?

There are a number of hosting services for git, Mercurial, etc. I need to host my own, because some of the data we want to keep there is of a sensitive nature, and we cannot move it off-site.
I need to host a Mercurial repository on a server so that a number of people can access it to both pull changes and push their own work. There needs to be some kind of password protection, and it could also use ssh. I would prefer HTTP(S) as the transfer protocol (a la Google Code) though, if possible.
Can somebody point me to a description of how to do this? I have only found descriptions for hosting single-user repositories and hosting services so far, but nothing about doing the multi-user hosting myself.
Have a look at the PublishingRepositories page on the mercurial site. It will tell you how to set up the hgwebdir.cgi script for serving multiple repos over https.
Once you've configured it, I would recommend adding this to your hgrc:
[web]
style = gitweb
I find it's a bit nicer theme than the default.