##// END OF EJS Templates
vcs: don't use deprecated get_changeset[s] methods.
dan -
r3112:f3f66eb3 default
parent child Browse files
Show More
@@ -65,7 +65,7 b' class TestCommentCommit(object):'
65 self, backend, status_change, message, commit_id,
65 self, backend, status_change, message, commit_id,
66 no_notifications):
66 no_notifications):
67
67
68 commit_id = backend.repo.scm_instance().get_changeset(commit_id).raw_id
68 commit_id = backend.repo.scm_instance().get_commit(commit_id).raw_id
69
69
70 id_, params = build_data(
70 id_, params = build_data(
71 self.apikey, 'comment_commit', repoid=backend.repo_name,
71 self.apikey, 'comment_commit', repoid=backend.repo_name,
@@ -74,7 +74,7 b' class TestCommentCommit(object):'
74 repo = backend.repo.scm_instance()
74 repo = backend.repo.scm_instance()
75 expected = {
75 expected = {
76 'msg': 'Commented on commit `%s` for repository `%s`' % (
76 'msg': 'Commented on commit `%s` for repository `%s`' % (
77 repo.get_changeset().raw_id, backend.repo_name),
77 repo.get_commit().raw_id, backend.repo_name),
78 'status_change': status_change,
78 'status_change': status_change,
79 'success': True
79 'success': True
80 }
80 }
@@ -65,7 +65,7 b' class StripView(RepoAppView):'
65 check = rp.get(chset)
65 check = rp.get(chset)
66
66
67 if check:
67 if check:
68 data[i] = self.db_repo.get_changeset(rp[chset])
68 data[i] = self.db_repo.get_commit(rp[chset])
69 if isinstance(data[i], EmptyCommit):
69 if isinstance(data[i], EmptyCommit):
70 data[i] = {'rev': None, 'commit': h.escape(rp[chset])}
70 data[i] = {'rev': None, 'commit': h.escape(rp[chset])}
71 else:
71 else:
@@ -99,7 +99,7 b' def _commits_as_dict(event, commit_ids, '
99
99
100 else:
100 else:
101 try:
101 try:
102 cs = vcs_repo.get_changeset(commit_id)
102 cs = vcs_repo.get_commit(commit_id)
103 except CommitDoesNotExistError:
103 except CommitDoesNotExistError:
104 continue # maybe its in next repo
104 continue # maybe its in next repo
105
105
@@ -106,7 +106,7 b' def test_strip_with_multiple_heads(backe'
106 model.strip(repo, commit_ids['b'], branch=None)
106 model.strip(repo, commit_ids['b'], branch=None)
107
107
108 vcs_repo = repo.scm_instance()
108 vcs_repo = repo.scm_instance()
109 rest_commit_ids = [c.raw_id for c in vcs_repo.get_changesets()]
109 rest_commit_ids = [c.raw_id for c in vcs_repo.get_commits()]
110 assert len(rest_commit_ids) == 4
110 assert len(rest_commit_ids) == 4
111 assert commit_ids['b'] not in rest_commit_ids
111 assert commit_ids['b'] not in rest_commit_ids
112
112
@@ -124,7 +124,7 b' def test_strip_with_single_heads(backend'
124 model.strip(repo, commit_ids['b'], branch=None)
124 model.strip(repo, commit_ids['b'], branch=None)
125
125
126 vcs_repo = repo.scm_instance()
126 vcs_repo = repo.scm_instance()
127 rest_commit_ids = [c.raw_id for c in vcs_repo.get_changesets()]
127 rest_commit_ids = [c.raw_id for c in vcs_repo.get_commits()]
128 assert len(rest_commit_ids) == 2
128 assert len(rest_commit_ids) == 2
129 assert commit_ids['b'] not in rest_commit_ids
129 assert commit_ids['b'] not in rest_commit_ids
130
130
General Comments 0
You need to be logged in to leave comments. Login now