Rev 648: Fix more tests, only 3 remaining. in file:///data/jelmer/bzr-svn/noschemes/

Jelmer Vernooij jelmer at samba.org
Mon Feb 4 00:05:05 GMT 2008


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

------------------------------------------------------------
revno: 648
revision-id:jelmer at samba.org-20080204000504-sxfo0zzk0p05ogi3
parent: jelmer at samba.org-20080203224230-25pj7p5215mp5jjq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: noschemes
timestamp: Mon 2008-02-04 01:05:04 +0100
message:
  Fix more tests, only 3 remaining.
modified:
  branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
  branchprops.py                 branchprops.py-20061223204623-80lvm7pjrpsgk0dd-1
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
  tests/test_push.py             test_push.py-20070201165715-g2ievcdfqi33wqsy-1
=== modified file 'branch.py'
--- a/branch.py	2008-02-03 03:08:33 +0000
+++ b/branch.py	2008-02-04 00:05:04 +0000
@@ -201,6 +201,8 @@
         revhistory = []
         for (branch, rev) in self.repository.follow_branch(
                 self.get_branch_path(last_revnum), last_revnum, self.mapping):
+            from bzrlib.trace import mutter
+            mutter('revhistory %r, %r' % (branch, rev))
             revhistory.append(
                 self.repository.generate_revision_id(rev, branch, 
                     self.mapping))

=== modified file 'branchprops.py'
--- a/branchprops.py	2008-02-03 18:03:33 +0000
+++ b/branchprops.py	2008-02-04 00:05:04 +0000
@@ -102,6 +102,9 @@
         """
         assert isinstance(revnum, int)
         assert isinstance(path, str)
+        current = self.get_properties(path, revnum)
+        if current == {}:
+            return {}
         if self.log.touches_path(path, revnum):
             (prev_path, prev_revnum) = self.log.get_previous(path, revnum)
             if prev_path is None and prev_revnum == -1:
@@ -111,7 +114,6 @@
                                               prev_revnum)
         else:
             previous = {}
-        current = self.get_properties(path, revnum)
         ret = {}
         for key, val in current.items():
             if previous.get(key) != val:

=== modified file 'commit.py'
--- a/commit.py	2008-02-03 22:42:30 +0000
+++ b/commit.py	2008-02-04 00:05:04 +0000
@@ -30,7 +30,8 @@
 from copy import deepcopy
 from cStringIO import StringIO
 from errors import ChangesRootLHSHistory, MissingPrefix, RevpropChangeFailed
-from svk import generate_svk_feature, serialize_svk_features, parse_svk_features 
+from svk import (generate_svk_feature, serialize_svk_features, 
+                 parse_svk_features, SVN_PROP_SVK_MERGE)
 from mapping import parse_revision_id
 from repository import (SvnRepositoryFormat, SvnRepository)
 import urllib
@@ -445,8 +446,8 @@
                                               bp_parts, -1)
             self.revision_metadata = None
             try:
-                self.editor = self.repository.transport.get_commit_editor(self._svn_revprops, 
-                                                                          done, None, False)
+                self.editor = self.repository.transport.get_commit_editor(
+                        self._svn_revprops, done, None, False)
                 self._svn_revprops = {}
             except NotImplementedError:
                 if set_revprops:

=== modified file 'repository.py'
--- a/repository.py	2008-02-03 22:42:30 +0000
+++ b/repository.py	2008-02-04 00:05:04 +0000
@@ -409,6 +409,8 @@
 
         """
         current = get_branch_property(branch, revnum, SVN_PROP_SVK_MERGE, "")
+        if current == "":
+            return
         (prev_path, prev_revnum) = self._log.get_previous(branch, revnum)
         if prev_path is None and prev_revnum == -1:
             previous = ""

=== modified file 'tests/test_push.py'
--- a/tests/test_push.py	2008-02-03 18:03:33 +0000
+++ b/tests/test_push.py	2008-02-04 00:05:04 +0000
@@ -337,7 +337,7 @@
         self.build_tree({'c/test': "Tour"})
         bzrwt.add("test")
         revid = bzrwt.commit("Do a commit")
-        newdir = BzrDir.open(repos_url+"/trunk")
+        newdir = BzrDir.open("%s/trunk" % repos_url)
         newbranch = newdir.import_branch(bzrwt.branch)
         newtree = newbranch.repository.revision_tree(revid)
         bzrwt.lock_read()




More information about the bazaar-commits mailing list