[Pkg-bazaar-commits] ./bzr/unstable r7: depend only on regular ElementTree installation

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:24:34 UTC 2009


------------------------------------------------------------
revno: 7
committer: mbp at sourcefrog.net
timestamp: Wed 2005-03-09 06:19:37 +0000
message:
  depend only on regular ElementTree installation
modified:
  bzr.py
  bzrlib/inventory.py
  bzrlib/revision.py
  bzrlib/xml.py
-------------- next part --------------
=== modified file 'bzr.py'
--- a/bzr.py	2005-03-09 04:08:15 +0000
+++ b/bzr.py	2005-03-09 06:19:37 +0000
@@ -83,7 +83,6 @@
 from pprint import pprint
 from stat import *
 from glob import glob
-from ElementTree import Element, ElementTree, SubElement
 
 import bzrlib
 from bzrlib.store import ImmutableStore
@@ -116,11 +115,6 @@
 ## TODO: Perhaps make UUIDs predictable in test mode to make it easier
 ## to compare output?
 
-## TODO: Is ElementTree really all that much better for our purposes?
-## Perhaps using the standard MiniDOM would be enough?
-
-
-
 
 
 

=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2005-03-09 04:08:15 +0000
+++ b/bzrlib/inventory.py	2005-03-09 06:19:37 +0000
@@ -24,8 +24,12 @@
 import sys, os.path, types
 from sets import Set
 
+try:
+    from cElementTree import Element, ElementTree, SubElement
+except ImportError:
+    from elementtree import Element, ElementTree, SubElement
+
 from xml import XMLMixin
-from ElementTree import ElementTree, Element
 from errors import bailout
 from osutils import uuid, quotefn, splitpath, joinpath, appendpath
 from trace import mutter

=== modified file 'bzrlib/revision.py'
--- a/bzrlib/revision.py	2005-03-09 04:08:15 +0000
+++ b/bzrlib/revision.py	2005-03-09 06:19:37 +0000
@@ -18,7 +18,12 @@
 
 
 from xml import XMLMixin
-from ElementTree import Element, ElementTree, SubElement
+
+try:
+    from cElementTree import Element, ElementTree, SubElement
+except ImportError:
+    from elementtree import Element, ElementTree, SubElement
+
 
 class Revision(XMLMixin):
     """Single revision on a branch.

=== modified file 'bzrlib/xml.py'
--- a/bzrlib/xml.py	2005-03-09 04:08:15 +0000
+++ b/bzrlib/xml.py	2005-03-09 06:19:37 +0000
@@ -24,7 +24,7 @@
 try:
     from cElementTree import Element, ElementTree, SubElement
 except ImportError:
-    from ElementTree import Element, ElementTree, SubElement
+    from elementtree import Element, ElementTree, SubElement
 
 import os, time
 from trace import mutter



More information about the Pkg-bazaar-commits mailing list