python-hglib: merge and resolve commands should return boolean value

Idan Kamara idankk86 at gmail.com
Thu Jan 26 11:51:45 CST 2012


On Wed, Jan 25, 2012 at 7:37 PM, Andrey Somov <py4fun at gmail.com> wrote:

> Hi,
> the 'merge' and 'resolve' commands return 0 or 1:
> "Returns 0 on success, 1 if there are unresolved files."
>
>  It looks like the same commands in the python-hglib should return
> boolean value.
> But they raise an exception when 1 is returned by the CommandServer.
> The doc for the 'resolve' method even says that the boolean value
> should be returned:
>
> def resolve(self, file=[], all=False, listfiles=False, mark=False,
> unmark=False,
>                tool=None, include=None, exclude=None):
> """
> Redo merges or set/view the merge status of given files.
> Returns True on success, False if any files fail a resolve attempt.
> ...
> """
>
> I think it would be better if both methods return False instead of
> raising an exception when 1 is returned by the CommandServer.
>

Sounds good, feel free to send a patch.


>
> -
> Andrey
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120126/11c168f7/attachment.html>


More information about the Mercurial-devel mailing list