How to save username and password with Mercurial?

You can make an auth section in your .hgrc or Mercurial.ini file, like so: [auth] bb.prefix = bb.username = foo bb.password = foo_passwd The ‘bb’ part is an arbitrary identifier and is used to match prefix with username and password – handy for managing different username/password combos with different sites (prefix) You can also … Read more

Managing release branches in Mercurial

Here’s what I’d do: Make default your “mainline” branch. The tip of this branch is the “currently released to the public” version of your code. Critical bugfixes can be committed directly to this branch and merged into development branches. To start working on version 2.0, make a 2.0-dev branch. Commit changes for 2.0 to that … Read more

Mercurial Remove History

There is no simple / recommended way of doing this directly to an existing repository. You can however “convert” your mercurial repo to a new mercurial repo and choose a revision from where to include the history onwards via the convert.hg.startrev option hg convert –config convert.hg.startrev=1234 <source-repository> <new-repository-name> The new repo will contain everything from … Read more

how to ignore files in kiln/mercurial using tortoise hg “that are part of the repository”

I always use a combination of .hgignore and BeforeBuild (in the .csproj file) for things like this. In one of my pet projects, I have the following setup: App.config contains my real hardcoded user id and password for testing. App.config.example is identical, but with fake data like “dummy_user” and “dummy_pw”. App.config is not part of … Read more

With Mercurial, how can I “compress” a series of changesets into one before pushing?

The histedit extension is exactly what you are looking for. hg histedit -o or hg histedit –outgoing will bring up a list of the outgoing changesets. From the list you can Fold 2 or more changesets creating one single changeset Drop changesets removing them from the history Reorder changesets however you like. histedit will prompt … Read more