Rev 2242: merge subvertpy. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5

Jelmer Vernooij jelmer at samba.org
Mon Dec 8 16:40:10 GMT 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.5

------------------------------------------------------------
revno: 2242
revision-id: jelmer at samba.org-20081208164007-3nivx8ux3yz58qsf
parent: jelmer at samba.org-20081208163947-75ymisrjgn6z1a32
parent: jelmer at samba.org-20081208163916-wu9wvev7y3vjb771
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-12-08 17:40:07 +0100
message:
  merge subvertpy.
modified:
  subvertpy/subvertpy/properties.py util.py-20080502170127-o220e9py99vt69s6-1
  subvertpy/subvertpy/tests/__init__.py __init__.py-20081002194117-jwf9payoee8eqz7g-1
    ------------------------------------------------------------
    revno: 1925.2.41
    revision-id: jelmer at samba.org-20081208163916-wu9wvev7y3vjb771
    parent: jelmer at samba.org-20081208163834-j27gsuxngc105fpz
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2008-12-08 17:39:16 +0100
    message:
      Fix remaining test.
    modified:
      subvertpy/properties.py        util.py-20080502170127-o220e9py99vt69s6-1
    ------------------------------------------------------------
    revno: 1925.2.40
    revision-id: jelmer at samba.org-20081208163834-j27gsuxngc105fpz
    parent: jelmer at samba.org-20081203192916-e4neu5ew4znas7k8
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2008-12-08 17:38:34 +0100
    message:
      Remove use of bzrlib functions, use standard python functions instead.
    modified:
      subvertpy/tests/__init__.py    __init__.py-20081002194117-jwf9payoee8eqz7g-1
=== modified file 'subvertpy/subvertpy/properties.py'
--- a/subvertpy/subvertpy/properties.py	2008-11-21 14:59:07 +0000
+++ b/subvertpy/subvertpy/properties.py	2008-12-08 16:40:07 +0000
@@ -18,7 +18,7 @@
 __author__ = "Jelmer Vernooij <jelmer at samba.org>"
 __docformat__ = "restructuredText"
 
-import bisect, urllib
+import bisect, urlparse
 
 
 class InvalidExternalsDescription(Exception):
@@ -109,7 +109,7 @@
             raise NotImplementedError("Relative to the scheme externals not yet supported")
         if relurl.startswith("^/"):
             raise NotImplementedError("Relative to the repository root externals not yet supported")
-        ret[path] = (revno, urllib.basejoin(base_url, relurl))
+        ret[path] = (revno, urlparse.urljoin(base_url+"/", relurl))
     return ret
 
 

=== modified file 'subvertpy/subvertpy/tests/__init__.py'
--- a/subvertpy/subvertpy/tests/__init__.py	2008-10-05 19:00:32 +0000
+++ b/subvertpy/subvertpy/tests/__init__.py	2008-12-08 16:38:34 +0000
@@ -18,8 +18,9 @@
 
 from cStringIO import StringIO
 
+import urllib, urllib2, urlparse
+
 # FIXME: Remove dependency on bzrlib
-from bzrlib import osutils, urlutils
 from bzrlib.tests import TestCaseInTempDir
 
 import os, sys
@@ -38,7 +39,7 @@
 
     def modify(self, contents=None):
         if contents is None:
-            contents = osutils.rand_chars(100)
+            contents = urllib2.random_bytes(100)
         txdelta = self.file.apply_textdelta()
         delta.send_stream(StringIO(contents), txdelta)
 
@@ -85,7 +86,7 @@
     def add_dir(self, path, copyfrom_path=None, copyfrom_rev=-1):
         self.close_children()
         if copyfrom_path is not None:
-            copyfrom_path = urlutils.join(self.baseurl, copyfrom_path)
+            copyfrom_path = urlparse.urljoin(self.baseurl+"/", copyfrom_path)
         if copyfrom_path is not None and copyfrom_rev == -1:
             copyfrom_rev = self.revnum
         assert (copyfrom_path is None and copyfrom_rev == -1) or \
@@ -97,7 +98,7 @@
     def add_file(self, path, copyfrom_path=None, copyfrom_rev=-1):
         self.close_children()
         if copyfrom_path is not None:
-            copyfrom_path = urlutils.join(self.baseurl, copyfrom_path)
+            copyfrom_path = urlparse.urljoin(self.baseurl+"/", copyfrom_path)
         if copyfrom_path is not None and copyfrom_rev == -1:
             copyfrom_rev = self.revnum
         child = TestFileEditor(self.dir.add_file(path, copyfrom_path, copyfrom_rev))
@@ -154,7 +155,7 @@
                 open(revprop_hook, 'w').write("#!/bin/sh\n")
                 os.chmod(revprop_hook, os.stat(revprop_hook).st_mode | 0111)
 
-        return urlutils.local_path_to_url(abspath)
+        return "file://" + abspath
 
 
     def make_checkout(self, repos_url, relpath):




More information about the bazaar-commits mailing list