Mercurial: Can I rename a branch?

Update to the stiging branch and create a new branch off of it. Then close the old branch. In summary: hg update stiging hg branch staging hg commit -m”Changing stiging branch to staging.” hg update stiging hg commit –close-branch -m”This was a typo; use staging instead.” hg push –new-branch

Comparison between Centralized and Distributed Version Control Systems [closed]

From my answer to a different question: Distributed version control systems (DVCSs) solve different problems than Centralized VCSs. Comparing them is like comparing hammers and screwdrivers. Centralized VCS systems are designed with the intent that there is One True Source that is Blessed, and therefore Good. All developers work (checkout) from that source, and then … Read more

Hg: How to do a rebase like git’s rebase

VonC has the answer you’re looking for, the Rebase Extension. It is, however, worth spending a second or two thinking about why neither mq nor rebase are enabled by default in mercurial: because mercurial is all about indelible changesets. When I work in the manner you’re describing, which is nearly daily, here’s the pattern I … Read more

Locking binary files using git version control system

Subversion has locks, and they aren’t just advisory. They can be enforced using the svn:needs-lock attribute (but can also be deliberately broken if necessary). It’s the right solution for managing non-mergeable files. The company I work for stores just about everything in Subversion, and uses svn:needs-lock for all non-mergeable files. I disagree with “locks are … 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

Mercurial — revert back to old version and continue from there

Here’s the cheat sheet on the commands: hg update changes your working copy parent revision and also changes the file content to match this new parent revision. This means that new commits will carry on from the revision you update to. hg revert changes the file content only and leaves the working copy parent revision … Read more

tech