| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f4c4e52 commit ebd6217
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -193,6 +193,10 @@ Get a list of users for the repository:: | |||
| 193 | 193 | # search for users | |
| 194 | 194 | users = p.users.list(search='pattern') | |
| 195 | 195 | ||
| 196 | + Start the pull mirroring process (EE edition):: | ||
| 197 | + | ||
| 198 | + project.mirror_pull() | ||
| 199 | + | ||
| 196 | 200 | Import / Export | |
| 197 | 201 | =============== | |
| 198 | 202 | ||
@@ -331,7 +335,7 @@ Update a file. The entire content must be uploaded, as plain text or as base64 | |||
| 331 | 335 | encoded text:: | |
| 332 | 336 | ||
| 333 | 337 | f.content = 'new content' | |
| 334 | - f.save(branch='master', commit_message='Update testfile') | ||
| 338 | + f.save(branch='master', commit_message='Update testfile') | ||
| 335 | 339 | ||
| 336 | 340 | # or for binary data | |
| 337 | 341 | # Note: decode() is required with python 3 for data serialization. You can omit | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3357,6 +3357,21 @@ def search(self, scope, search, **kwargs): | |||
| 3357 | 3357 | path = '/projects/%d/search' % self.get_id() | |
| 3358 | 3358 | return self.manager.gitlab.http_list(path, query_data=data, **kwargs) | |
| 3359 | 3359 | ||
| 3360 | + @cli.register_custom_action('Project') | ||
| 3361 | + @exc.on_http_error(exc.GitlabCreateError) | ||
| 3362 | + def mirror_pull(self, **kwargs): | ||
| 3363 | + """Start the pull mirroring process for the project. | ||
| 3364 | + | ||
| 3365 | + Args: | ||
| 3366 | + **kwargs: Extra options to send to the server (e.g. sudo) | ||
| 3367 | + | ||
| 3368 | + Raises: | ||
| 3369 | + GitlabAuthenticationError: If authentication is not correct | ||
| 3370 | + GitlabCreateError: If the server failed to perform the request | ||
| 3371 | + """ | ||
| 3372 | + path = '/projects/%d/mirror/pull' % self.get_id() | ||
| 3373 | + return self.manager.gitlab.http_post(path, **kwargs) | ||
| 3374 | + | ||
| 3360 | 3375 | ||
| 3361 | 3376 | class ProjectManager(CRUDMixin, RESTManager): | |
| 3362 | 3377 | _path = '/projects' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments