Size: 304
Comment:
|
Size: 1636
Comment: moved from Update
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
The working directory is the top-level directory in a Repository, in which the plain versions of files are available to read, edit and build. Files in the working directory are usually from the ["Tip"], but may be from older revisions, or modified and not yet ["Commit"]ted. | The '''working directory''' is the top-level directory in a [:Repository:repository], in which the plain versions of files are available to read, edit and build. Files in the working directory are usually from the [:Tip:tip], but may be from older [:Revision:revisions], or modified and not yet [:Commit:committed]. A working directory has one or two [:Parent:parent] revisions. The parent revision or revisions will become the parent revisions of the new revision which will eventually be created by a commit of the [:LocalModifications:local modifications]. An [:Update:update] will change the parent revision, whereas a [:Revert:revert] will only modify the content of the working directory. A working directory will only have two parent revisions as the result of a [:Merge:merge]. A [:NamedBranches:branch name] can be set for the working directory. It’s useful to think of the working directory as "the [:ChangeSet:changeset] I’m about to commit". Mercurial tracks various information about the working directory (see DirState). There are several ways to see if an update of your working directory is needed (see related [http://www.selenic.com/pipermail/mercurial/2006-September/010951.html mailing list thread]): To see the delta between the working directory and the tip, do: {{{ hg diff -r tip }}} To see what patches would be applied to the working directory on an update do: {{{ hg log -r tip:. }}} If the working directory is at the tip (i.e., no update needed): {{{ hg id }}} will write "tip" after the changeset id. ---- CategoryGlossary |
Working directory
The working directory is the top-level directory in a [:Repository:repository], in which the plain versions of files are available to read, edit and build. Files in the working directory are usually from the [:Tip:tip], but may be from older [:Revision:revisions], or modified and not yet [:Commit:committed].
A working directory has one or two [:Parent:parent] revisions. The parent revision or revisions will become the parent revisions of the new revision which will eventually be created by a commit of the [:LocalModifications:local modifications]. An [:Update:update] will change the parent revision, whereas a [:Revert:revert] will only modify the content of the working directory.
A working directory will only have two parent revisions as the result of a [:Merge:merge].
A [:NamedBranches:branch name] can be set for the working directory.
It’s useful to think of the working directory as "the [:ChangeSet:changeset] I’m about to commit".
Mercurial tracks various information about the working directory (see DirState).
There are several ways to see if an update of your working directory is needed (see related [http://www.selenic.com/pipermail/mercurial/2006-September/010951.html mailing list thread]):
To see the delta between the working directory and the tip, do:
hg diff -r tip
To see what patches would be applied to the working directory on an update do:
hg log -r tip:.
If the working directory is at the tip (i.e., no update needed):
hg id
will write "tip" after the changeset id.