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
104
votes
7 answers

Mercurial - all files that changed in a changeset?

How can you determine all the files that changed in a given changeset? I'm not looking for a diff in this case, just a list of add/remove/modifications. hg log -vprX does a list of diffs but I just want the files.
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429
102
votes
1 answer

How to get the remote server hg path?

I have created a remote repo to push my local changes over ssl. I did hg showconfig --debug to find my remote hg path but it's output is messy. Can someone point me how to exactly find it?
TED
  • 1,829
  • 5
  • 18
  • 36
102
votes
4 answers

How do I put a bunch of uncommitted changes aside while working on something else

If I have a bunch of uncommitted changes and want to set it aside while working on something else instead, and then later (f.i. after several days) come back to it and proceed working. What would be the easiest workflow to accomplish this? (So far I…
Erik
  • 4,268
  • 5
  • 33
  • 49
99
votes
3 answers

How to export revision history from mercurial or git to cvs?

I'm going to be working with other people on code from a project that uses cvs. We want to use a distributed vcs to make our work and when we finish or maybe every once in a while we want to commit our code and all of our revision history to cvs. We…
tatsuhirosatou
  • 25,149
  • 14
  • 39
  • 40
98
votes
2 answers

Consequences of using graft in Mercurial

There've been several questions recently about skipping changes when maintaining release branches in Mercurial. For example: Mercurial: Branch specific changes keep coming back after dummy merge Why are Mercurial backouts in one branch affecting…
Paul S
  • 7,645
  • 2
  • 24
  • 36
98
votes
1 answer

What is the git equivalent of of hg outgoing (hg out) or hg incoming (hg in)?

Possible Duplicate: How can I see incoming commits in git? What is the git equivalent of of "hg outgoing" or "hg incoming"? In Mercurial, hg outgoing lists the changesets that are newer than what's on the server and will be sent if I were to do…
Robert Martin
  • 16,759
  • 15
  • 61
  • 87
97
votes
2 answers

Virtualenv and source version control

I recently started a Django project and I quickly realized that virtualenv will be really useful for many reasons. I set up the virtualenv and my project, but now I wonder what file I should add to my source control (in my case, Mercurial). Should I…
Martin
  • 39,309
  • 62
  • 192
  • 278
96
votes
11 answers

With Mercurial, how can I "compress" a series of changesets into one before pushing?

Let's say I have a local and a remote Mercurial repository. Now, I start working on a feature. I work on it, and when I think it's done, I commit the changeset. Testing it a bit more, I find that I could further improve this feature by tweaking…
Lucas
  • 6,328
  • 8
  • 37
  • 49
95
votes
7 answers

Delete all local changesets and revert to tree

I'm using Mercurial and I've got into a terrible mess locally, with three heads. I can't push, and I just want to delete all my local changes and commits and start again with totally clean code and a clean history. In other words, I want to end up…
Richard
  • 62,943
  • 126
  • 334
  • 542
95
votes
4 answers

Git equivalents of most common Mercurial commands?

I've been using Mercurial but would like to do a quick demo of Git. What are the Git equivalents of: hg init . # start a project in the current directory hg addremove # look for any added or deleted files hg commit -m "comment" # commit any…
bouy
  • 961
  • 1
  • 7
  • 4
93
votes
6 answers

Why is branching and merging easier in Mercurial than in Subversion?

Handling multiple merges onto branches in Subversion or CVS is just one of those things that has to be experienced. It is inordinately easier to keep track of branches and merges in Mercurial (and probably any other distributed system) but I don't…
Nick Pierpoint
  • 17,641
  • 9
  • 46
  • 74
91
votes
3 answers

How to abort a merge in mercurial?

I goofed up a merge. I'd like to revert then try again. Is there a way to revert a merge before it is committed? hg revert doesn't do what I'd like, it only reverts the text of the files. Mercurial aborts my second attempt at merging and complains…
deft_code
  • 57,255
  • 29
  • 141
  • 224
87
votes
5 answers

How do you set the username that Mercurial uses for commits?

When I commit something in Mercurial like this: hg commit -m "username question" I see this output: No username found, using 'WindowsVistaAdmin@ChunkyMonkey' instead ChunkyMonkey is my Windows machine name and obviously WindowsVistaAdmin is the…
tent
  • 1,069
  • 2
  • 9
  • 9
86
votes
8 answers

Is it possible to browse the source of OpenJDK online?

Is it possible to browse the source code of OpenJDK online, just like I can do with SourceForge's projects? I never used Mercury before, so I felt confused. (Note: I don't want to download the source. I just want to browse it online, to see how some…
Hosam Aly
  • 41,555
  • 36
  • 141
  • 182
85
votes
5 answers

Mercurial: "untracked file in working directory differs from file in requested revision"?

Can anyone tell me what this Mercurial error means? untracked file in working directory differs from file in requested revision This occurred when doing an hg fetch: C:\myapp>hg fetch ssh://hg/myapp-v1 pulling from ssh://hg/myapp-v1 searching…
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429