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

Mercurial and NTFS Alternate data stream

How does Mercurial handle Alternate Data Streams (in the NTFS file system)? If it can't handle that, is there a DCVS that does? EDIT: When I change version with update, what happens to the ADS ? Is it lost (erased)? Is it versioned too? Is it…
DonkeyMaster
  • 1,302
  • 4
  • 17
  • 36
6
votes
2 answers

In mercurial, is there a way to disable ALL configurations (system, user, repo)?

On any non-trivial hg installation, the hgrc's tend to contain significant stuff. Is there a way to completely ignore/bypass ALL configurations, from system, user, to repo-level? The use case is to use some hg core functionalities in some automation…
Geoffrey Zheng
  • 6,562
  • 2
  • 38
  • 47
6
votes
4 answers

Conditional Mercurial Ignore File

I have a file in mercurial that I want dev machines to pull the file, but I want the deployment server to NOT pull the file (it has special mods to it that the dev machines don't have). Is this possible, or should I just have a custom push to server…
Jan
  • 113
  • 1
  • 4
6
votes
1 answer

Is there a way to detect if changes from a branch has been indirectly merged with another?

Let's say we have three named branches A, B and C. Is there a (non ocular) way to detect that changes from C has made it into A? A ---------------------------- | \ / B | \------------/ | / C \---------/ -------
MdaG
  • 2,680
  • 2
  • 34
  • 46
6
votes
2 answers

Fastest way to check if the current directory is under mercurial?

I'm trying to speed up my zsh theme prompt and hg checks are a bit slower than git's. That result in a slower prompt to show when using the hg plugin. For git we use git rev-parse --is-inside-work-tree which is the standard and pretty fast. For hg…
dguay
  • 1,635
  • 15
  • 24
6
votes
2 answers

Close head without committing any change

I'm working on a project which is using mercurial and it's gotten into a bit of a mess with a number of heads which for all intensive purposes are dead. I want to kill off these heads and bring the commit graph back to a single line. I've been told…
Aaron Powell
  • 24,927
  • 18
  • 98
  • 150
6
votes
2 answers

version control for newbie

I'm fairly new to programming and web dev and up until now I haven't worked on any projects that I felt were large enough to warrant using proper version control. However, I am now working on a project that is getting bigger and bigger (very…
musoNic80
  • 3,678
  • 9
  • 40
  • 48
6
votes
2 answers

Will Mercurial automatically convert $Id$ to what Subversion does?

I am wondering if Mercurial by default converts $Id$ to the equivalent of Subversion which is something like this: test.php 110 2009-04-28 05:20:41Z dordal $. Does anyone know?
Darren
  • 10,631
  • 8
  • 42
  • 64
6
votes
1 answer

Mercurial update will overwrite my changes instead of merging

I am coming from CVS background. Currently, I have 2 mercurial repositories developed parallel. hello-world-bugfix and hello-world-feature (This one is being cloned from hello-world-bugfix) Now, I want to merge the bug fixed code from…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
6
votes
1 answer

"Hg to Hg (Gateway) to SVN" compared to "Git to Git (Gateway) to SVN"

Question is similar to this (unanswered) and this one (same problem not involving Git). The goal is to make Hg a front end for SVN for a period of time before transitioning fully to Hg. The setup should probably look like the one depicted below…
dm3
  • 2,038
  • 2
  • 17
  • 20
6
votes
2 answers

How to set the default push/pull repository from TortoiseHG

For one of my repositories, it doesn't remember the name of the repository I am pulling and pushing to. I don't have this problem with any of the other repositories on my machine. Is their any way to fix this?
Casebash
  • 114,675
  • 90
  • 247
  • 350
6
votes
2 answers

Cant merge: merging with a working directory ancestor has no effect

I have a windows machine with atlassian "sourceTree". The repo is synced to bitbucket. I have a linux machine synced to the same repo. The linux machine is on revision 138. I forgot to pull a revision, because the commit 138 on the linux machine…
Andreas
  • 6,612
  • 14
  • 59
  • 69
6
votes
2 answers

In Mercurial how do I extract a single file's changes from a Changeset to apply to another branch?

I have a large commit of many files on one branch, I need to transfer the modifications of a single file in that changeset to another branch. How can I do this? I am mostly using TortoiseHg but commandline solutions are also fine. If I go to the…
Sam Mackrill
  • 4,004
  • 8
  • 35
  • 55
6
votes
1 answer

Mirror a Mercurial repository into Subversion?

I am using Mercurial to develop a client project. After I've been working on this for 2 weeks, the client has now requested that I keep all code in their SVN repo. I want to continue to use Mercurial for development, but to keep the client happy,…
Jon L.
  • 2,292
  • 2
  • 19
  • 31
6
votes
1 answer

Mercurial: make `hg log` not show files?

I'm (ab)using Mercurial to manage thousands of files that change often, but I'd like to be able to view the log (hg log) without having my term filled with all of the filenames that changed on each commit. hg log -q is a little too quiet, since I…
erjiang
  • 44,417
  • 10
  • 64
  • 100