[MERGE] uncommit command should use @display_command

Aaron Bentley aaron.bentley at utoronto.ca
Sat Oct 27 21:22:57 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> Aaron Bentley пишет:
> Alexander Belchenko wrote:
>>>> This is quite trivial patch. I'd like to have it merged for 0.92.
>>>>
> It is not a display command-- it affects the state of the branch.
> 
>> It's display command because it shows log messages for uncommitted
>> revisions and fails on Linux with incorrect $LANG settings.

The fact that a command displays something does not make it a display
command.  Display commands are those that only display something, and
don't modify tree/branch/repo state.

There are some errors, like pipe errors, which are not a concern for
commands like log which only display information.  For commands like
uncommit, or commit, or anything that modifies state, these are a
concern, because we don't know whether we were interrupted before,
after, or in the middle of performing operations.  When write command is
interrupted by a pipe error etc., we need to signal the user that
something weird has happened.  The purpose of the display_command
decorator is to prevent us from signalling the user.  So it is
fundamentally a bad idea for commands that do anything other than
display data.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHI54h0F+nu1YWqI0RAlkgAJ9FN6dTn3ErNhEBneP1n4iRG7OAXACcD0V0
bcBRedmcAfMLho0+5TK6U6E=
=ooYa
-----END PGP SIGNATURE-----



More information about the bazaar mailing list