Show More
@@ -3137,30 +3137,32 b' def update(ui, repo, node=None, rev=None' | |||
|
3137 | 3137 | """update working directory |
|
3138 | 3138 | |
|
3139 | 3139 | Update the repository's working directory to the specified |
|
3140 | revision, or the tip of the current branch if none is specified. | |
|
3141 | Use null as the revision to remove the working copy (like 'hg | |
|
3140 | changeset. | |
|
3141 | ||
|
3142 | If no changeset is specified, attempt to update to the head of the | |
|
3143 | current branch. If this head is a descendant of the working | |
|
3144 | directory's parent, update to it, otherwise abort. | |
|
3145 | ||
|
3146 | The following rules apply when the working directory contains | |
|
3147 | uncommitted changes: | |
|
3148 | ||
|
3149 | 1. If neither -c/--check nor -C/--clean is specified, uncommitted | |
|
3150 | changes are merged into the requested changeset, and the merged result | |
|
3151 | is left uncommitted. Updating and merging will occur only if the | |
|
3152 | requested changeset is an ancestor or descendant of the parent | |
|
3153 | changeset. Otherwise, the update is aborted and the uncommitted changes | |
|
3154 | are preserved. | |
|
3155 | ||
|
3156 | 2. With the -c/--check option, the update is aborted and the | |
|
3157 | uncommitted changes are preserved. | |
|
3158 | ||
|
3159 | 3. With the -C/--clean option, uncommitted changes are discarded and | |
|
3160 | the working directory is updated to the requested changeset. | |
|
3161 | ||
|
3162 | Use null as the changeset to remove the working directory (like 'hg | |
|
3142 | 3163 | clone -U'). |
|
3143 | 3164 | |
|
3144 | When the working directory contains no uncommitted changes, it | |
|
3145 | will be replaced by the state of the requested revision from the | |
|
3146 | repository. When the requested revision is on a different branch, | |
|
3147 | the working directory will additionally be switched to that | |
|
3148 | branch. | |
|
3149 | ||
|
3150 | When there are uncommitted changes, use option -C/--clean to | |
|
3151 | discard them, forcibly replacing the state of the working | |
|
3152 | directory with the requested revision. Alternately, use -c/--check | |
|
3153 | to abort. | |
|
3154 | ||
|
3155 | When there are uncommitted changes and option -C/--clean is not | |
|
3156 | used, and the parent revision and requested revision are on the | |
|
3157 | same branch, and one of them is an ancestor of the other, then the | |
|
3158 | new working directory will contain the requested revision merged | |
|
3159 | with the uncommitted changes. Otherwise, the update will fail with | |
|
3160 | a suggestion to use 'merge' or 'update -C' instead. | |
|
3161 | ||
|
3162 | If you want to update just one file to an older revision, use | |
|
3163 | revert. | |
|
3165 | If you want to update just one file to an older changeset, use 'hg revert'. | |
|
3164 | 3166 | |
|
3165 | 3167 | See 'hg help dates' for a list of formats valid for -d/--date. |
|
3166 | 3168 | """ |
@@ -3682,11 +3684,11 b' table = {' | |||
|
3682 | 3684 | _('[-u] FILE...')), |
|
3683 | 3685 | "^update|up|checkout|co": |
|
3684 | 3686 | (update, |
|
3685 |
[('C', 'clean', None, _(' |
|
|
3687 | [('C', 'clean', None, _('discard uncommitted changes (no backup)')), | |
|
3686 | 3688 | ('c', 'check', None, _('check for uncommitted changes')), |
|
3687 | 3689 | ('d', 'date', '', _('tipmost revision matching date')), |
|
3688 | 3690 | ('r', 'rev', '', _('revision'))], |
|
3689 | _('[-C] [-d DATE] [[-r] REV]')), | |
|
3691 | _('[-c] [-C] [-d DATE] [[-r] REV]')), | |
|
3690 | 3692 | "verify": (verify, []), |
|
3691 | 3693 | "version": (version_, []), |
|
3692 | 3694 | } |
General Comments 0
You need to be logged in to leave comments.
Login now