Questions tagged [mercurial]

Mercurial is a fast, open-source DVCS (Distributed Version Control System).

Mercurial is a distributed version control system, . It is dedicated to speed and efficiency with a sane user interface. The main part of the code is written in , with a small part in . The project is open-source, distributed under the GPL.

External Links ==============

Please report bugs to the bug tracker instead of posting them here on Stack Overflow. Otherwise the Mercurial team may not see them, and you will become frustrated from the lack of response.

Internal Links ==============

This is a compilation of information on using Mercurial for beginners for practical use.

Beginner - a programmer who has touched source control without understanding it very well.

Practical - covering situations that the majority of users often encounter - creating a repository, branching, merging, pulling/pushing from/to a remote repository, etc.

Notes:

  • Explain how to get something done rather than how something is implemented.
  • Deal with one question per answer.
  • Answer clearly and as concisely as possible.
  • Edit/extend an existing answer rather than create a new answer on the same topic.
  • Please provide a link to the Mercurial wiki or the HG Book for people who want to learn more.

Questions =========

Installation/Setup

Working with the code

Tagging, branching, releases, baselines

Other

8242 questions
6
votes
1 answer

Is there any way to clean up the mercurial cache

Currently the .hgcache folder used up 30GB of my disk space. I am using a MAC book with only 256GB Disk, and Xcode on the other hand regularly eat up all the disk, just wondering is there any way to free up some disk space from the .hgcache folder.
Jacky Yuan
  • 215
  • 3
  • 6
6
votes
2 answers

Which files/folders in a Visual Studio 2010 C# Solution should go into Mercurial DVCS?

I am using Google Code to host my C# project. It has a solution with one class library and one test project. I am using Visual Studio 2010. The client I am using is TortoiseHG. In Windows Explorer, first I cloned an empty folder and got the .hg…
anon355079
6
votes
2 answers

Is there an easy way to clear a mercurial repository of artifacts?

Sometimes I have to return to a really old branch when I depended on a ton of external libraries. Updating to the current branch removes the source files for those dependencies, but the artifacts are left there, as well as a few folders and such. I…
Billy ONeal
  • 104,103
  • 58
  • 317
  • 552
6
votes
4 answers

TotoiseHG: An existing connection was forcibly closed by the remote host

I wanted to push a project from from TortoiseHg to GitHub. I know that, TortoiseHg is a front-end to the Mercurial distributed version control system; where GitHub works with Git. But I love to use TortoiseHg (instead of TortoiseGit or GitGui), and…
Minhas Kamal
  • 20,752
  • 7
  • 62
  • 64
6
votes
4 answers

Why is my hgweb server so slow?

I am serving up access to many mercurial repositories using hgweb, providing them as a collection: [collections] /home/me = /home/me/projects This serves them up at localhost/projects I have around 30 repositories at that location, in a source tree…
Chris R
  • 17,546
  • 23
  • 105
  • 172
6
votes
4 answers

Mercurial log interface

I've been going through the tutorial at hginit.com, but I've found a rather inconvenient aspect of the hg log feature. Basically, when I type it, I get the newest changes on top, and the oldest at the bottom. But this is simply annoying, as most of…
XLR3204S
  • 199
  • 1
  • 1
  • 9
6
votes
3 answers

Is constant merging with Mercurial common practice? Something wrong with this workflow?

My company is switching to Mercurial, and we're coming from Subversion. We're noticing that we're having to do a LOT of merging in our workflow. For instance, if I change a file, commit, pull, update, push, and then my co-worker changes a file,…
Chad Johnson
  • 21,215
  • 34
  • 109
  • 207
6
votes
3 answers

Multi-user Mercurial repositories over SSH?

I have a centralized Mercurial repository which I want to provide access to via SSH. I did a chown root:developers repository -R on the repository directory, so all users in group 'developers' should have access. So, I clone, add my initial files to…
Chad Johnson
  • 21,215
  • 34
  • 109
  • 207
6
votes
1 answer

How can I override .hgrc options on the command line?

I typically want to ignore white space changes when diff'ing with mercurial. If I set this as a default by putting ignorews = true in my .hgrc's [diff] section then there doesn't seem to be a way to force the display of white space changes for a…
Kirk Kelsey
  • 4,259
  • 1
  • 23
  • 26
6
votes
1 answer

Mercurial: Fix a borked history

So working on a project recently (by myself - no other developers), I somehow managed to seriously bork the history with some (apparently) bad merges from cloned repositories. What I would like to do - need to do - is fix this by just deleting the…
Austin Hyde
  • 26,347
  • 28
  • 96
  • 129
6
votes
2 answers

Need a Perforce DVCS recommendation: git-p4, hg Perfarce, or Something Else?

We're getting migrated from Subversion to Perforce at work. I've been using git-svn and it's kept me very productive. I want to keep using a DVCS for my own development. Which works best with Perforce in your experience, git-p4, Perfarce (hg) or…
Casey
  • 158
  • 1
  • 5
6
votes
4 answers

Mercurial .hgignore regular expression

Using Mercurial, I need to ignore all files and directories except directories "tests" and "languages" and files in those directories. That all must be done with regex and…
Danilo Puric
  • 779
  • 2
  • 13
  • 23
6
votes
2 answers

Is there a way to use bitbucket to fork a subversion project?

I have commit rights to a sourceforge project that is owned by the other, primary developer. I'd like to manage my own changes using mercurial, and in fact I'd like to publish them as a fork of this project on bitbucket. However, I want to be able…
Chris R
  • 17,546
  • 23
  • 105
  • 172
6
votes
1 answer

Git analog to Hg's Bigfiles Extension?

I want something in git that is similar to Mercurial's Bigfiles Extension (note: I know of git-bigfiles, but that is unrelated). Basically I want to store large binaries in my git repository, but I don't want to get every version ever of the large…
davr
  • 18,877
  • 17
  • 76
  • 99
6
votes
1 answer

How to join two unrelated repositories?

I am trying to combine two repos but I get error "repository is unrelated".. Any workaround ?
Nitesh
  • 575
  • 2
  • 10
  • 27