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
2 answers

How can I create a branch for a non-tip revision in Mercurial?

In my repo, I have the revisions 1 to 10. I've pushed up to 5 (so the next hg push would publish revisions 6-10). But I have to interrupt my work now and the result isn't 100% complete. So I'd like to move the revisions 6-10 into a new…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
6
votes
5 answers

Anyway to automatically merge or concatenate hgtags (Mercurial)?

We are trying to run a chron job that automatically converts seperate CVS modules to mercurial modules and finally, consolidate those converted mercurial modules to in a single mercurial repo. I've been trying to find ways to automatically merge…
DavidW
  • 301
  • 3
  • 11
6
votes
2 answers

Mercurial: where to put the "style file" so it can (easily) be used on all my projects

Just learning about mercurial's --style and --template options that can be used on hg log and hg tip and I find them to be extremely helpful, but I can't figure out where to put my "style files" I have a "style file" which will allow me to do a hg…
shaune
  • 2,510
  • 1
  • 31
  • 36
6
votes
3 answers

Maven + Mercurial: Error while executing command tag

I want to release a new version of my project using the Maven-Release-Plugin. I get the following error, though: [INFO] Tagging release with the label softsmithy-lib-v0.1... …
Puce
  • 37,247
  • 13
  • 80
  • 152
6
votes
2 answers

Listing only working directory files and dirs in hg manifest?

I'm trying to get a list of the current files and dirs using the following command: hg manifest -r tip However, this brings a list like this: .hgtags folder1/blah.c folder1/blah.h foo.json folder2/bleh.c folder2/bleh.h test.json How can I list…
vinnylinux
  • 7,050
  • 13
  • 61
  • 127
6
votes
2 answers

What are the hook parameters passed to external hook program/script?

The title says it: I am looking for the variable names (HG_*) so I can make use of them in my hook script..
Bonefisher
  • 509
  • 1
  • 5
  • 15
6
votes
6 answers

migrate Hg to Git via "fast-export" in Windows

I have a project having mercurial HG code source management,and try to migrate it on a VSTS/Git platform. I read that there is a tool for doing that, "fast-export"... So I tried but not did't achieve to do it working in Windows... Say I have…
serge
  • 13,940
  • 35
  • 121
  • 205
6
votes
5 answers

How do I get git to display the changes in vim as hg does with the hgeditor script?

An interesting feature in mercurial is the ability to view the changes that will be committed in a vim split (see DiffsInCommitMessageInVIM). Any hint on how to do so with git ?
Alexis Métaireau
  • 10,767
  • 5
  • 24
  • 34
6
votes
4 answers

Multiple Eclipse projects in one Mercurial repository

I have a number of eclipse projects that I'd like to have in two separate hg repositories. I've managed to do this by first creating the two hg repository using TortouiseHg and adding, committing my projects to each of the repositories first. By…
stuff22
  • 1,662
  • 4
  • 24
  • 42
6
votes
2 answers

Mercurial: How to switch to a named branch if a tag has the same name?

I am just playing around with Mercurial at the moment and this may never come up as an issue, but I just created a repository and added some changes. I tagged it at one point then created a named branch at another. Both the tag and the branch have…
DaveJohnston
  • 10,031
  • 10
  • 54
  • 83
6
votes
2 answers

Mercurial 1.7.3 certificate error Windows

I'm trying to clone my repo in Mercurial 1.7.3 on Windows and get the following error: C:\Dev>hg clone https://dev.mydomain.com/repo abort: dev.mydomain.com certificate error: certificate is for *.webfaction.com Do I have to pay for a real SSL…
Brian
  • 61
  • 1
  • 2
6
votes
2 answers

Most recent tag before tip in mercurial

I mark releases with hg tag . When I release a bugfix, I don't want to increment the version number, but I want to use the most recent version number during the build process. If I run hg tags, it will show tip first, then the…
Adam Schmideg
  • 10,590
  • 10
  • 53
  • 83
6
votes
2 answers

version control: moving a bug fix/code enhancement around feature development

I have a workflow question related to Mercurial (possibly applicable to other DVCS). The repo is set up using the typical default/stable setup. You're tasked with building a new feature and expect it to take some time (month+). While working on…
jbarreiros
  • 1,103
  • 1
  • 10
  • 21
6
votes
2 answers

revert vs. update for uncommited changes

Suppose you have commit some changes, and then somehow deleted/modified some files by accident. Which would be better? Using revert oder update?
helpermethod
  • 59,493
  • 71
  • 188
  • 276
6
votes
2 answers

How do I configure Mercurial to not commit specific config files?

My team is switching to Mercurial. Our projects all have a config file (web.config or app.config, and a few bat files as well - we are a C# shop). These files need to be part of the repository. When a developer clones the repository, local…
Jason Jackson
  • 17,016
  • 8
  • 49
  • 74