Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does version of Mercurial matter?

Tags:

mercurial

I was given a clone of a Mercurial repository and I don't know what version of Mercurial the repository was created on. Are all Mercurial repositories backwards compatible? I.e. can I install the latest version of Mercurial on my machine and be able to interact with the repository OK or could there potentially be issues not knowing the version of Mercurial the repository was created under?

like image 851
BestPractices Avatar asked Nov 14 '11 19:11

BestPractices


2 Answers

I write blog post on this topic:

  • http://brain-break.blogspot.com/2011/09/new-mercurial-repository-format.html
  • http://brain-break.blogspot.com/2009/09/new-mercurial-repository-format-fncache.html

Shortly currently new HG version can operate on old repositories locally but revert sentence false.

The wire protocol does not change across HG versions so you can clone, pull, push from any version of HG to any version of HG that run on http:// and ssh:// protocols.

If you access a repository on your local filesystem and it is not supported, you get error message like:

abort: requirement 'fncache' not supported!

This controlled by keywords from requires files:

  $ cat repo/.hg/requires
revlogv1
store
fncache
dotencode
like image 81
gavenkoa Avatar answered Sep 29 '22 12:09

gavenkoa


The Mercurial developers go to great lengths to insure backwards compatibility.

Changes that could affect compatibility are listed in UpgradeNotes as well.

like image 43
Tim Henigan Avatar answered Sep 29 '22 12:09

Tim Henigan