Skip to content

Commit

Permalink
Deprecate Project.archive()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed May 13, 2016
1 parent 45adb6e commit 24c283f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions gitlab/objects.py
Expand Up @@ -1556,7 +1556,14 @@ def repository_contributors(self):
raise_error_from_response(r, GitlabListError)
return r.json()


def archive(self, sha=None, **kwargs):
warnings.warn("`archive` is deprecated, "
"use `repository_archive` instead",
DeprecationWarning)
return self.repository_archive(path, ref_name, **kwargs)

def repository_archive(self, sha=None, **kwargs):
"""Return a tarball of the repository.
Args:
Expand Down
4 changes: 2 additions & 2 deletions tools/python_test.py
Expand Up @@ -152,8 +152,8 @@
assert(tree[0]['name'] == 'README.rst')
blob = admin_project.repository_blob('master', 'README.rst')
assert(blob == 'Initial content')
archive1 = admin_project.archive()
archive2 = admin_project.archive('master')
archive1 = admin_project.repository_archive()
archive2 = admin_project.repository_archive('master')
assert(archive1 == archive2)

# labels
Expand Down

0 comments on commit 24c283f

Please sign in to comment.