mercurial

hg: how do I push newly created branch back into central repository?

I cloned the centeral repository via hg clone my_project my_project_1 then after switching to a newly created repo I marked as a new branch hg branch v1 While inside the new clone I issued hg ci -m "branch created" but when I tried to push the changes back to the original repository I cloned from I got this error: abort: push...

Is it true in Mercurial (hg), the same as Git, that a revision you committed may only have code not modified by you? (a merge)

Seems like in SVN, when you do a merge, there won't be a revision checked in by you. All your "commits" should only have code that is changed by you. But in Mercurial, that's not the case. Your "merge" commits are committed by you, but they usually contain changes that are made by other people. And if that commit triggered an error i...

Is there a way to show visual diff from a Mercurial Web Server?

A Mercurial Server can be started up just by hg serve and going to localhost:8000 but the diff is a text type of diff. I wonder if there is any way to get a visual diff right from the server (probably by clicking on a file or a changeset), the type of visual diff that is like on kdiff3 or Tortoise SVN diff. If it can be done, tha...

Which version of GUI Mercurial would be some of the best on a Mac and a PC?

It seems that on the page http://mercurial.selenic.com/wiki/OtherTools TortoiseHg is recommended most for a PC and MacHg is for the Mac. What are some experience of using them if somebody can share? It seems that Murky for Mac need compilation and sometimes it needs a bit of work. I was also thinking of setting up a virtual mac...

working on history changesets

Hi, I'd like to know if it is possible to aggregate some changesets into one. Let's say, i have a repository looking like that: default tip stable 1.2 added new project file added new project sources added new project data ... I'd like it to be: default tip stable 1.2 added new project ... Basically i'd like changeset "added new...

Why I can switch to a branch after closing it?

I discovered today that I can switch back to a branch even after I closed it. Why? hg init abc cd abc echo 'readme1' > README1.txt hg ci -Am "1st commit" hg branch other-branch echo 'readme2' > README2.txt hg ci -Am "2nd commit" hg update default hg merge other-branch hg ci -m "Merged other-branch into default" hg update other-branch ...

Pushing and new heads in mercurial

Hi, I'd like to see what exactly would be created during a push, if I get the abort: push creates new remote heads! error. How can I check that? Some more details: I'm pulling from one repository (upstream) and pushing to a local fork which does have additional branches, but already contains all upstream ones. Also, I'm only pushing one...

Which files in a Java Netbeans project should be placed under version control?

I'm working on a Java Netbeans 6.7 roject with a few developers and we're using Mercurial for version control. I was wondering what I should put in the .hgignore file (ie. what files should not be added to the repository). I know I will definitely want the src, test, and lib folders in the repository and the build folder to not be in the...

Can I delete repositories from mercurial-server?

I made a repository as a test a while ago but I now want to create a different repository with the same name - is there a way to delete an existing repository using mercurial-server, and create another one with the same name? Or perhaps a way to overwrite the contents of a repository? ...

In Mercurial (Hg), what is a good way to list all files modified by me since revision 4822?

I may do development work for 2 weeks before one or two features get pushed to all the production servers, and since this is a Ruby on Rails project, many files can be modified. So using Mercurial as the source control, is there a good way to list all filenames that are modified (or added) by me, between the current version and revision...

How to manage multiple versions of a product with Mercurial?

My company's product is module-based, meaning we ship with five base modules and users can purchase additional ones. We're using Mercurial, to which we are relatively new, for our source control, and since we've released 1.0 of our product, managing the separate module development has been a nightmare. We want to be able to release mino...

Choosing a Mercurial hosting.

I'm looking for a Mercurial hosting which is free. (I'm only a student right now.) And it seems like it boils down to Bitbucket or Project Hosting on Google Code. (Other suggestions are welcome.) So, how do these services compare in terms of features and service? This question does not ask for a subjective opinion, just a feature-set a...

mercurial: "Cloning" just one file from one repository into another one?

I've got a perl project's mercurial/hg repository here with a lot of modules. Now, I've realized that some of the modules, a branch of modules, does not fit into this project anymore but would be better suited in another project. So, is it possible to "clone" these modules from repository1 into my other repository2 while keeping these m...

How to prevent a file from automatically merging when switching branches in Mercurial?

Let's say I have two branches named default and newfeature. I have a file called readme.txt in both branches. I'm working on the newfeature branch and I make a change to readme.txt. If I run hg up default without committing the change, Mercurial automatically merges the version of readme.txt in newfeature directly into default. How can ...

Using different "paths" in Mercurial - also called branching

Is it possible to have different development "paths" from a given point in Mercurial, without having to clone my project? I currently have 2-3 different implementations options for a project and I'd like to try them out. If I could just use one and at any point come back and start in another "path" without losing data from the older one ...

I am trying to use mercurial and the perfarce extension to check out and getting an error.

I am trying to use the "Perfarce" extension to Mercurial to create an hg repository (working copy) that is managed by mercurial, with a link to check out and in to a central perforce server "depot". The help says to enter a command like this: hg clone p4://hostname:portnumber/userid When I do this, it creates a folder under my current...

How can I diff two arbitrary revisions in Mercurial in such a way that I can apply the diff to an SVN working copy?

The system of record is an SVN repository, but for whatever reasons, I've pulled the repository into Mercurial. I don't want to use the hgsubversion extension because it doesn't recommend creating extra clones and branches and so forth. I would like to be able to do my own development in Mecurial however I wish and then apply a giant pa...

Locking a mercurial branch before release

How do I lock the entire branch of a mercurial? I get this requirements normally before the release... ...

hg transplant fails - how do I 'fix up the merge' as it suggests?

Hopefully the graph below will help illustrate my current position. My branch2274 was branched from default. Rev. 415 was the first commit and it shares an ancestor with the rev. 412 on the default branch. Branch2274 is a bug fix which needs merging into default soon BUT I did a very silly thing - I merged in changes from a feature b...

Mercurial <--> git cheat sheet?

Is there a cheat sheet or wiki page out there which relates hg commands to git commands, and vise-versa? I'd like to know for two reasons: first, I'd like to be able to translate git-speak[0] into Mercurial, and second I'd like to be aware of the subtle differences between similar-sounding commands (eg, hg pull and git pull). [0]: case...