Size: 1016
Comment: added a note about -1 revision and nullid
|
Size: 1021
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
It is a strictly local ''convenience identifier'' for a [:Revision:revision]. It can be useful as it is shorter to type than the 40-digit hexadecimal string that uniquely identifies a revision. | It is a strictly local ''convenience identifier'' for a [[Revision|revision]]. It can be useful as it is shorter to type than the 40-digit hexadecimal string that uniquely identifies a revision. |
Line 9: | Line 9: |
Although all files have revision numbers, revision numbers are almost always used to identify a [:ChangeSet:changeset] within a given [:Repository:repository]. | Although all files have revision numbers, revision numbers are almost always used to identify a [[ChangeSet|changeset]] within a given [[Repository|repository]]. |
Line 13: | Line 13: |
Revision numbers referring to changesets are ''very likely'' to be different in another copy of a repository. ''Do not use them'' to talk about changesets with other people. Use the [:ChangeSetID:changeset ID] instead. | Revision numbers referring to changesets are ''very likely'' to be different in another copy of a repository. ''Do not use them'' to talk about changesets with other people. Use the [[ChangeSetID|changeset ID]] instead. |
Line 16: | Line 16: |
An empty repository (with no changesets) has a revision number -1, which corresponds to the '''nullid''' [:Nodeid:nodeid]. | An empty repository (with no changesets) has a revision number -1, which corresponds to the '''nullid''' [[Nodeid|nodeid]]. |
Revision number
A revision number is a small integer.
It is a strictly local convenience identifier for a revision. It can be useful as it is shorter to type than the 40-digit hexadecimal string that uniquely identifies a revision.
Common usage
Although all files have revision numbers, revision numbers are almost always used to identify a changeset within a given repository.
Pitfalls
Revision numbers referring to changesets are very likely to be different in another copy of a repository. Do not use them to talk about changesets with other people. Use the changeset ID instead.
Notes
An empty repository (with no changesets) has a revision number -1, which corresponds to the nullid nodeid. For example:
$ hg log $ hg status $ hg head changeset: -1:000000000000 tag: tip user: date: Thu Jan 01 00:00:00 1970 +0000