[PATCH 0 of 3] new remote heads abort

Adrian Buehlmann adrian at cadifra.com
Fri Jun 3 07:36:15 CDT 2011


The goal of this series is to improve the messages shown on push when --force is
not specified and there are new remote heads (which results in an abort).

The series builds on the change

  changeset:   12998:91cb08a9e7fb
  user:        Adrian Buehlmann <adrian at cadifra.com>
  date:        Thu Nov 11 15:51:20 2010 +0100
  summary:     discovery: list new remote heads in prepush() on --debug

which introduced printing the remote heads in the abort case if --debug is set.

Patch 1 is a refactoring that eliminates some pointless 'if branch' constructs.

Patch 2 includes the short hash of the first offending head in the abort message.
As already noted in 91cb08a9e7fb, this helps identify the local offending head.
The abort message itself should stay short, so we shouldn't try to mention every
new head. Typically, the user has only one new offending head anyway in that
situation. So why not mention it in the abort message directly. Please see the
example old and new UI texts in the change message for Patch 2.

Patch 3 is basically just the same as the old 91cb08a9e7fb, but now the new remote
heads are printed on -v/--verbose already (not just if --debug is specified). I think
it doesn't harm to show these on -v already. Note that the new remote heads are only
shown if the command aborts, that is, they are *not* shown if --force is specified
(as mentioned in the change message for Patch 3 too).

More details can be found in the change messages of the individual patches.




More information about the Mercurial-devel mailing list