mercurial

Is there an hg equivalent to git-mv?

I have a file foo.py with some history. I want to rename it bar.py but see the history with "hg log". I tried "hg rename". It does not seem to maintain the history. FYI. I only browsed the man page. Thanks in advance! Thanks for the answer. As an addendum, if foo.py is 500 KB, will a rename increase the size of the repository ...

Prevent commits to closed branches

How can I configure a Mercurial server to restrict commits to a named branch once it has been closed? I only want the repository administrator to have the ability to reopen the branch. http://mercurial.selenic.com/wiki/PruningDeadBranches says that closed changesets can be identified by "close=1 in the changeset's extra field". It's not...

Why does Mercurial's ssh:// URL use two slashes before the path?

Example Mercurial URL: ssh://myhost//path/to/repo Why two slashes? The hostname is already specified. Why it does not work like http://myhost/path/to/page where only one slash is sufficient? ...

How to change credentials for Hg repository in Eclipse?

This is exactly the same case as this one, but with Hg instead of SVN. I have MercurialEclipse installed, and I have changed the password of my remote repo. Now when I synch it fails. I have not found any conf file in "C:\Documents and Settings\%USER%\Application Data..." about Hg. I have deleted the .keyring eclipse file and restarted...

Can I disable Mercurial cloning/pulling over HTTP?

We're using Mercurial on our production servers for some smaller web projects to easily deploy applications by pushing changes to the server over SSH. The repositories reside in the public_html folders of their respective accounts. Now if I do a hg clone http://www.domain.com I get real URL is http://www.domain.com/ requesting all c...

Is there a children command to complement the parents command?

Mercurial provides the command parents to examine a given revision's parent(s). This can easily be used to Traverse the DAG backward. I need to traverse the DAG forward. Is there a hg children command? ...

Removing changesets or shrinking a Mercurial repository

How do I can shrink a mercurial repository, removing too old changesets? ...

How can I use vim not vi to write commit message?

When I do hg commit, it use vi as my default editor, how to change it to vim? ...

Which DVCS work best with Subversion repositories

Subversion works great when we have access to central repository, but sometimes two or more developers work at client where they do not have connection to central repository. I am looking for DVCS that can help us where off-line. It should: cooperate with Subversion repository so developers can checkout before leave, commit locally wh...

In Mercurial, is there any way (aside from "Cherry picking") to push a changeset without also pushing changesets associated with a different head?

In the answer to this question, Ry4an states that "you cannot push Changeset2 without pushing Changeset1". This certainly makes sense if the repository looks like this: + Changeset2 | + Changeset1 | + Original However it doesn't seem to make as much sense in the following scenario, which is what I currently have: + Changeset2 | | ...

A mercurial merge chose the wrong changes, what is the correct way to fix this?

Changes were made to our .vcproj to fix an issue on the build machine (changeset 1700). Later, a developer merged his changes (changes 1710 through 1715) into the trunk, but the mercurial auto-merge overwrote the changes from 1700. I assume this happened because he chose the wrong branch as the "parent" of the merge (see part 2 of the qu...

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 commited. 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 original merge is still uncommited. Is there a way to undo a merge after an hg merge com...

No changes are pushed when using hg-git

I'm trying to get the hg-git extension working under Windows and after hours of fiddling, I finally seem to have it working. However, nothing shows up in my git repository even though the output of hg push reads: importing Hg objects into Git creating and sending data github::refs/heads/master => GIT:8d946209 [command completed succ...

Hg post-merge commit message, best practice?

I find myself doing the following a lot: C:\Code>hg pull pulling from http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching for changes adding changesets adding manifests adding file changes added 2 changesets with 4 changes to 4 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) C:\Code>hg merge 4 files upda...

Git and Mercurial - can someone explain this test result

I was doing a comparison on speed for GIT and Mercurial. I choose a big project of 9072 files (mainly php files and several images) with a size of 95.1 MB. This is a fake project, and maybe give someone the idea on how to explaing the results I got - it is a wordpress download, unchanged, and copied 12 times inside two folders - one for...

Mercurial color extension in Windows Powershell

Is there a way to enable color support for Mercurial in Powershell on Windows 7? The ColorExtension page says to add [color] mode = win32 to your .hgrc file, but it doesn't seem to make a difference. Running hg status shows several files that have not yet been added to the repository, and I believe they should have a pink color (bas...

Mercurial: How do I find the creator of a file?

ATM I do it this way which is far slow and incorrect: for i in `find -type f`; do echo $i`LANG=C hg log -v $i | grep user | tail -1 | awk '{print " "; print $2}'`; done When someone has moved a file to a new name, yes he is the creator of that new file, but not of the code which he moved. I could extract the revision number out of t...

Submitting Hg changes back to SVN

Hi, I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with hg clone. Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and we occasionally pushed the changes, and hence I had to pull them. hgsubversion...

Mercurial and SQL Server Management Studio GUI plugins?

Does no such plugin exist? So to be clear, I realize that RedGate has their own SSMS SCC app, and I realize that VSS2k5 will integrate in. I'm looking to stay with Hg as that's where my source already is, and I'ld like to find something that my team can stay consistent with on their tools. As is, I guess I'm going to have to just run ...

Vendor Branching, Mercurial Style?

The scene: A purchased web application, with regular updates from the vendor. We then, heavily customize the look and sometimes add our own functionality or fix a bug before the vendor gets to it. For version control, we have been using Subversion following their “Vendor Branch” model each time we received a new release. This has the ad...