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:])
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)
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)