summaryrefslogtreecommitdiffstats
path: root/editor.py
Commit message (Collapse)AuthorAgeFilesLines
* set default file encoding to utf-8Mike Frysinger2019-06-131-0/+1
| | | | | | | | There's no reason to support any other encoding in these files. This only affects the files themselves and not streams they open. Bug: https://crbug.com/gerrit/10418 Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf
* Allow quotes in editor command on WindowsRenaud Paquay2017-08-311-1/+6
| | | | | | | | | | | | This change allows setting the EDITOR env. variable to point to a program location that contains quotes and spaces. For example: > set EDITOR="C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst -nosession > repo upload Change-Id: Ic95b00f7443982b1956a2992d0220e50b1cf6bbb
* Replace all os.remove callsRenaud Paquay2017-08-311-1/+2
| | | | | | | | os.remove raises an exception when deleting read-only files on Windows. Replace all calls with calls to platform_utils.remove, which deals with deals with that issue. Change-Id: I4dc9e0c9a36b4238880520c69f5075eca40f3e66
* Change print statements to work in python3Sarah Owens2012-11-131-3/+4
| | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
* Use modern Python exception syntaxSarah Owens2012-10-231-1/+1
| | | | | | | | | | | "except Exception as e" instead of "except Exception, e" This is part of a transition to supporting Python 3. Python >= 2.6 support "as" syntax. Note: this removes Python 2.5 support. Change-Id: I309599f3981bba2b46111c43102bee38ff132803
* Fix for handling values of EDITOR which contain a space.Patrick Dubroy2010-08-061-1/+1
| | | | | | | The shell swallows the 0th arg, which was the filename. Simple fix is to pass in an extra arg for the shell to swallow. Change-Id: Iad6304ba9ccea6e7262ee06ef87d3dac57dbde81
* Support GIT_EDITOR='vim -c "set textwidth=80"'Shawn O. Pearce2009-07-021-7/+20
| | | | | | | | | If there are shell special characters in the editor string, we must use /bin/sh to parse and execute it, rather than trying to rely on a simple split(' '). This avoids vim starting up with two empty buffers, due to a misparsed command line. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Document any crashes from the user's text editorv1.6.8.4Shawn O. Pearce2009-06-241-2/+9
| | | | | | | | Rather than failing with no information, display the child exit status and the command line we tried to use to edit a text file. There may be some useful information to help understand the crash. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix launching of editor under 'repo upload --replace'Shawn O. Pearce2009-04-181-3/+3
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make usage of open safer by setting binary mode and closing fdsShawn O. Pearce2009-04-181-1/+5
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make repo's editor work when the editor is a commandline withv1.3.2Joe Onorato2008-11-141-2/+2
| | | | multiple args.
* Initial Contributionv1.0The Android Open Source Project2008-10-211-0/+85