Rev 650: FIx last few tests. in file:///data/jelmer/bzr-svn/noschemes/
Jelmer Vernooij
jelmer at samba.org
Mon Feb 4 04:05:42 GMT 2008
At file:///data/jelmer/bzr-svn/noschemes/
------------------------------------------------------------
revno: 650
revision-id:jelmer at samba.org-20080204040541-u0dekr6xgbe55j6s
parent: jelmer at samba.org-20080204032132-3hi6jevfrg5y17ez
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: noschemes
timestamp: Mon 2008-02-04 05:05:41 +0100
message:
FIx last few tests.
modified:
branchprops.py branchprops.py-20061223204623-80lvm7pjrpsgk0dd-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
=== modified file 'branchprops.py'
--- a/branchprops.py 2008-02-04 00:05:04 +0000
+++ b/branchprops.py 2008-02-04 04:05:41 +0000
@@ -102,18 +102,17 @@
"""
assert isinstance(revnum, int)
assert isinstance(path, str)
+ if not self.log.touches_path(path, revnum):
+ return {}
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:
- previous = {}
- else:
- previous = self.get_properties(prev_path.encode("utf-8"),
- prev_revnum)
- else:
+ (prev_path, prev_revnum) = self.log.get_previous(path, revnum)
+ if prev_path is None and prev_revnum == -1:
previous = {}
+ else:
+ previous = self.get_properties(prev_path.encode("utf-8"),
+ prev_revnum)
ret = {}
for key, val in current.items():
if previous.get(key) != val:
=== modified file 'tests/test_convert.py'
--- a/tests/test_convert.py 2008-02-03 19:41:38 +0000
+++ b/tests/test_convert.py 2008-02-04 04:05:41 +0000
@@ -85,6 +85,7 @@
self.build_tree({'dc/branches/somebranch/somefile': 'data'})
self.client_add("dc/branches/somebranch")
self.client_commit("dc", "add a branch")
+ self.client_update("dc")
self.client_delete("dc/branches/somebranch")
self.client_commit("dc", "remove branch")
oldrepos = Repository.open(self.repos_url)
More information about the bazaar-commits
mailing list