[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git-cl under Windows
From: |
David Kastrup |
Subject: |
Re: git-cl under Windows |
Date: |
Tue, 03 Jul 2012 17:34:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Graham Percival <address@hidden> writes:
>
>> On Tue, Jul 03, 2012 at 04:50:13PM +0200, David Kastrup wrote:
>>> Graham Percival <address@hidden> writes:
>>>
>>> > Good luck.
>>>
>>> My personal take on this is not to bother but disable use of the
>>> readline module if unavailable. git cl does not ask for interactive
>>> input often enough to make that worth the trouble.
>>
>> oh, that's a good thought! If the user supplied the relevant
>> config information in a text file, and git-cl just automatically
>> created a new issue if it couldn't find the old one (or better, if
>> git-cl wrote the issue number into ~/.git/config and used that one
>> instead of trying to rediscover it), then there'd be no need to
>> ask the user for anything at all.
>
> Well, it can still ask using stdin: that just means that you'll have to
> backspace over errors destructively. And it does already start EDITOR
> for the initial description (rather than readline), so it is not like we
> are talking about multiline editing here.
Looking at git-cl, I see
#!/usr/bin/python
# git-cl -- a git-command for integrating reviews on Rietveld
# Copyright (C) 2008 Evan Martin <address@hidden>
import getpass
import optparse
import os
import re
import readline
import subprocess
import sys
import tempfile
import textwrap
import upload
import urllib2
import projecthosting_upload
# mimetype exceptions: if you can't upload to rietveld, add the
# relevant extension to this list. The only important part is the
# "text/x-script." bit; the stuff after the dot doesn't matter
import mimetypes
mimetypes.add_type("text/x-script.scheme", ".scm")
mimetypes.add_type("text/x-script.postscript", ".ps")
mimetypes.add_type("text/x-script.tex", ".latex")
mimetypes.add_type("text/x-script.texinfo", ".texi")
mimetypes.add_type("text/x-script.shell", ".sh")
try:
import readline
except ImportError:
pass
Namely, git-cl first tries importing readline unconditionally, then it
tries importing it again conditionally.
That does not look all too clever. Perhaps removing the unconditional
import is all that is needed?
--
David Kastrup
- git-cl under Windows, Trevor Daniels, 2012/07/03
- Re: git-cl under Windows, Graham Percival, 2012/07/03
- Re: git-cl under Windows, David Kastrup, 2012/07/03
- Re: git-cl under Windows, Trevor Daniels, 2012/07/03
- Re: git-cl under Windows, David Kastrup, 2012/07/03
- Re: git-cl under Windows, Graham Percival, 2012/07/03
- Re: git-cl under Windows, David Kastrup, 2012/07/03
- Re: git-cl under Windows, Trevor Daniels, 2012/07/03
- Re: git-cl under Windows, Trevor Daniels, 2012/07/04
Re: git-cl under Windows, Trevor Daniels, 2012/07/03
Message not available