##// END OF EJS Templates
forks: fixed forking with new landing rev....
marcink -
r3969:f86c0abc default
parent child Browse files
Show More
@@ -130,7 +130,6 b' class TestRepoForkViewTests(TestControll'
130 130 'repo_type': backend.alias,
131 131 'description': description,
132 132 'private': 'False',
133 'landing_rev': 'rev:tip',
134 133 'csrf_token': csrf_token,
135 134 }
136 135
@@ -159,7 +158,6 b' class TestRepoForkViewTests(TestControll'
159 158 'repo_type': backend.alias,
160 159 'description': description,
161 160 'private': 'False',
162 'landing_rev': 'rev:tip',
163 161 'csrf_token': csrf_token,
164 162 }
165 163 self.app.post(
@@ -172,8 +170,8 b' class TestRepoForkViewTests(TestControll'
172 170 route_path('repo_creating_check', repo_name=fork_name))
173 171 # test if we have a message that fork is ok
174 172 assert_session_flash(response,
175 'Forked repository %s as <a href="/%s">%s</a>'
176 % (repo_name, fork_name, fork_name))
173 'Forked repository %s as <a href="/%s">%s</a>' % (
174 repo_name, fork_name, fork_name))
177 175
178 176 # test if the fork was created in the database
179 177 fork_repo = Session().query(Repository)\
@@ -205,7 +203,6 b' class TestRepoForkViewTests(TestControll'
205 203 'repo_type': backend.alias,
206 204 'description': description,
207 205 'private': 'False',
208 'landing_rev': 'rev:tip',
209 206 'csrf_token': csrf_token,
210 207 }
211 208 self.app.post(
@@ -218,8 +215,8 b' class TestRepoForkViewTests(TestControll'
218 215 route_path('repo_creating_check', repo_name=fork_name_full))
219 216 # test if we have a message that fork is ok
220 217 assert_session_flash(response,
221 'Forked repository %s as <a href="/%s">%s</a>'
222 % (repo_name, fork_name_full, fork_name_full))
218 'Forked repository %s as <a href="/%s">%s</a>' % (
219 repo_name, fork_name_full, fork_name_full))
223 220
224 221 # test if the fork was created in the database
225 222 fork_repo = Session().query(Repository)\
@@ -218,6 +218,7 b' class RepoForksView(RepoAppView, DataGri'
218 218
219 219 # forbid injecting other repo by forging a request
220 220 post_data['fork_parent_id'] = self.db_repo.repo_id
221 post_data['landing_rev'] = self.db_repo._landing_revision
221 222
222 223 form_result = {}
223 224 task_id = None
@@ -239,7 +239,7 b' def create_repo_fork(form_data, cur_user'
239 239 private = form_data['private']
240 240 clone_uri = form_data.get('clone_uri')
241 241 repo_group = safe_int(form_data['repo_group'])
242 landing_rev = form_data['landing_rev']
242 landing_ref = form_data['landing_rev']
243 243 copy_fork_permissions = form_data.get('copy_permissions')
244 244 fork_id = safe_int(form_data.get('fork_parent_id'))
245 245
@@ -253,7 +253,7 b' def create_repo_fork(form_data, cur_user'
253 253 private=private,
254 254 clone_uri=clone_uri,
255 255 repo_group=repo_group,
256 landing_rev=landing_rev,
256 landing_rev=landing_ref,
257 257 fork_of=fork_of,
258 258 copy_fork_permissions=copy_fork_permissions
259 259 )
General Comments 0
You need to be logged in to leave comments. Login now