*.pyc
test????.tmp
tags
+apidocs
-- keep revision id cache:
-(revid, path, revnum, scheme)
-
-- Repository.generate_revision_id() should return
-- Branch.generate_revision_id()
-- Repository.parse_revision_id() looks up custom revision ids
-- Branch.parse_revision_id() looks up custom revision ids
- - Try to parse revision id. If:
- - UUID matches
- - path,revnum combination is in the branches' history
- return path,revnum combination
- - Check the bzr:revision-id-vX property in the
- the latest revision in which this branch existed. If it
- contains the revision, return it
+- keep revision ids when doing true pushes
+- add tests to make sure a revision is still 100% the same after being pushed
+ to subversion
# Check the record out of the revmap, if it exists
try:
- (branch_path, min_revnum, max_revnum, scheme) = self.revmap.lookup_revid(revid)
+ (branch_path, min_revnum, max_revnum, \
+ scheme) = self.revmap.lookup_revid(revid)
assert isinstance(branch_path, str)
# Entry already complete?
if min_revnum == max_revnum:
# Find the branch property between min_revnum and max_revnum that
# added revid
i = min_revnum
- while i <= max_revnum:
- if self.branchprop_list.get_property_diff(branch_path, i, SVN_PROP_BZR_REVISION_ID).strip("\n") == revid:
- self.revmap.insert_revid(revid, branch_path, i, i, "undefined")
- return (branch_path, i)
- i+=1
+ for (bp, rev) in self.follow_branch(branch_path, max_revnum):
+ if self.branchprop_list.get_property_diff(bp, rev, SVN_PROP_BZR_REVISION_ID).strip("\n") == revid:
+ self.revmap.insert_revid(revid, bp, rev, rev, "undefined")
+ return (bp, rev)
raise AssertionError("Revision id was added incorrectly")
from branch import FakeControlFiles, SvnBranchFormat
from convert import load_dumpfile
from fileids import generate_svn_file_id
-from repository import MAPPING_VERSION, generate_svn_revision_id
+from repository import MAPPING_VERSION, generate_svn_revision_id, SVN_PROP_BZR_REVISION_ID
from tests import TestCaseWithSubversionRepository
class WorkingSubversionBranch(TestCaseWithSubversionRepository):
self.build_tree({'dc/foo': "data"})
self.client_add("dc/foo")
+ self.client_set_prop("dc", SVN_PROP_BZR_REVISION_ID, "mycommit\n")
self.client_commit("dc", "My Message")
branch = Branch.open("svn+"+repos_url)
self.assertEqual([
repos.generate_revision_id(0, ""),
- repos.generate_revision_id(1, ""),
+ "mycommit",
repos.generate_revision_id(2, "")],
branch.revision_history())