[MERGE] Shelf 5 / 5

Aaron Bentley aaron at aaronbentley.com
Wed Oct 29 08:21:48 GMT 2008


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

Vincent Ladeuil wrote:
>>>>>> "aaron" == Aaron Bentley <aaron at aaronbentley.com> writes:
> Eerk ! Am I right in inferring from the above that the input
> handling will be character based ?

Yes.  I don't remember anyone complaining about it before, and I
certainly prefer it that way.

> This implies that it can't be used under emacs where input is
> line buffered (i.e. you can't read a character at a time, only a
> '\n' terminated line).

I never meant for shelf to be run inside editors, but I'm happy for it
to work in editors.

Have you tested it and shown that it doesn't work under Emacs?

What steps would be necessary to detect Emacs and change behavior?

>     aaron> +    def prompt(self, message):
>     aaron> +        sys.stdout.write(message)
>     aaron> +        char = osutils.getchar()
>     aaron> +        sys.stdout.write("\r" + ' ' * len(message) + '\r')
>     aaron> +        sys.stdout.flush()
>     aaron> +        return char
> 
> Or can this single method be overridden to address the issue ?

I isolated it here for testing reasons, but I'm happy to commit to
always using this method.

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

iEYEARECAAYFAkkIHRwACgkQ0F+nu1YWqI0w/ACeKQuPeJKqbc1ytQWVbhC2rYam
J40AnA/uNsdSIeAiIYhTid8KrshSOje+
=bVPe
-----END PGP SIGNATURE-----



More information about the bazaar mailing list