Any incompatibilities between 0.6.2 and 0.7 releases?
John A Meinel
john at arbash-meinel.com
Thu Jan 26 14:22:06 GMT 2006
Vincent LADEUIL wrote:
>>>>>> "John" == John A Meinel <john at arbash-meinel.com> writes:
>
> John> Martin Pool wrote:
> >> On 25 Jan 2006, John A Meinel <john at arbash-meinel.com>
> >> wrote:
> >>> You know, we probably should have fixed the exception. We
> >>> could do a 'try/except' around the import xml.sax and if
> >>> it fails, we could let the user know what is (probably)
> >>> going on.
> >>>
> >>> I can put a quick fix into my jam-pending branch, though
> >>> it is a little late for 0.7 :)
> >> Yes, at least giving a specific error would be good.
> >>
>
> John> How is this patch?
>
> Right to the point !
>
> It would have saved me an elephant-in-a-porcelain-shop
> introduction to this list just days ago.
>
> I still have to understand what these files contains, but I keep
> that for another day :-)
>
> What are the requirements to issue a '+1' ?
>
> Vincent
The primary requirement is to have actually read the patch. :)
It would be really nice if I could get a review of the rest of my
jam-pending branch. (the Makefile fix, and the better error when missing
an editor)
John
=:->
=== modified file 'Makefile'
--- Makefile
+++ Makefile
@@ -10,8 +10,7 @@
clean:
./setup.py clean
- -find . -name "*.pyc" | xargs rm
- -find . -name "*.pyo" | xargs rm
+ -find . -name "*.pyc" -o -name "*.pyo" | xargs rm -f
rm -rf test????.tmp
.PHONY: all
=== modified file 'bzrlib/msgeditor.py'
--- bzrlib/msgeditor.py
+++ bzrlib/msgeditor.py
@@ -20,6 +20,7 @@
"""Commit message editor support."""
import os
+import errno
from subprocess import call
import bzrlib.config as config
@@ -51,7 +52,13 @@
"""Try to execute an editor to edit the commit message."""
for e in _get_editor():
edargs = e.split(' ')
- x = call(edargs + [filename])
+ try:
+ x = call(edargs + [filename])
+ except OSError, e:
+ # ENOENT means no such editor
+ if e.errno == errno.ENOENT:
+ continue
+ raise
if x == 0:
return True
elif x == 127:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060126/638ab73d/attachment.pgp
More information about the bazaar
mailing list