[PATCH] expand and clarify help for update
Adrian Buehlmann
adrian at cadifra.com
Thu Oct 30 09:57:32 UTC 2008
On 28.10.2008 17:48, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1225212020 -3600
> # Node ID 4413349bda891b3cae2a9124f4dfd54172f9c1ca
> # Parent 08dc0152bb5e0d40eaa3d862a6a02e55b5e83d27
> expand and clarify help for update
>
Just for reference (in case anyone would like to continue where I stopped
working on this matter or use it somewhere else) the last state of the text
I had for this was:
def update(ui, repo, node=None, rev=None, clean=False, date=None):
"""update working copy
Update the repository's working directory (the "working copy") to
the specified revision of the repository or to the tip revision of
the current (named) branch if no revision is specified.
Specify 'null' as the requested revision to remove the entire working
copy (like 'hg clone -U'). However, untracked files are not removed.
If there are no uncommitted changes and there is no uncommitted
'hg merge', the working copy is replaced by the state of the
repository at the requested revision and the working directory's
(first) parent revision is set to that revision.
If the working directory's second parent is not null -- that is,
after an uncommitted 'hg merge' -- the update will be rejected (if
option -C was not used).
Use 'hg parents' to show the current parent revision(s) of the
working directory.
If the requested revision is on a different named branch, the working
directory's branch name will be switched to the branch name of the
requested revision.
Use option -C to discard all uncommitted changes (no backups!) and
to discard any uncommitted 'hg merge', forcibly replacing the working
copy with the state of the repository at the requested revision and
resetting the working directory's second parent revision to null.
If there are uncommitted changes and option -C is not used, and both
the working directory's (first) parent revision and the requested
revision are on the same branch and one of them is an ancestor of
the other, the requested revision will be merged into the uncommitted
changes (without setting the second parent, as on 'hg merge').
Otherwise, the update will be rejected with a suggestion to use
'hg merge' or 'hg update -C' instead.
If you want to change just one file to an older revision (without
changing the working directory's parents), use the revert command.
See 'hg help dates' for a list of formats valid for --date.
"""
More information about the Mercurial
mailing list