mercurial

Mercurial: Fix a borked history

So working on a project recently (by myself - no other developers), I somehow managed to seriously bork the history with some (apparently) bad merges from cloned repositories. What I would like to do - need to do - is fix this by just deleting the last 8 commits (according to hg glog) Yes, I have made a few changes to the code after th...

how can I override .hgrc options on the command line

I typically want to ignore white space changes when diff'ing with mercurial. If I set this as a default by putting ignorews = true in my .hgrc's [diff] section then there doesn't seem to be a way to force the display of white space changes for a single invocation on the command line. What am I missing? FWIW: None of the relevant command...

Mercurial and the Trunk folder

I'm new to Mercurial. I'm used to use subversion. There was a habit of using trunk as the main folder for an project. When I create a new repository in Mercurial, should I name the default branch as Trunk ? ...

How do you setup the convert extension in Mercurial in windows?

Hello, I have just installed mercurial (command line only...this is not TortoiseHG) onto a Windows SErver 2003 machine and the documentation mentions a convert command that will allow me convert an svn repo to hg. But when I try to run hg convert the command is not recognized. I googled it and it says that I need to install the "conve...

Can Mercurial use .hgignore to forget files?

I forget to place the correct .hgignore into my project and am now confronted with many useless files in my repository. As these files are already under source control .hgignore will not pick em up. Is there a way for hg to forget all files matched by .hgignore? ...

How can I remove some commits in Mercurial that were applied to the wrong branch and then replay them on the correct one?

My colleague has committed twice on his repository on the wrong branch. What is the most effective way to take those two commits, get rid of them and then commit them correctly under the right branch? (the changes have not been pushed) We'd ideally like a way to do this from within TortoiseHG but of course, we'll use the command-line i...

Tracking branches for Mercurial

As a Git user, I find it inconvenient to set up multiple directories for multiple Mercurial remote repositories, as I want to quickly switch between them, especially when working in an IDE. I'm trying to somehow replicate the remote branches system from git, where I can simply switch between branches and push to the one I choose. How c...

DVCS with "named commits"

Hi, I'm looking for a DVCS which would allow me to use something like a "named commit" -- similar to what patch queues achieve, but not quite... (I'll compare only to mq and stg, since I don't know of any other similar ones) Patch queues are close, but I'd like those features: Creating new branch in the repository, branches also the p...

How do you get hgsubversion working?

The online documentation for hgsubversion sucks, IMO (I hate to say that). I've been following the instructions in the Quick Start. What have I done? I installed Mercurial: D:\repos\experimental>hg --version Mercurial Distributed SCM (version 1.6) I installed TortoiseHg to match the Mercurial version. I downloaded the hgsubversion r...

How to use `hg cat` from an empty working directory?

I have a repo located at x:/projects/repo1. The working directory has been emptied using hg update null. I want to extract the latest version of some files from there to a local directory. I tried this: x:\projects\repo1> hg cat -o c:\sql\%s scripts\*.sql -r tip I get this error: scripts\*.sql: No such file in rev 14f07c26178b T...

Using Mercurial to start a new project similar to an existing one

I have a project on a Mercurial (HG) repository. I am about to start a new project that I would like to start by using the exact same code as the mentioned project. The two projects are completely unrelated. Even though they do similar stuff, each one is for a different client, carry different names, different branding, different art. M...

Remove all deleted files in next commit with Mercurial

Let's say I have the current status: M File1.cs M File2.cs M File3.cs ! File4.cs ! File5.cs ! File6.cs How do I bulk remove files 4, 5, 6 (!) from the next commit? At the moment, I am just removing them manually before committing, like such: hg remove File4.cs hg remove File5.cs hg remove File6.cs But is there a way to remove the...

HgScc tutorial?

Does anyone know of a tutorial or guide for HgScc (Mercurial)? I've installed and integrated HgScc with VS2010, but having never used any source control other than TFS, I'm not all that sure what I'm doing. For instance, I've committed more than one version of a file but Revert is still greyed-out in the context menu. And how do I assi...

MSSCCI compliant Mercurial client

Hi I am looking into a Microsoft Source Code Control Interface (MSSCCI) compliant Mercurial Client for integrating Mercurial into my IDE (LabVIEW). I thought HgSCC was getting close since it claims it uses the MSSCC interface for it's integration with Visual Studio, however it doesn't turn op in LabVIEW as an option. Does anybody know a...

STDOUT of hg commands running through hstart to a file?

Hi ALL, I am using hstart to hide command prompt window when hg command runs. I want to store stdout/stderr of hg commands in a file but it is not working.. hg update >log.txt 2>&1 This works but when I use it with hstart like hstart "hg update"> log.txt 2>&1"" I get an empty log file.I tried changing sequence of 2>&1 befor log.txt ...

Mercurial: Convert clones to branches

I am trying to clean up some cloned repositories I have, basically converting clones into named branches. What's the easiest way to do this? ...

hg serve in MacHg

Hi guys, I tried to find it in documentation, but couldn't, how can I run Mercurial server (as hg serve in terminal) from MacHg, is it possible at all? I'm on Mac 10.6 if it's important. thanks. ...

Mercurial - Empty Commit Message

Is there a way to configure Mercurial to allow for empty commit messages? If you try hg commit through the CLI without entering a commit message, the commit is canceled with: abort: empty commit message. Now, I know that committing without a message is usually considered bad form, but does Mercurial allow it at all? ...

How do I use Mercurial to merge in changes made outside the repository?

I joined a team with greenfield code. When I joined, they did not have a common repository, and they emailed me a tarball of his latest. (yeah, I know...) I've been working off that tarball, making changes and adding files. Now the team has a Mercurial repository (hooray!), and it's been populated with the same code containing more recen...

Mercurial: restore files

I'd like to restore a file that has been deleted in some commit, and restore it under a different name, so that it shares the history. In subversion, I'd do svn cp src@REV dest i.e. use peg revisions. What's the equivalent in Mercurial? ...