Commit b859a632 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Native Mercurial: making sure full or hgitaly1 is as expected

It's easy to have a previously set feature flag value (done in
console with boolean) or at least to have doubts. Relying on
exposition of the `hgitaly1` boolean value on the `Project` model,
this makes sure we are testing what we think we are.
parent a0de115d5fd8
......@@ -929,6 +929,10 @@ class Project(object):
project.creator_id = creator_id
raise LookupError("No owner/creator information for %r", project)
if heptapod.hg_native and data['vcs_type'] == 'hg':
assert data['hgitaly1'] is (heptapod.hg_native == 'hgitaly1')
return project
......@@ -1077,6 +1081,10 @@ class Project(object):
owner_info = proj_info.get('owner')
if owner_info is not None:
assert owner_info['username'] == user_name
if heptapod.hg_native and data['vcs_type'] == 'hg':
assert proj_info['hgitaly1'] is (heptapod.hg_native == 'hgitaly1')
return cls(heptapod=heptapod,
group=group, name=project_name,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment