Esempio n. 1
0
 def createWorkdir(self, repoUrl, tree={}, offset=u"", revision=None):
     wdroot = self.createTmpName()
     write_tree(wdroot, tree)
     wd = workdir.Workdir(repoUrl, u"TestSession", offset, revision, wdroot)
     wd.setLogOutput(DevNull())
     wd.use_progress_printer(False)
     self.assertTrue(wd.get_front().find_last_revision(u"TestSession"))
     return wd
Esempio n. 2
0
    def setUp(self):
        self.remove_at_teardown = []
        self.workdir1 = self.createTmpName()
        self.workdir2 = self.createTmpName()
        self.repopath = self.createTmpName()
        repository.create_repository(self.repopath, enable_deduplication = True)

        os.mkdir(self.workdir1)
        self.wd1 = workdir.Workdir(self.repopath, u"TestSession1", u"", None, self.workdir1)
        self.wd1.setLogOutput(DevNull())
        self.wd1.use_progress_printer(False)
        self.wd1.get_front().mksession(u"TestSession1")

        os.mkdir(self.workdir2)
        self.wd2 = workdir.Workdir(self.repopath, u"TestSession2", u"", None, self.workdir2)
        self.wd2.setLogOutput(DevNull())
        self.wd2.use_progress_printer(False)
        self.wd2.get_front().mksession(u"TestSession2")
Esempio n. 3
0
 def testPartialCheckout(self):
     self.createTestRepo()
     os.mkdir(self.workdir)
     wd = workdir.Workdir(self.repopath, u"TestSession", u"mysubdir", None, self.workdir)
     wd.setLogOutput(DevNull())
     wd.use_progress_printer(False)
     wd.checkout()
     tree = get_tree(wd.root, sep = "/", absolute_paths = False)
     #tree = wd.get_tree(absolute_paths = True)
     self.assertEqual(set(tree), set(["insubdir.txt", '.boar/info', '.boar/wd_version.txt']))
Esempio n. 4
0
 def setUp(self):
     self.remove_at_teardown = []
     self.workdir = self.createTmpName()
     self.repopath = self.createTmpName()
     repository.create_repository(self.repopath, enable_deduplication = True)
     os.mkdir(self.workdir)
     self.wd = workdir.Workdir(self.repopath, u"TestSession", u"", None, self.workdir)
     self.wd.setLogOutput(DevNull())
     self.wd.use_progress_printer(False)
     self.repo = self.wd.front.repo
     id = self.wd.get_front().mksession(u"TestSession")
     assert id == 1
Esempio n. 5
0
 def createTestRepo(self):
     os.mkdir(self.workdir)
     wd = workdir.Workdir(self.repopath, u"TestSession", u"", None, self.workdir)
     wd.setLogOutput(DevNull())
     wd.use_progress_printer(False)
     self.addWorkdirFile("onlyintopdir.txt", "nothing")
     self.mkdir("mysubdir")
     self.addWorkdirFile("mysubdir/insubdir.txt", "nothing2")
     id = wd.get_front().mksession(u"TestSession")
     assert id == 1
     id = wd.checkin()
     assert id == 2
     shutil.rmtree(self.workdir, ignore_errors = True)