[PATCH 3 of 3 V4] update: mention how update can be used to cancel an uncommitted merge
Adrian Buehlmann
adrian at cadifra.com
Thu Jul 12 06:20:01 CDT 2012
On 2012-07-12 10:21, Martin Geisler wrote:
> Adrian Buehlmann <adrian at cadifra.com> writes:
>
>> # 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
>
> I've queued patch 1 and 3 for stable, but left patch 2 for now as
> explained in a reply to the V3 patchbomb.
I see you have pushed 71e36b3d2cc4 to stable
http://hg.intevation.org/mercurial/crew/rev/71e36b3d2cc4
So this is basically what I sent earlier (but pushed to crew stable),
which Matt (indirectly) responded to with:
On 2012-07-10 01:01, Matt Mackall wrote:
> On Mon, 2012-07-09 at 13:07 -0500, Kevin Bullock wrote:
>> On Jul 9, 2012, at 11:57 AM, Adrian Buehlmann wrote:
>>
>>> # HG changeset patch
>>> # User Adrian Buehlmann <adrian at cadifra.com>
>>> # Date 1341852954 -7200
>>> # Node ID 446f1216a5beafc8063055fdabdd1542b3efde4c
>>> # Parent 5d6cbfa975bf2ad0a7b005287617e91e4c38b7b3
>>> update: mention how update can be used to cancel an uncommitted merge
>>
>>
>> +1
>
> I guess this is fine. But I want to strike a balance between help size
> and usefulness. I think we need to move some stuff into the verbose
> section.
So this is not done yet (moving some stuff into the verbose section).
What has been pushed now to crew so far for update has again increased the
help size without moving anything into a verbose section.
I specifically prefer to *not* put the:
To cancel an uncommitted merge (and lose your changes), use "hg
update --clean .".
into a verbose section (which is the case now, as there is no verbose
section on upate anyway).
I would still prefer to put the parts:
If the changeset is not a descendant or ancestor of the working
directory's parent, the update is aborted. With the -c/--check option,
the working directory is checked for uncommitted changes; if none are
found, the working directory is updated to the specified changeset.
The following rules apply when the working directory contains uncommitted
changes:
1. If neither -c/--check nor -C/--clean is specified, and if the
requested changeset is an ancestor or descendant of the working
directory's parent, the uncommitted changes are merged into the
requested changeset and the merged result is left uncommitted. If the
requested changeset is not an ancestor or descendant (that is, it is
on another branch), the update is aborted and the uncommitted changes
are preserved.
2. With the -c/--check option, the update is aborted and the uncommitted
changes are preserved.
3. With the -C/--clean option, uncommitted changes are discarded and the
working directory is updated to the requested changeset.
into a verbose section. I think hardly anyone will soak that up on a first read.
It mostly describes some automatic built-in sanity checking or some more advanced
option (-c/--check), which is rarely used.
So that whole part still seems like a perfect candidate to me for moving into a
verbose section.
It's the same as people would do themselves, if they skip things on first read.
I think these are exactly the things that cause people to refuse reading help texts
and resort to blindly apply commands without first reading what they are supposed to
do.
If we put that in verbose section we make a choice for them what to skip for a
first read, or if they are in hurry or just overwhelmed.
The part:
3. With the -C/--clean option, uncommitted changes are discarded and the
working directory is updated to the requested changeset.
is probably the most interesting, but is - though somewhat indirectly - covered by
the now pushed:
To cancel an uncommitted merge (and lose your changes), use "hg
update --clean .".
but also by
-C --clean discard uncommitted changes (no backup)
in the options.
More information about the Mercurial-devel
mailing list