Rev 1418: More build fixes... in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Tue Jul 1 22:19:02 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1418
revision-id: jelmer at samba.org-20080701211901-opljk7ozw2jhju7z
parent: jelmer at samba.org-20080701204236-1798iubpwn6it8r9
parent: jelmer at samba.org-20080701211034-kldob0ont3ofzp1g
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-07-01 23:19:01 +0200
message:
More build fixes...
modified:
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
remote.py format.py-20060406233823-b6fa009fe35dfde7
revids.py revids.py-20070416220458-36vfa0730cchevp1-1
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_branch.py test_branch.py-20060508162215-74ffeb5d608f8e20
util.h util.h-20080531154025-s8ef6ej9tytsnkkw-2
------------------------------------------------------------
revno: 1417.1.2
revision-id: jelmer at samba.org-20080701211034-kldob0ont3ofzp1g
parent: jelmer at samba.org-20080701211009-0k0y2es919vf4v9w
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-07-01 23:10:34 +0200
message:
Fix query, branch paths.
modified:
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
revids.py revids.py-20070416220458-36vfa0730cchevp1-1
------------------------------------------------------------
revno: 1417.1.1
revision-id: jelmer at samba.org-20080701211009-0k0y2es919vf4v9w
parent: jelmer at samba.org-20080701204236-1798iubpwn6it8r9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-07-01 23:10:09 +0200
message:
Fix tests.
modified:
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_branch.py test_branch.py-20060508162215-74ffeb5d608f8e20
=== modified file 'branch.py'
--- a/branch.py 2008-07-01 16:12:37 +0000
+++ b/branch.py 2008-07-01 21:10:34 +0000
@@ -66,17 +66,17 @@
self.repository = repository
assert isinstance(self.repository, SvnRepository)
self.control_files = FakeControlFiles()
- self.base = urlutils.join(self.repository.base, branch_path).rstrip("/")
self._format = SvnBranchFormat()
self._lock_mode = None
self._lock_count = 0
self.mapping = self.repository.get_mapping()
self._branch_path = branch_path.strip("/")
+ self.base = urlutils.join(self.repository.base, self._branch_path).rstrip("/")
self._revmeta_cache = None
assert isinstance(self._branch_path, str)
try:
revnum = self.get_revnum()
- if self.repository.transport.check_path(branch_path.strip("/"),
+ if self.repository.transport.check_path(self._branch_path,
revnum) != core.NODE_DIR:
raise NotBranchError(self.base)
except SubversionException, (_, num):
=== modified file 'remote.py'
--- a/remote.py 2008-07-01 15:58:38 +0000
+++ b/remote.py 2008-07-01 21:19:01 +0000
@@ -149,7 +149,7 @@
elif repos.get_latest_revnum() > 0:
# Bail out if there are already revisions in this repository
raise AlreadyBranchError(self.root_transport.base)
- branch = SvnBranch(repos.base, self.branch_path)
+ branch = SvnBranch(repos, self.branch_path)
branch.bzrdir = self
return branch
=== modified file 'revids.py'
--- a/revids.py 2008-07-01 20:10:09 +0000
+++ b/revids.py 2008-07-01 21:10:34 +0000
@@ -233,7 +233,7 @@
assert isinstance(revid, str)
self.mutter("lookup revid %r", revid)
ret = self.cachedb.execute(
- "select path, min_revnum, max_revnum, scheme from revmap where revid=?" % (revid,)).fetchone()
+ "select path, min_revnum, max_revnum, scheme from revmap where revid=?", (revid,)).fetchone()
if ret is None:
raise NoSuchRevision(self, revid)
return (ret[0].encode("utf-8"), int(ret[1]), int(ret[2]), ret[3].encode("utf-8"))
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py 2008-06-29 13:06:40 +0000
+++ b/tests/__init__.py 2008-07-01 21:10:09 +0000
@@ -173,11 +173,6 @@
self.client_ctx.checkout(repos_url, relpath, "HEAD")
@staticmethod
- def create_checkout(branch, path, revision_id=None, lightweight=False):
- return branch.create_checkout(path, revision_id=revision_id,
- lightweight=lightweight)
-
- @staticmethod
def open_checkout(url):
return WorkingTree.open(url)
=== modified file 'tests/test_branch.py'
--- a/tests/test_branch.py 2008-06-26 22:38:40 +0000
+++ b/tests/test_branch.py 2008-07-01 21:10:09 +0000
@@ -143,8 +143,8 @@
def test_repr(self):
repos_url = self.make_repository('a')
- branch = Branch.open("svn+"+repos_url)
- self.assertEqual("SvnBranch('svn+%s')" % repos_url, branch.__repr__())
+ branch = Branch.open(repos_url)
+ self.assertEqual("SvnBranch('%s')" % repos_url, branch.__repr__())
def test_get_physical_lock_status(self):
repos_url = self.make_repository('a')
@@ -624,7 +624,7 @@
url = "svn+"+repos_url+"/trunk"
oldbranch = Branch.open(url)
- newtree = self.create_checkout(oldbranch, "e")
+ newtree = oldbranch.create_checkout("e")
self.assertTrue(newtree.branch.repository.has_revision(
oldbranch.generate_revision_id(1)))
@@ -639,10 +639,8 @@
trunk.add_file("trunk/hosts")
dc.close()
- url = "svn+"+repos_url+"/trunk"
- oldbranch = Branch.open(url)
-
- newtree = self.create_checkout(oldbranch, "e", lightweight=True)
+ oldbranch = Branch.open(repos_url+"/trunk")
+ newtree = oldbranch.create_checkout("e", lightweight=True)
self.assertEqual(oldbranch.generate_revision_id(1), newtree.base_revid)
self.assertTrue(os.path.exists("e/.svn"))
self.assertFalse(os.path.exists("e/.bzr"))
@@ -663,7 +661,7 @@
url = "svn+"+repos_url+"/trunk"
oldbranch = Branch.open(url)
- newtree = self.create_checkout(oldbranch, "e", revision_id=
+ newtree = oldbranch.create_checkout("e", revision_id=
oldbranch.generate_revision_id(1), lightweight=True)
self.assertEqual(oldbranch.generate_revision_id(1),
newtree.base_revid)
=== modified file 'util.h'
--- a/util.h 2008-06-22 22:08:50 +0000
+++ b/util.h 2008-07-01 21:19:01 +0000
@@ -20,6 +20,11 @@
#ifndef _BZR_SVN_UTIL_H_
#define _BZR_SVN_UTIL_H_
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+#endif
+
#pragma GCC visibility push(hidden)
__attribute__((warn_unused_result)) apr_pool_t *Pool(apr_pool_t *parent);
More information about the bazaar-commits
mailing list