2303
Comment:
|
2772
+added/removed/moved files
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a ["Repository"]. The act of creating a changeset is usually called a ["Commit"] or Checkin. The information in a changeset includes | ''(for a short intro of the basic concepts of Mercurial, see UnderstandingMercurial)'' A '''changeset''' (sometimes abbreviated "cset") is an atomic collection of changes to files in a [:Repository:repository]. The act of creating a changeset is usually called a [:Commit:commit] or checkin. The information in a changeset includes |
Line 6: | Line 8: |
* added/removed/moved files | |
Line 8: | Line 11: |
* the name of the branch ("default", if omitted or not set) | |
Line 9: | Line 13: |
Conceptually, each changeset has zero, one or two ["Parent"] changesets. It has two parent changesets, if the commit was a ["Merge"]. It has no parent, if the change is a root in the repository. There may be multiple roots in a repository (normally, there is only one), each representing the start of branch. | Each changeset has zero, one or two [:Parent:parent] changesets. It has two parent changesets, if the commit was a [:Merge:merge]. It has no parent, if the changeset is a root in the repository. There may be multiple roots in a repository (normally, there is only one), each representing the start of a branch. |
Line 11: | Line 15: |
If a changeset is not the ["Head"] of branch, it has one or more child changesets (it is then the parent of its child changesets). | If a changeset is not the [:Head:head] of a branch, it has one or more child changesets (it is then the parent of its child changesets). |
Line 13: | Line 17: |
Technically, the parent changesets of a changeset are retrieved from the revision history of the ["Manifest"]. Each changeset references a revision of the Manifest (see ["Design"] for the technical details). | Technically, the parent changesets of a changeset are retrieved from the revision history of the changelog file(s) in the repository (files {{{00changelog.i}}} and {{{00changelog.d}}} in {{{.hg/store}}}). Each changeset references a revision of the [:Manifest:manifest] (see ["Design"] for the technical details). |
Line 15: | Line 19: |
The ["WorkingDirectory"] can be ["Update"]d to any commited changeset of the repository, which then becomes the parent of the working directory. | The [:WorkingDirectory:working directory] can be [:Update:updated] to any commited changeset of the repository, which then becomes the parent of the working directory. |
Line 17: | Line 21: |
Committing changes in the working directory creates a new version of the manifest and a new changeset in the repository. The parent(s) of the working directory become the parents of the changeset. | Committing changes in the working directory creates a new revision in the manifest and a new changeset (a new revision in the changelog). The parent(s) of the working directory become the parents of the new changeset and the new changeset becomes the new parent of the working directory. |
Line 19: | Line 23: |
"Updating" back to changeset which already has a child, changeing files and then commiting creates a new child, thus starting a new branch. Branches can be named (see ["NamedBranches"]). | "Updating" back to a changeset which already has a child, changeing files and then committing creates a new child changeset, thus starting a new branch. Branches can be [:NamedBranches:named]. |
Line 21: | Line 25: |
A changeset is identified uniquely by a ["ChangeSetID"]. In a single repository, you can identify it using a RevisionNumber. | A changeset is identified uniquely by a [:ChangeSetID:changeset ID]. In a single repository, you can identify it using a [:RevisionNumber:revision number]. |
Changeset
(for a short intro of the basic concepts of Mercurial, see UnderstandingMercurial)
A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a [:Repository:repository]. The act of creating a changeset is usually called a [:Commit:commit] or checkin. The information in a changeset includes
- changes to the contents of the files
- added/removed/moved files
- changes to file names or other external attributes (such as execute permissions)
- information about who made the change (the "committer"), why ("comments") and when (date/time, timezone)
- the name of the branch ("default", if omitted or not set)
Each changeset has zero, one or two [:Parent:parent] changesets. It has two parent changesets, if the commit was a [:Merge:merge]. It has no parent, if the changeset is a root in the repository. There may be multiple roots in a repository (normally, there is only one), each representing the start of a branch.
If a changeset is not the [:Head:head] of a branch, it has one or more child changesets (it is then the parent of its child changesets).
Technically, the parent changesets of a changeset are retrieved from the revision history of the changelog file(s) in the repository (files 00changelog.i and 00changelog.d in .hg/store). Each changeset references a revision of the [:Manifest:manifest] (see ["Design"] for the technical details).
The [:WorkingDirectory:working directory] can be [:Update:updated] to any commited changeset of the repository, which then becomes the parent of the working directory.
Committing changes in the working directory creates a new revision in the manifest and a new changeset (a new revision in the changelog). The parent(s) of the working directory become the parents of the new changeset and the new changeset becomes the new parent of the working directory.
"Updating" back to a changeset which already has a child, changeing files and then committing creates a new child changeset, thus starting a new branch. Branches can be [:NamedBranches:named].
A changeset is identified uniquely by a [:ChangeSetID:changeset ID]. In a single repository, you can identify it using a [:RevisionNumber:revision number].
- Question: Is a changeset a particular state of the project (like a Subversion revision number), or is it a set of changes to files (like a Darcs patch)?
The way the changeset hash is calculated says that a changeset is a particular state of the project plus all of its ancestor states (i.e. all the changeset it took to get there). In Darcs that's a [http://www.darcs.net/manual/node7.html#SECTION00781000000000000000 tag].
See also: ["ChangeSetComments"]