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
48
votes
9 answers

What makes merging in DVCS easy?

I read at Joel on Software: With distributed version control, the distributed part is actually not the most interesting part. The interesting part is that these systems think in terms of changes, not in terms of versions. and at…
Afriza N. Arief
  • 7,696
  • 5
  • 47
  • 74
48
votes
7 answers

Why does Mercurial think my SQL files are binary?

I just scripted out my SQL Server stored procs, table definitions, etc using SQL Server Management Studio, and tried to add them to my Mercurial source control repository. They got added just fine, but now when I change and diff them, Mercurial…
Brian Sullivan
  • 27,513
  • 23
  • 77
  • 91
47
votes
4 answers

hg equivalent of git add -p?

Is there a mercurial equivalent of git add -p? Quoting from man, git-add with the option -p (or --patch) does the following: Interactively choose hunks of patch between the index and the work tree and add them to the index. This gives the user a…
andreliebschner
  • 535
  • 4
  • 7
47
votes
3 answers

Mercurial shelve extension - how can you view the diff of a shelf?

I see no documentation on how to do this in the docs.
Charles Finkel
  • 1,540
  • 2
  • 10
  • 12
47
votes
6 answers

Handling renames: svn vs. git vs. mercurial

How do each of these VCS handle renames? I have found a lot of contradicting information stating that git tracks LOC (lines of code) instead of files, renames would therefore have no meaning for it.
Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172
47
votes
2 answers

Managing release branches in Mercurial

Recently I switched from SVN to Mercurial. Now I wonder how to realize my intended branching work flow in Mercurial according to good practice, hoping other developers understand what happens in the repository. This is the work flow: Usually I have…
Oben Sonne
  • 9,893
  • 2
  • 40
  • 61
47
votes
12 answers

Convert a Mercurial Repository to Git

I've already tried hg2git through fast-export and I've already tried hg-git. Both with no success. hg2git actually worked, but I had to ask a friend who runs a Unix machine to do it. And that messed up all the linefeeds throughout the files. hg-git…
Tigraine
  • 23,358
  • 11
  • 65
  • 110
47
votes
5 answers

Can Mercurial be made to preserve file permissions?

I've seen a number of blog posts, and have experienced for myself, that Mercurial does not preserve the permissions on files pushed from one repo to another. Does anyone know of a Mercurial extension that would preserve the permissions? I'm…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
46
votes
6 answers

Generating patches in Mercurial

I've looked for that in the manual, but I can't generate a patch for the last commit. I tried hg qnew patch_name but it does only file with # HG changeset patch # Parent a6a8e225d16ff5970a8926ee8d24272a1c099f9c I also tried hg export tip but it…
deem
  • 1,844
  • 4
  • 20
  • 36
46
votes
5 answers

Unable to load platform at path

When using filemerge to solve HG conflict, I got the following error FileMerge[18002:707] Unable to load platform at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
Jayson
  • 2,123
  • 3
  • 19
  • 16
45
votes
8 answers

Sourcetree constantly asks for authenticate with Mercurial (Kiln)?

I'm running Lion latest with SourceTree. I tried to connect to a Fogbugz Kiln reponsitory, which succeeded, but whenever I PUSH or PULL Sourcetree consistently asks me for a username and password despite I saved it to my KeyChain. Anyone have any…
kidcapital
  • 5,064
  • 9
  • 46
  • 68
45
votes
4 answers

How to entirely disable SSL certificate checks in Mercurial / TortoiseHg?

I'm looking for a way to make --insecure option the default one for any hg \ TortoiseHg command. Please don't write this is a bad practice - I aware about possible risks and consider they're fully acceptable.
Alex Yakunin
  • 6,330
  • 3
  • 33
  • 52
45
votes
3 answers

Examining a single changeset in Mercurial

In Mercurial, how do you examine a single changeset? hg log -l 5 will give me a summary of the newest 5 changesets, but how do I get a list of the files changed in one changeset? I don't want to do a diff.
hekevintran
  • 22,822
  • 32
  • 111
  • 180
45
votes
8 answers

Can I clone part of a Mercurial repository?

Is it possible to clone part of a Mercurial repository? Let's say the repository is quite large, or contains multiple projects, or multiple branches. Can I clone only part of the repository? E.g. in Subversion, you might have trunk and branches. If…
Nick
  • 27,566
  • 12
  • 60
  • 72
44
votes
1 answer

How do you remove a Mercurial repository

I accidently put a Mercurial repository in the wrong place. How do I remove it? This is in Linux.
Jon Cox
  • 10,622
  • 22
  • 78
  • 123