def testPushWithRevision(self):
     clone(self.repodir,
           self.wc,
           revision=self.revisions[-1],
           clone_by_rev=True)
     push(src=self.repodir, remote=self.wc, revision=self.revisions[-2])
     self.assertEquals(getRevisions(self.wc), self.revisions[-2:])
Пример #2
0
 def testPushWithForce(self):
     clone(self.repodir, self.wc, revision=self.revisions[0],
           clone_by_rev=True)
     run_cmd(['touch', 'newfile'], cwd=self.wc)
     run_cmd(['hg', 'add', 'newfile'], cwd=self.wc)
     run_cmd(['hg', 'commit', '-m', '"re-add newfile"'], cwd=self.wc)
     push(self.repodir, self.wc, push_new_branches=False, force=True)
 def testPushWithBranch(self):
     clone(self.repodir,
           self.wc,
           revision=self.revisions[-1],
           clone_by_rev=True)
     push(src=self.repodir, remote=self.wc, branch='branch2')
     push(src=self.repodir, remote=self.wc, branch='default')
     self.assertEquals(getRevisions(self.wc), self.revisions)
Пример #4
0
 def testPushWithForce(self):
     clone(self.repodir,
           self.wc,
           revision=self.revisions[0],
           clone_by_rev=True)
     run_cmd(['touch', 'newfile'], cwd=self.wc)
     run_cmd(['hg', 'add', 'newfile'], cwd=self.wc)
     run_cmd(['hg', 'commit', '-m', '"re-add newfile"'], cwd=self.wc)
     push(self.repodir, self.wc, push_new_branches=False, force=True)
Пример #5
0
 def testPushWithRevision(self):
     clone(self.repodir, self.wc, revision=self.revisions[-1],
           clone_by_rev=True)
     push(src=self.repodir, remote=self.wc, revision=self.revisions[-2])
     self.assertEquals(getRevisions(self.wc), self.revisions[-2:])
Пример #6
0
 def testPushWithBranch(self):
     clone(self.repodir, self.wc, revision=self.revisions[-1],
           clone_by_rev=True)
     push(src=self.repodir, remote=self.wc, branch='branch2')
     push(src=self.repodir, remote=self.wc, branch='default')
     self.assertEquals(getRevisions(self.wc), self.revisions)
Пример #7
0
 def testPushWithForce(self):
     clone(self.repodir, self.wc, revision=self.revisions[0], clone_by_rev=True)
     run_cmd(["touch", "newfile"], cwd=self.wc)
     run_cmd(["hg", "add", "newfile"], cwd=self.wc)
     run_cmd(["hg", "commit", "-m", '"re-add newfile"'], cwd=self.wc)
     push(self.repodir, self.wc, push_new_branches=False, force=True)