Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In hg clone, what's the difference between "adding changesets", "adding manifests", and "adding file changes"?

From the Mercurial documentation:

The manifest is the file that describes the contents of the repository at a particular changeset ID https://www.mercurial-scm.org/wiki/Manifest

When cloning a Mercurial repository, I see lines of output saying:

adding changesets
adding manifests
adding file changes

I don't understand the difference between these things. I thought I understood what a changeset is, but I don't know how it would be different from a set of "file changes". And based on the description above, a manifest sounds like the same thing. So what's the difference between all of these?

like image 369
Daniel Avatar asked Jan 20 '26 05:01

Daniel


1 Answers

Mercurial divides the information you need to keep track of in a versioning system into several levels:

  • Changesets -- the metadata about each revision. Who (author), when (date and time), why (the summary text) and what (the affected filenames), etc. is stored here.
  • Manifests -- each manifest lists the file revisions for the files at a given revision. This is like a linking table in a database; the file contents are not contained, only what version of a given file is part of this revision.
  • The file changes -- These files store the actual file data. It is inefficient to store each version ever produced of a given file entirely formed. Instead, this stores file data in a delta compression form; changes between versions are stored, with the occasional full copy to aid faster restoring to a version.

All 3 levels need to be copied into your repository from the remote server when cloning.

See the Mercurial Wiki Design page for details.

like image 156
Martijn Pieters Avatar answered Jan 21 '26 22:01

Martijn Pieters



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!