Daniel
Daniel

Reputation: 6765

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?

Upvotes: 3

Views: 490

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1123930

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.

Upvotes: 4

Related Questions