Merge pull request #52 from Microsoft/users/tedchamb/regen
add back missing git_client and bump version to 0.1.2
This commit is contained in:
Коммит
5521bfad19
|
@ -6,7 +6,7 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "vsts"
|
||||
VERSION = "0.1.1"
|
||||
VERSION = "0.1.2"
|
||||
|
||||
# To install the library, run the following
|
||||
#
|
||||
|
|
|
@ -24,7 +24,6 @@ from .git_async_ref_operation_source import GitAsyncRefOperationSource
|
|||
from .git_base_version_descriptor import GitBaseVersionDescriptor
|
||||
from .git_blob_ref import GitBlobRef
|
||||
from .git_branch_stats import GitBranchStats
|
||||
from .git_change import GitChange
|
||||
from .git_cherry_pick import GitCherryPick
|
||||
from .git_commit import GitCommit
|
||||
from .git_commit_changes import GitCommitChanges
|
||||
|
@ -120,7 +119,6 @@ __all__ = [
|
|||
'GitBaseVersionDescriptor',
|
||||
'GitBlobRef',
|
||||
'GitBranchStats',
|
||||
'GitChange',
|
||||
'GitCherryPick',
|
||||
'GitCommit',
|
||||
'GitCommitChanges',
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# Generated file, DO NOT EDIT
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from .change import Change
|
||||
|
||||
|
||||
class GitChange(Change):
|
||||
"""GitChange.
|
||||
|
||||
:param change_id: Id of the change within the group. For example, within the iteration
|
||||
:type change_id: int
|
||||
:param new_content_template: New Content template to be used
|
||||
:type new_content_template: :class:`GitTemplate <git.v4_0.models.GitTemplate>`
|
||||
:param original_path: Original path of item if different from current path
|
||||
:type original_path: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_id': {'key': 'changeId', 'type': 'int'},
|
||||
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
|
||||
'original_path': {'key': 'originalPath', 'type': 'str'}
|
||||
}
|
||||
|
||||
def __init__(self, change_id=None, new_content_template=None, original_path=None):
|
||||
super(GitChange, self).__init__()
|
||||
self.change_id = change_id
|
||||
self.new_content_template = new_content_template
|
||||
self.original_path = original_path
|
|
@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_0.models.object>`
|
||||
:param comment:
|
||||
:type comment: str
|
||||
:param comment_truncated:
|
||||
|
@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
|
|||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'author': {'key': 'author', 'type': 'GitUserDate'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'comment': {'key': 'comment', 'type': 'str'},
|
||||
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
|
||||
'commit_id': {'key': 'commitId', 'type': 'str'},
|
||||
|
|
|
@ -15,12 +15,12 @@ class GitCommitChanges(Model):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_0.models.object>`
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'}
|
||||
'changes': {'key': 'changes', 'type': '[object]'}
|
||||
}
|
||||
|
||||
def __init__(self, change_counts=None, changes=None):
|
||||
|
|
|
@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_0.models.object>`
|
||||
:param common_commit:
|
||||
:type common_commit: str
|
||||
:param target_commit:
|
||||
|
@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
|
|||
'base_commit': {'key': 'baseCommit', 'type': 'str'},
|
||||
'behind_count': {'key': 'behindCount', 'type': 'int'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'common_commit': {'key': 'commonCommit', 'type': 'str'},
|
||||
'target_commit': {'key': 'targetCommit', 'type': 'str'}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class GitCommitRef(Model):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_0.models.object>`
|
||||
:param comment:
|
||||
:type comment: str
|
||||
:param comment_truncated:
|
||||
|
@ -44,7 +44,7 @@ class GitCommitRef(Model):
|
|||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'author': {'key': 'author', 'type': 'GitUserDate'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'comment': {'key': 'comment', 'type': 'str'},
|
||||
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
|
||||
'commit_id': {'key': 'commitId', 'type': 'str'},
|
||||
|
|
|
@ -6,29 +6,20 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from .git_change import GitChange
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class GitPullRequestChange(GitChange):
|
||||
class GitPullRequestChange(Model):
|
||||
"""GitPullRequestChange.
|
||||
|
||||
:param change_id: Id of the change within the group. For example, within the iteration
|
||||
:type change_id: int
|
||||
:param new_content_template: New Content template to be used
|
||||
:type new_content_template: :class:`GitTemplate <git.v4_0.models.GitTemplate>`
|
||||
:param original_path: Original path of item if different from current path
|
||||
:type original_path: str
|
||||
:param change_tracking_id: Id used to track files through multiple changes
|
||||
:type change_tracking_id: int
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_id': {'key': 'changeId', 'type': 'int'},
|
||||
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
|
||||
'original_path': {'key': 'originalPath', 'type': 'str'},
|
||||
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
|
||||
}
|
||||
|
||||
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
|
||||
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
|
||||
def __init__(self, change_tracking_id=None):
|
||||
super(GitPullRequestChange, self).__init__()
|
||||
self.change_tracking_id = change_tracking_id
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Generated file, DO NOT EDIT
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
|
||||
from msrest.pipeline import ClientRequest
|
||||
from .git_client_base import GitClientBase
|
||||
|
||||
|
||||
class GitClient(GitClientBase):
|
||||
"""Git
|
||||
:param str base_url: Service URL
|
||||
:param Authentication creds: Authenticated credentials.
|
||||
"""
|
||||
|
||||
def __init__(self, base_url=None, creds=None):
|
||||
super(GitClient, self).__init__(base_url, creds)
|
||||
|
||||
def get_vsts_info(self, relative_remote_url):
|
||||
request = ClientRequest()
|
||||
request.url = self._client.format_url(relative_remote_url.rstrip('/') + '/vsts/info')
|
||||
request.method = 'GET'
|
||||
headers = {'Accept': 'application/json'}
|
||||
if self._suppress_fedauth_redirect:
|
||||
headers['X-TFS-FedAuthRedirect'] = 'Suppress'
|
||||
response = self._send_request(request, headers)
|
||||
return self._deserialize('VstsInfo', response)
|
|
@ -23,7 +23,6 @@ from .git_async_ref_operation_source import GitAsyncRefOperationSource
|
|||
from .git_base_version_descriptor import GitBaseVersionDescriptor
|
||||
from .git_blob_ref import GitBlobRef
|
||||
from .git_branch_stats import GitBranchStats
|
||||
from .git_change import GitChange
|
||||
from .git_cherry_pick import GitCherryPick
|
||||
from .git_commit import GitCommit
|
||||
from .git_commit_changes import GitCommitChanges
|
||||
|
@ -122,7 +121,6 @@ __all__ = [
|
|||
'GitBaseVersionDescriptor',
|
||||
'GitBlobRef',
|
||||
'GitBranchStats',
|
||||
'GitChange',
|
||||
'GitCherryPick',
|
||||
'GitCommit',
|
||||
'GitCommitChanges',
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# Generated file, DO NOT EDIT
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from .change import Change
|
||||
|
||||
|
||||
class GitChange(Change):
|
||||
"""GitChange.
|
||||
|
||||
:param change_id: ID of the change within the group of changes.
|
||||
:type change_id: int
|
||||
:param new_content_template: New Content template to be used when pushing new changes.
|
||||
:type new_content_template: :class:`GitTemplate <git.v4_1.models.GitTemplate>`
|
||||
:param original_path: Original path of item if different from current path.
|
||||
:type original_path: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_id': {'key': 'changeId', 'type': 'int'},
|
||||
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
|
||||
'original_path': {'key': 'originalPath', 'type': 'str'}
|
||||
}
|
||||
|
||||
def __init__(self, change_id=None, new_content_template=None, original_path=None):
|
||||
super(GitChange, self).__init__()
|
||||
self.change_id = change_id
|
||||
self.new_content_template = new_content_template
|
||||
self.original_path = original_path
|
|
@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
|
|||
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
|
||||
:type change_counts: dict
|
||||
:param changes: An enumeration of the changes included with the commit.
|
||||
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_1.models.object>`
|
||||
:param comment: Comment or message of the commit.
|
||||
:type comment: str
|
||||
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
|
||||
|
@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
|
|||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'author': {'key': 'author', 'type': 'GitUserDate'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'comment': {'key': 'comment', 'type': 'str'},
|
||||
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
|
||||
'commit_id': {'key': 'commitId', 'type': 'str'},
|
||||
|
|
|
@ -15,12 +15,12 @@ class GitCommitChanges(Model):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_1.models.object>`
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'}
|
||||
'changes': {'key': 'changes', 'type': '[object]'}
|
||||
}
|
||||
|
||||
def __init__(self, change_counts=None, changes=None):
|
||||
|
|
|
@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
|
|||
:param change_counts:
|
||||
:type change_counts: dict
|
||||
:param changes:
|
||||
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_1.models.object>`
|
||||
:param common_commit:
|
||||
:type common_commit: str
|
||||
:param target_commit:
|
||||
|
@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
|
|||
'base_commit': {'key': 'baseCommit', 'type': 'str'},
|
||||
'behind_count': {'key': 'behindCount', 'type': 'int'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'common_commit': {'key': 'commonCommit', 'type': 'str'},
|
||||
'target_commit': {'key': 'targetCommit', 'type': 'str'}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class GitCommitRef(Model):
|
|||
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
|
||||
:type change_counts: dict
|
||||
:param changes: An enumeration of the changes included with the commit.
|
||||
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
|
||||
:type changes: list of :class:`object <git.v4_1.models.object>`
|
||||
:param comment: Comment or message of the commit.
|
||||
:type comment: str
|
||||
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
|
||||
|
@ -44,7 +44,7 @@ class GitCommitRef(Model):
|
|||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'author': {'key': 'author', 'type': 'GitUserDate'},
|
||||
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
|
||||
'changes': {'key': 'changes', 'type': '[GitChange]'},
|
||||
'changes': {'key': 'changes', 'type': '[object]'},
|
||||
'comment': {'key': 'comment', 'type': 'str'},
|
||||
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
|
||||
'commit_id': {'key': 'commitId', 'type': 'str'},
|
||||
|
|
|
@ -6,29 +6,20 @@
|
|||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
from .git_change import GitChange
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class GitPullRequestChange(GitChange):
|
||||
class GitPullRequestChange(Model):
|
||||
"""GitPullRequestChange.
|
||||
|
||||
:param change_id: ID of the change within the group of changes.
|
||||
:type change_id: int
|
||||
:param new_content_template: New Content template to be used when pushing new changes.
|
||||
:type new_content_template: :class:`GitTemplate <git.v4_1.models.GitTemplate>`
|
||||
:param original_path: Original path of item if different from current path.
|
||||
:type original_path: str
|
||||
:param change_tracking_id: ID used to track files through multiple changes.
|
||||
:type change_tracking_id: int
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'change_id': {'key': 'changeId', 'type': 'int'},
|
||||
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
|
||||
'original_path': {'key': 'originalPath', 'type': 'str'},
|
||||
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
|
||||
}
|
||||
|
||||
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
|
||||
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
|
||||
def __init__(self, change_tracking_id=None):
|
||||
super(GitPullRequestChange, self).__init__()
|
||||
self.change_tracking_id = change_tracking_id
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
VERSION = "0.1.1"
|
||||
VERSION = "0.1.2"
|
||||
|
|
Загрузка…
Ссылка в новой задаче