mercurial

Mercurial outgoing Hook

I'm looking to create a Mercurial hook that pushes to a backup remote repository when I push to a local repository. I thought I could hook the 'outgoing' hook, but this creates a infinite loop that isn't pretty. So is there like a post-push hook, or would it be best to have the repository I am pushing to have an 'incoming' hook to push...

Best support now on windows: Mercurial or Git?

I want to change my current subversion setup to Mercurial or Git. I read about the two and I have a conflicted view about how well they work on windows. Alot of pages say Git is sub-par on windows, slow and badly integrated. And almost everyone say Mercurial is better. But some say Git now is better and Mercurial is behind. I check th...

Examining a single changeset in Mercurial

In Mercurial, how do you examine a single changeset? hg log -l 5 will give me a summary of the newest 5 changesets, but how do I get a list of the files changed in one changeset? I don't want to do a diff. ...

Mercurial hook to disallow committing large binary files

I want to have a Mercurial hook that will run before committing a transaction that will abort the transaction if a binary file being committed is greater than 1 megabyte. I found the following code which works fine except for one problem. If my changeset involves removing a file, this hook will throw an exception. The hook (I'm using ...

Backing up locally modified and new source files

I'm wondering how other programmers are backing up changes that are not under source control yet, be it new files or modified ones. I'm mostly referring to medium size jobs - hardly worth the effort of making a private branch, but taking more than a day to complete. This is not a vendor-specific question - I'd like to see if various pro...

How can I have my python file show its mercurial tag or revision as the module version?

I'd like to add a --version command line option to my python application that will show the right version depending on the tagged status of the command: If the file comes from a version whose short hex ID was abcdef01 that was tagged TAG, --version should show this: MyApp Version TAG (abcdef01) If the file comes from the tip, --versi...

Is this a good centralized DVCS workflow?

I'm leaning toward using Mercurial, coming from Subversion, and I'd like to maintain a centralized workflow like I had with Subversion. Here is what I am thinking: stable (clone on server) default (branch) development (clone on server) default (branch) bugs (branch) developer1 (clone on local machine)...

Scalable (half-million files) version control system

We use SVN for our source-code revision control and are experimenting using it for non-source-code files. We are working with a large set (300-500k) of short (1-4kB) text files that will be updated on a regular basis and need to version control it. We tried using SVN in flat-file mode and it is struggling to handle the first commit (5...

How to set up Mercurial with ssl/security

I've been following the hginit.com tutorial on how to use mercurial. Everything is going fine except it uses push_ssl=False. This does not work for my situation because I want pushes (and pulls if possible) to be secure. All the tutorials I've been able to find also use push_ssl=False. Can anyone give me pointers on how to set up ssl/sec...

Mercurial/.hgignore - How do I ignore everything but the contents of a folder?

I have a NetBeans project and the Mercurial repository is in the project root. I would like it to ignore everything except the contents of the "src" and "test" folders, and .hgignore itself. I'm not familiar with regular expressions and can't come up with one that will do that. The ones I tried: (?!src/.*) (?!test/.*) (?!^.hgignore)...

How to break connection between a clone repository and its parent

I have some (local) repositories, an original and some clones. The original repository has been corrupted so I'd like to get rid of it and use one of the clones as the master for future development. Is there a better way to break the connection between the new master and the original repository than simply deleting the default entry in...

How good is my method of embedding version numbers into my application using Mercurial hooks?

This is not quite a specifc question, and more me like for a criticism of my current approach. I would like to include the program version number in the program I am developing. This is not a commercial product, but a research application so it is important to know which version generated the results. My method works as follows: Ther...

How can I move all my modification to a branch

Hi, I create a working repository in HG. And I have modified some files. How can i move my all my modification to a branch (a branch that I have not created)? (kind of 'git stash' and the move the stash away change to a branch. Actually, I am not sure how I can do that in git either. If you know, I appreciate if you can tell me in git...

use hg to synchronize my project between my two computer

Hi: I have two computer : the desktop in my company and the portable computer in my home. Now I want to use the hg to synchronize the project between them using a "USB removable disk". So I wonder how to implement it? THe pro in my desktop is : D:\work\mypro. I use the following command to init it: hg init Then I connect to the U...

HG: Update a directory to a specific revision without cloning the whole repo?

Is it possible to update a directory to a specific revision without cloning the whole repository (local or on a central server) in Mercurial and how can I use it? This would be great, because to clone the whole repo first takes to much time for me and the folder really don't needs the whole repo. As example: default and the b2.3 branch f...

"No such repository hgadmin" while installing mercurial-server. Wtf?!

I'm trying to install mercurial-server, but getting such errors... $ hg clone ssh://hg@<domain>/hgadmin remote: mercurial-server: no such repository hgadmin abort: no suitable response from remote hg! I've just added my public key to keys/root and refreshed auth.. Anyone know what's the problem? ...

How to branch with TortoiseHG

I downloaded TortoiseHg 1.0 for evaluation. For the life of me I can't figure out how to make a branch. It seems to understand branches (e.g. in its repository browser) but I just can't seem to find a way to make a branch. This seems like such a fundamental capability since out of the often touted benefits of DVC is the lightweight br...

Corrupt mercurial repository - cannot update

Hi all, i think ive managed to corrupt one of mercurial repositories, is there anyway to recover the damage? the message i get when attempting to update the repo to my default branch is: PS C:\wco\projects\ims\code> hg up -C default abort: data/Trunk/application/models/priority_model.php.i@83dbdfb60981: no match found! when i run hg v...

How to monitor "check-in/push-es" to a central Mercurial repository?

If I set up a central Mercurial Repository where certain people are allowed to push to it, what convenient way can I monitor the changes going into that repository? I'm used to using SVN-Monitor for Subversion. It runs in the task-bar and lets me know whenever something new has been checked in to the repository. Is there a similar sol...

How do I keep my branches up to date with the 'default' branch under Mercurial?

Let's say I have the following workflow with Mercurial: stable (clone on server) default (branch) development (clone on server) default (branch) bugs (branch) developer1 (clone on local machine) developer2 (clone on local machine) developer3 (clone on local machine) fea...