Show More
@@ -467,6 +467,9 b' class RepoModel(BaseModel):' | |||
|
467 | 467 | RepoModel().grant_user_permission( |
|
468 | 468 | repo=cur_repo, user=User.DEFAULT_USER, perm=EMPTY_PERM |
|
469 | 469 | ) |
|
470 | if kwargs.get('repo_landing_rev'): | |
|
471 | landing_rev_val = kwargs['repo_landing_rev'] | |
|
472 | RepoModel().set_landing_rev(cur_repo, landing_rev_val) | |
|
470 | 473 | |
|
471 | 474 | # handle extra fields |
|
472 | 475 | for field in filter(lambda k: k.startswith(RepositoryField.PREFIX), kwargs): |
@@ -933,6 +936,12 b' class RepoModel(BaseModel):' | |||
|
933 | 936 | if field: |
|
934 | 937 | self.sa.delete(field) |
|
935 | 938 | |
|
939 | def set_landing_rev(self, repo, landing_rev_name): | |
|
940 | if landing_rev_name.startswith('branch:'): | |
|
941 | landing_rev_name = landing_rev_name.split('branch:')[-1] | |
|
942 | scm_instance = repo.scm_instance() | |
|
943 | return scm_instance._remote.set_head_ref(landing_rev_name) | |
|
944 | ||
|
936 | 945 | def _create_filesystem_repo(self, repo_name, repo_type, repo_group, |
|
937 | 946 | clone_uri=None, repo_store_location=None, |
|
938 | 947 | use_global_config=False, install_hooks=True): |
General Comments 0
You need to be logged in to leave comments.
Login now