Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial difference between changesets and revisions

I'm new to Mercurial and trying to understand how things work.

I wonder what is the difference between changesets and revisions ?

Thanks.

like image 905
Med Avatar asked Oct 26 '25 21:10

Med


1 Answers

I would say that there's a crucial difference between "changeset ID" and "revision number". They are related as @Edward pointed out. Still, based on Mercurial's FAQ they are not the same.

A revision number is a simple decimal number that corresponds with the ordering of commits in the local repository.

The important part is local repository and further:

It is important to understand that this ordering can change from machine to machine due to Mercurial's distributed, decentralized architecture. This is where changeset IDs come in. A changeset ID is a 160-bit identifier that uniquely describes a changeset and its position in the change history, regardless of which machine it's on.

You should always use some form of changeset ID rather than the local revision number when discussing revisions with other Mercurial users as they may have different revision numbering on their system.

From experience I can tell, revision numbers do differ sometimes and are not unique.

like image 55
NTobiasK Avatar answered Oct 29 '25 14:10

NTobiasK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!