mercurial

Would Mercurial help me work from 2 PCs?

I currently use Perforce for source control, but want to start working on the code from 2 different PCs at the same time (desktop and laptop). The laptop would not be able to access the perforce server very often, which makes Perforce a poor choice in this setup. Distributed source control tools like Mercurial seem better suited to the ...

Error setting up Mercurial on Windows Server 2008

Hello, I want to set up a Mercurial SC server and have been following the instructions found here: http//stackoverflow.com/questions/818571/how-to-setup-mercurial-and-hgwebdir-on-iis I have checked all my settings multiple times and cannot seem to get passed this error after completing the configuration. Any advice would be helpful. T...

How does Mercurial stack up against GIT and SVN?

With Phil Haack and others recently tweeting about CodePlex's move to support Mercurial as a DVCS, I thought it might be worth a look. As someone who currently uses SVN for personal projects and TFS at The Office, how does Mercurial compare in terms of usability, features and what are some of the better Mercurial hosting services availa...

Mercurial - How to set "hg diff" output shows in gvim?

I use mercurial and I want to see modified change in Vim or GVim. Normally there is hg diff which show the modified changes in diff format. but I want to see it in Vim as the original version and modified version side-by-side. I try extdiff in http://mercurial.selenic.com/wiki/ExtdiffExtension but it doesn't work and gvim open some blan...

Mercurial workflow for private branches with multiple machines, serving a single central repo

I have an svn repo, and I'd like to use Mercurial as a front-end to it. I've been testing hgsubversion and it seems pretty good. I commonly have to switch between machines while writing and testing code, and I'd like to be able to check my stuff in (on a branch, mq, not sure yet) in such a way that I can get it on the other machines, e...

How do I split work into multiple patches with mercurial queues?

If I've been churning away at the code for a while, and forgotten to create a patch series as I go, how do I create the patch series retrospectively? So far the only thing that comes to mind is: # Prepare and test the first batch of changes. $ hg qrecord -m 'first batch' 1.patch $ hg qnew -m 'stash downstream changes' stash-1.patch $ hg...

How can I commit a set of files only once in Mercurial?

I have some files I'd like to add to have them as a "backup". The thing is, I'd like to commit them only one time, and then, I'd like for Mercurial to don't track them anymore ( don't notify me if they're changed, and don't commit them on other commits ). Basically, something like this: hg add my_folder hg commit -m "added first versio...

Mercurial: delete all local changesets, revert to tree

So 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 with (a) exactly the same code locally as exists in the tip of the remote branch and (b...

textmate mercurial bundle - push not working

Hi, not really a programming question, but I cant find anywhere else to ask it and there is bound to be someone in here using this as well. I got the mercurial.tmbundle installed and everything seems to be working fine with the exception of "Push to default repo" I have a default repo setup (bitbucket) and just using the command hg pus...

Folders not being added in Mercurial

I looked at this question: http://stackoverflow.com/questions/310117/ignoring-folders-in-mercurial that mentions how to ignore a folder, but that's not what I need. I'm using TortoiseHG and after I "add" all my folders, they show still as "?" instead of "+". The files within them show "+", but the folders themselves just show "?". Is th...

Buildout: Including another Python project via mercurial?

I have a project called Foo/ that has buildout.cfg and setup.py. Now there is another project called Bar/ .. which too has buildout.cfg and setup.py. Since Bar/ depends on various Python modules, it has install_requires=['lxml', 'SQLAlchemy'] in its setup.py. Foo/ depends on Bar/. But Bar/ does not have a release yet. How do I include B...

Mercurial: warn when adding files which would otherwise be ignored?

How can ask Mercurial to warn me before I add files which would otherwise be ignored? For example, something like: $ hg add foo.o warning: adding ignored file foo.o There seems to have been a patch submitted to the mailing list: http://www.selenic.com/pipermail/mercurial-devel/2008-February/004993.html But I can't find any further r...

How can I switch to a tag/branch in hg?

Hi, I have followed the documentation in https://developer.mozilla.org/En/Developer_Guide/Source_Code/Mercurial And I have download FF source using this: hg clone http://hg.mozilla.org/mozilla-central/ src But how can i switch to the FF3.6 'branch' or 'tag'? The documentation said 'hg clone http://hg.mozilla.org/releases/mozilla-1.9.2...

Would an additional "push -f"/backup-only Mercurial repo work?

We've set up our own Mercurial workflow which works great for us. However I'm wondering about something: is it possible to create some "junk" repository that would basically be a place where every user could always "push -f" their changesets and where we'd never do anything besides "push -f"? That is: the goal of that repository would ...

WebDAV auto-versioning in Git or Hg or any modern VCS

I just recently learned of SVN's auto-versioning feature for WebDAV. Although I understand this is not replacement for proper versioning, with messages documenting change sets, it strikes me as a solid and safe replacement to Dropbox (minus nice GUIs and web pages). However, since commits in auto-versioning are frequent, I'd imagine that...

How can i recover a removed file in Mercurial (if at all)?

Accidentally, and by using a GUI as opposed to CLI, i removed every file in a project in Mercurial. I recovered with Revert ok and lost some work, which as i have time machine i could easily get back. But is there a way of un-removing/un-deleteing such files? Trawled through the manual and googled but cannot see anything. Any plugins? ...

Undo a remove action in Mercurial

Suppose that I have made some changes in the working directory and accidentally marked several files (that include some of the modified ones) for removal. How do I unmark the files for removal without losing the changes I have made? ...

mercurial - I want to add some custom code to be run after commit

Hi - where could I place code to be run after every commit I make with mercurial? Specifically, I would like to maintain a file called latest inside the .hg folder in the root of my project - that file will hold the revision number and hash code for the most recent commit. On that same topic, how can I get those in python? # get mercu...

Putting changesets into a new branch in Mercurial

I'm having the following problem: I commited two changesets into the default branch, but now I think I should put them into a new branch. That means I want to branch of from the revision before these changes happened, put those changesets into the newly created branch and erase them from the default branch's history. What's the best way ...

mercurial .hgignore - won't ignore files...

Hi - I'm trying to ignore a file in my project with .hgignore, and just can't figure it out. The file is located in app/views/patterns/_changes.erb (relative to the root of the project, where .hgignore is), and nothing I try seem to work: #.hgignore syntax: glob app/views/patterns/_changes.erb *changes.erb public/files/* # this works ...