[PATCH 3 of 3 V4] update: mention how update can be used to cancel an uncommitted merge

Adrian Buehlmann adrian at cadifra.com
Tue Jul 10 14:34:24 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1341948378 -7200
# Node ID 4874c4d527ac59905ef5ec3c83a6bbd7dec03f3e
# Parent  d26dfa2182de1293781f91a0dee1836e764e9a32
update: mention how update can be used to cancel an uncommitted merge

Plain 'hg help update' now shows:

  $ hg help update
  hg update [-c] [-C] [-d DATE] [[-r] REV]

  aliases: up, checkout, co

  update working directory (or switch revisions)

      Update the repository's working directory to the specified changeset. If
      no changeset is specified, update to the tip of the current named branch
      and move the current bookmark (see "hg help bookmarks").

      Update sets the working directory's parent revison to the specified
      changeset (see "hg help parents").

      To cancel an uncommitted merge (and lose your changes), use "hg update
      --clean .".

      Use null as the changeset to remove the working directory (like "hg clone
      -U").

      If you want to revert just one file to an older revision, use "hg revert
      [-r REV] NAME".

      See "hg help dates" for a list of formats valid for -d/--date.

      Returns 0 on success, 1 if there are unresolved files.

  options:

   -C --clean     discard uncommitted changes (no backup)
   -c --check     update across branches if no uncommitted changes
   -d --date DATE tipmost revision matching date
   -r --rev REV   revision
      --mq        operate on patch repository

  use "hg -v help update" to show more info

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5719,6 +5719,9 @@
       3. With the -C/--clean option, uncommitted changes are discarded and
          the working directory is updated to the requested changeset.
 
+    To cancel an uncommitted merge (and lose your changes), use
+    :hg:`update --clean .`.
+
     Use null as the changeset to remove the working directory (like
     :hg:`clone -U`).
 


More information about the Mercurial-devel mailing list