Rev 1836: Merge 0.4. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Sat Sep 6 20:34:03 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1836
revision-id: jelmer at samba.org-20080906193359-o9096fh0mvo2wgvl
parent: jelmer at samba.org-20080906193320-e22cbucpidl2rjh0
parent: jelmer at samba.org-20080906041401-bb1lj1l960s9fnw0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-09-06 21:33:59 +0200
message:
  Merge 0.4.
modified:
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  setup.py                       setup.py-20060502115218-86950492da22353f
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1669.1.39
    revision-id: jelmer at samba.org-20080906041401-bb1lj1l960s9fnw0
    parent: jelmer at samba.org-20080906041333-at354xlev34eradw
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Sat 2008-09-06 06:14:01 +0200
    message:
      Add bug #
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
    ------------------------------------------------------------
    revno: 1669.1.38
    revision-id: jelmer at samba.org-20080906041333-at354xlev34eradw
    parent: jelmer at samba.org-20080905205536-05rbn2vlqzzzziil
    parent: snaury at gmail.com-20080905082739-5ekewnvtve8smtpj
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Sat 2008-09-06 06:13:33 +0200
    message:
      Merge improvements for building on Windows.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      setup.py                       setup.py-20060502115218-86950492da22353f
        ------------------------------------------------------------
        revno: 1669.2.1
        revision-id: snaury at gmail.com-20080905082739-5ekewnvtve8smtpj
        parent: jelmer at samba.org-20080904170226-c6ygcz8mbk2rqpnw
        committer: Alexey Borzenkov <snaury at gmail.com>
        branch nick: jelmer-0.4-df
        timestamp: Fri 2008-09-05 12:27:39 +0400
        message:
          Fix building with different Subversion and Apache Runtime versions.
        modified:
          setup.py                       setup.py-20060502115218-86950492da22353f
    ------------------------------------------------------------
    revno: 1669.1.37
    revision-id: jelmer at samba.org-20080905205536-05rbn2vlqzzzziil
    parent: jelmer at samba.org-20080905202310-ku283g5ylf22ovyt
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Fri 2008-09-05 22:55:36 +0200
    message:
      Cherrypick fix for modification of sets during iteration.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
    ------------------------------------------------------------
    revno: 1669.1.36
    revision-id: jelmer at samba.org-20080905202310-ku283g5ylf22ovyt
    parent: jelmer at samba.org-20080905190426-j3d1pq233vf2tt8z
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Fri 2008-09-05 22:23:10 +0200
    message:
      Cope with has_children not always being returned.
    modified:
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1669.1.35
    revision-id: jelmer at samba.org-20080905190426-j3d1pq233vf2tt8z
    parent: jelmer at samba.org-20080904173039-v3y93qr83eczj55e
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Fri 2008-09-05 21:04:26 +0200
    message:
      Make last argument optional.
    modified:
      tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'NEWS'
--- a/NEWS	2008-09-06 12:43:25 +0000
+++ b/NEWS	2008-09-06 19:33:59 +0000
@@ -47,6 +47,10 @@
 
    * Fix compatibility with Subversion 1.4 on Windows.
 
