Example #1
0
 def __init__(self, dir=None):
     self.dir = osutils.mkdtemp(prefix="merge-test", dir=dir)
     self.tree_root = generate_ids.gen_root_id()
     def wt(name):
        path = pathjoin(self.dir, name)
        os.mkdir(path)
        wt = bzrlib.bzrdir.BzrDir.create_standalone_workingtree(path)
        # the tests perform pulls, so need a branch that is writeable.
        wt.lock_write()
        wt.set_root_id(self.tree_root)
        wt.flush()
        tt = TreeTransform(wt)
        return wt, tt
     self.base, self.base_tt = wt('base')
     self.this, self.this_tt = wt('this')
     self.other, self.other_tt = wt('other')
Example #2
0
    def __init__(self, dir=None):
        self.dir = osutils.mkdtemp(prefix="merge-test", dir=dir)
        self.tree_root = generate_ids.gen_root_id()

        def wt(name):
            path = pathjoin(self.dir, name)
            os.mkdir(path)
            wt = controldir.ControlDir.create_standalone_workingtree(path)
            # the tests perform pulls, so need a branch that is writeable.
            wt.lock_write()
            wt.set_root_id(self.tree_root)
            wt.flush()
            tt = TreeTransform(wt)
            return wt, tt

        self.base, self.base_tt = wt('base')
        self.this, self.this_tt = wt('this')
        self.other, self.other_tt = wt('other')
Example #3
0
 def test_gen_root_id(self):
     # Mostly just make sure gen_root_id() exists
     root_id = generate_ids.gen_root_id()
     self.assertStartsWith(root_id, 'tree_root-')
Example #4
0
 def test_gen_root_id(self):
     # Mostly just make sure gen_root_id() exists
     root_id = generate_ids.gen_root_id()
     self.assertStartsWith(root_id, 'tree_root-')