Rev 1965: Add blackbox test for stacking. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Sat Nov 8 19:31:16 GMT 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1965
revision-id: jelmer at samba.org-20081108193113-eom4agyvo34kznq0
parent: jelmer at samba.org-20081108184839-5t2l8vrw7pmousod
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-11-08 20:31:13 +0100
message:
Add blackbox test for stacking.
modified:
tests/test_blackbox.py test_blackbox.py-20070325150839-d10llf8arptpcfl6-1
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
=== modified file 'tests/test_blackbox.py'
--- a/tests/test_blackbox.py 2008-11-08 18:07:12 +0000
+++ b/tests/test_blackbox.py 2008-11-08 19:31:13 +0000
@@ -41,6 +41,12 @@
self.commit_something(repos_url)
self.run_bzr("branch %s dc" % repos_url)
self.check_output("2\n", "revno de")
+
+ def test_branch_onerev_stacked(self):
+ repos_url = self.make_client('d', 'de')
+ self.commit_something(repos_url)
+ self.run_bzr("branch --stacked %s dc" % repos_url)
+ self.check_output("2\n", "revno de")
def test_log_empty(self):
repos_url = self.make_repository('d')
=== modified file 'versionedfiles.py'
--- a/versionedfiles.py 2008-11-05 20:28:03 +0000
+++ b/versionedfiles.py 2008-11-08 19:31:13 +0000
@@ -53,7 +53,7 @@
# TODO: Sort keys by file id and issue just one get_file_revs() call
# per file-id ?
for (fileid, revid) in list(keys):
- revmeta = self.repository._get_revmeta(revid)
+ revmeta, mapping = self.repository._get_revmeta(revid)
map = self.repository.get_fileid_map(revmeta, mapping)
# Unfortunately, the map is the other way around
lines = None
@@ -61,7 +61,7 @@
if v == fileid:
try:
stream = StringIO()
- self.repository.transport.get_file(urlutils.join(revmeta.branch_path, k), stream, revmeta.revnum)
+ self.repository.transport.get_file(urlutils.join(revmeta.branch_path, k).strip("/"), stream, revmeta.revnum)
stream.seek(0)
lines = stream.readlines()
except SubversionException, (_, num):
More information about the bazaar-commits
mailing list