+   * Fix bug modifying set of right hand side revisions during fetch. (#264740)
+
+   * Fix linking against Subversion 1.5 on Windows. (#263570)
+
 bzr-svn 0.4.12	2008-09-01
 
   BUG FIXES

=== modified file 'setup.py'
--- a/setup.py	2008-09-02 00:27:00 +0000
+++ b/setup.py	2008-09-06 19:33:59 +0000
@@ -8,6 +8,7 @@
 from distutils import log
 import sys
 import os
+import re
 
 # Build instructions for Windows:
 # * Install the SVN dev kit ZIP for Windows from
@@ -105,9 +106,42 @@
     raise Exception("Subversion development files not found. "
                     "Please set SVN_PREFIX or (SVN_LIBRARY_PATH and SVN_HEADER_PATH) environment variable. ")
 
+class VersionQuery(object):
+    def __init__(self, filename):
+        self.filename = filename
+        f = file(filename, "rU")
+        try:
+            self.text = f.read()
+        finally:
+            f.close()
+
+    def grep(self, what):
+        m = re.search(r"^#define\s+%s\s+(\d+)\s*$" % (what,), self.text, re.MULTILINE)
+        if not m:
+            raise Exception, "Definition for %s was not found in file %s." % (what, self.filename)
+        return int(m.group(1))
+
 # Windows versions - we use environment variables to locate the directories
 # and hard-code a list of libraries.
 if os.name == "nt":
+    def get_apr_version():
+        apr_version_file = os.path.join(os.environ["SVN_DEV"], r"include\apr\apr_version.h")
+        if not os.path.isfile(apr_version_file):
+            raise Exception(
+                "Please check that your SVN_DEV location is correct.\n"
+                "Unable to find required apr\\apr_version.h file.")
+        query = VersionQuery(apr_version_file)
+        return query.grep("APR_MAJOR_VERSION"), query.grep("APR_MINOR_VERSION"), query.grep("APR_PATCH_VERSION")
+
+    def get_svn_version():
+        svn_version_file = os.path.join(os.environ["SVN_DEV"], r"include\svn_version.h")
+        if not os.path.isfile(svn_version_file):
+            raise Exception(
+                "Please check that your SVN_DEV location is correct.\n"
+                "Unable to find required svn_version.h file.")
+        query = VersionQuery(svn_version_file)
+        return query.grep("SVN_VER_MAJOR"), query.grep("SVN_VER_MINOR"), query.grep("SVN_VER_PATCH")
+
     # just clobber the functions above we can't use
     # for simplicitly, everything is done in the 'svn' one
     def apr_build_data():
@@ -132,6 +166,9 @@
                 "Please set SVN_LIBINTL to the location of the svn libintl "
                 "packages - see README.txt in the SV_DEV dir")
 
+        svn_version = get_svn_version()
+        apr_version = get_apr_version()
+
         includes = [
             # apr dirs.
             os.path.join(svn_dev_dir, r"include\apr"),
@@ -149,8 +186,14 @@
             os.path.join(svn_bdb_dir, "lib"),
             os.path.join(svn_libintl_dir, "lib"),
         ]
-        libs = """libapr libapriconv libaprutil libneon
-                  libsvn_subr-1 libsvn_client-1 libsvn_ra-1
+        aprlibs = """libapr libapriconv libaprutil""".split()
+        if apr_version[0] == 1:
+            aprlibs = [aprlib + "-1" for aprlib in aprlibs]
+        elif apr_version[0] > 1:
+            raise Exception(
+                "You have apr version %d.%d.%d.\n"
+                "This setup only knows how to build with 0.*.* or 1.*.*." % apr_version)
+        libs = """libneon libsvn_subr-1 libsvn_client-1 libsvn_ra-1
                   libsvn_ra_dav-1 libsvn_ra_local-1 libsvn_ra_svn-1
                   libsvn_repos-1 libsvn_wc-1 libsvn_delta-1 libsvn_diff-1
                   libsvn_fs-1 libsvn_repos-1 libsvn_fs_fs-1 libsvn_fs_base-1
@@ -158,8 +201,11 @@
                   libdb44 xml
                   advapi32 shell32 ws2_32 zlibstat
                """.split()
+        if svn_version >= (1,5,0):
+            # Since 1.5.0 libsvn_ra_dav-1 was removed
+            libs.remove("libsvn_ra_dav-1")
 
-        return includes, lib_dirs, libs,
+        return includes, lib_dirs, aprlibs+libs,
 
 (apr_includedir, ) = apr_build_data()
 (svn_includedirs, svn_libdirs, extra_libs) = svn_build_data()
@@ -180,8 +226,13 @@
     def _get_dlls(self):
         # return a list of of (FQ-in-name, relative-out-name) tuples.
         ret = []
-        apr_bins = """libaprutil.dll libapriconv.dll libapr.dll intl3_svn.dll
-                      libdb44.dll libeay32.dll ssleay32.dll""".split()
+        apr_bins = [libname + ".dll" for libname in extra_libs if libname.startswith("libapr")]
+        if get_svn_version() >= (1,5,0):
+            # Since 1.5.0 these libraries became shared
+            apr_bins += """libsvn_client-1.dll libsvn_delta-1.dll libsvn_diff-1.dll
+                           libsvn_fs-1.dll libsvn_ra-1.dll libsvn_repos-1.dll
+                           libsvn_subr-1.dll libsvn_wc-1.dll""".split()
+        apr_bins += """intl3_svn.dll libdb44.dll libeay32.dll ssleay32.dll""".split()
         look_dirs = os.environ.get("PATH","").split(os.pathsep)
         look_dirs.insert(0, os.path.join(os.environ["SVN_DEV"], "bin"))
     

=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-09-04 15:47:01 +0000
+++ b/tests/__init__.py	2008-09-06 19:33:59 +0000
@@ -227,7 +227,7 @@
         r = ra.RemoteAccess(url)
         assert isinstance(url, str)
         ret = {}
-        def rcvr(orig_paths, rev, revprops, has_children):
+        def rcvr(orig_paths, rev, revprops, has_children=None):
             ret[rev] = (orig_paths, revprops.get(properties.PROP_REVISION_AUTHOR), revprops.get(properties.PROP_REVISION_DATE), revprops.get(properties.PROP_REVISION_LOG))
         r.get_log(rcvr, [""], start_revnum, stop_revnum, 0, True, True, 
                   revprops=[properties.PROP_REVISION_AUTHOR, properties.PROP_REVISION_DATE, properties.PROP_REVISION_LOG])

=== modified file 'transport.py'
--- a/transport.py	2008-09-06 00:03:17 +0000
+++ b/transport.py	2008-09-06 19:33:59 +0000
@@ -285,8 +285,8 @@
             def run(self):
                 assert not self.busy, "already running"
                 self.busy = True
-                def rcvr(*args):
-                    self.pending.append(args)
+                def rcvr(orig_paths, revision, revprops, has_children=None):
+                    self.pending.append((orig_paths, revision, revprops, has_children))
                     self.semaphore.release()
                 try:
                     try:




More information about the bazaar-commits mailing list