vcs: don't use deprecated get_changeset[s] methods.
This commit is contained in:
parent
9c9c8c16b7
commit
21e7eef112
4 changed files with 6 additions and 6 deletions
|
|
@ -65,7 +65,7 @@ class TestCommentCommit(object):
|
|||
self, backend, status_change, message, commit_id,
|
||||
no_notifications):
|
||||
|
||||
commit_id = backend.repo.scm_instance().get_changeset(commit_id).raw_id
|
||||
commit_id = backend.repo.scm_instance().get_commit(commit_id).raw_id
|
||||
|
||||
id_, params = build_data(
|
||||
self.apikey, 'comment_commit', repoid=backend.repo_name,
|
||||
|
|
@ -74,7 +74,7 @@ class TestCommentCommit(object):
|
|||
repo = backend.repo.scm_instance()
|
||||
expected = {
|
||||
'msg': 'Commented on commit `%s` for repository `%s`' % (
|
||||
repo.get_changeset().raw_id, backend.repo_name),
|
||||
repo.get_commit().raw_id, backend.repo_name),
|
||||
'status_change': status_change,
|
||||
'success': True
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class StripView(RepoAppView):
|
|||
check = rp.get(chset)
|
||||
|
||||
if check:
|
||||
data[i] = self.db_repo.get_changeset(rp[chset])
|
||||
data[i] = self.db_repo.get_commit(rp[chset])
|
||||
if isinstance(data[i], EmptyCommit):
|
||||
data[i] = {'rev': None, 'commit': h.escape(rp[chset])}
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ def _commits_as_dict(event, commit_ids, repos):
|
|||
|
||||
else:
|
||||
try:
|
||||
cs = vcs_repo.get_changeset(commit_id)
|
||||
cs = vcs_repo.get_commit(commit_id)
|
||||
except CommitDoesNotExistError:
|
||||
continue # maybe its in next repo
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ def test_strip_with_multiple_heads(backend_hg):
|
|||
model.strip(repo, commit_ids['b'], branch=None)
|
||||
|
||||
vcs_repo = repo.scm_instance()
|
||||
rest_commit_ids = [c.raw_id for c in vcs_repo.get_changesets()]
|
||||
rest_commit_ids = [c.raw_id for c in vcs_repo.get_commits()]
|
||||
assert len(rest_commit_ids) == 4
|
||||
assert commit_ids['b'] not in rest_commit_ids
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ def test_strip_with_single_heads(backend_hg):
|
|||
model.strip(repo, commit_ids['b'], branch=None)
|
||||
|
||||
vcs_repo = repo.scm_instance()
|
||||
rest_commit_ids = [c.raw_id for c in vcs_repo.get_changesets()]
|
||||
rest_commit_ids = [c.raw_id for c in vcs_repo.get_commits()]
|
||||
assert len(rest_commit_ids) == 2
|
||||
assert commit_ids['b'] not in rest_commit_ids
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue