Exemple #1
0
    def is_changes_root(self):
        """Check whether this revisions root is the root of the changes
        in this svn revision.

        This is a requirement for revisions pushed with bzr-svn using
        file properties.
        """
        return changes.changes_root(self.paths.keys()) == self.branch_path
Exemple #2
0
 def test_multiple_roots(self):
     self.assertEquals(None, changes_root([u"bla", u"blie"]))
Exemple #3
0
 def test_single(self):
     self.assertEquals(u"bla", changes_root([u"bla"]))
Exemple #4
0
 def test_simple_other(self):
     self.assertEquals(u"bla", changes_root([u"bla/blie", u"bla"]))
Exemple #5
0
 def test_siblings(self):
     self.assertEquals(u"bla",
                       changes_root([u"bla/blie", u"bla/bloe", u"bla"]))
Exemple #6
0
 def test_empty(self):
     self.assertEquals(None, changes_root([]))
Exemple #7
0
def find_roundtripped_root(revprops, path_changes):
    # Find the root path of the change
    bp = revprops.get(SVN_REVPROP_BZR_ROOT)
    if bp is not None:
        return bp.decode('utf-8')
    return changes.changes_root(path_changes.keys())