Skip to content

Commit ca0caeb

Browse files
committed
handle abstract git_change as object
1 parent 9188db6 commit ca0caeb

14 files changed

+24
-112
lines changed

vsts/vsts/git/v4_0/models/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from .git_base_version_descriptor import GitBaseVersionDescriptor
2525
from .git_blob_ref import GitBlobRef
2626
from .git_branch_stats import GitBranchStats
27-
from .git_change import GitChange
2827
from .git_cherry_pick import GitCherryPick
2928
from .git_commit import GitCommit
3029
from .git_commit_changes import GitCommitChanges
@@ -120,7 +119,6 @@
120119
'GitBaseVersionDescriptor',
121120
'GitBlobRef',
122121
'GitBranchStats',
123-
'GitChange',
124122
'GitCherryPick',
125123
'GitCommit',
126124
'GitCommitChanges',

vsts/vsts/git/v4_0/models/git_change.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

vsts/vsts/git/v4_0/models/git_commit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
1919
:param change_counts:
2020
:type change_counts: dict
2121
:param changes:
22-
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
22+
:type changes: list of :class:`object <git.v4_0.models.object>`
2323
:param comment:
2424
:type comment: str
2525
:param comment_truncated:
@@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
4848
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
4949
'author': {'key': 'author', 'type': 'GitUserDate'},
5050
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
51-
'changes': {'key': 'changes', 'type': '[GitChange]'},
51+
'changes': {'key': 'changes', 'type': '[object]'},
5252
'comment': {'key': 'comment', 'type': 'str'},
5353
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
5454
'commit_id': {'key': 'commitId', 'type': 'str'},

vsts/vsts/git/v4_0/models/git_commit_changes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class GitCommitChanges(Model):
1515
:param change_counts:
1616
:type change_counts: dict
1717
:param changes:
18-
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
18+
:type changes: list of :class:`object <git.v4_0.models.object>`
1919
"""
2020

2121
_attribute_map = {
2222
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
23-
'changes': {'key': 'changes', 'type': '[GitChange]'}
23+
'changes': {'key': 'changes', 'type': '[object]'}
2424
}
2525

2626
def __init__(self, change_counts=None, changes=None):

vsts/vsts/git/v4_0/models/git_commit_diffs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
2323
:param change_counts:
2424
:type change_counts: dict
2525
:param changes:
26-
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
26+
:type changes: list of :class:`object <git.v4_0.models.object>`
2727
:param common_commit:
2828
:type common_commit: str
2929
:param target_commit:
@@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
3636
'base_commit': {'key': 'baseCommit', 'type': 'str'},
3737
'behind_count': {'key': 'behindCount', 'type': 'int'},
3838
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
39-
'changes': {'key': 'changes', 'type': '[GitChange]'},
39+
'changes': {'key': 'changes', 'type': '[object]'},
4040
'common_commit': {'key': 'commonCommit', 'type': 'str'},
4141
'target_commit': {'key': 'targetCommit', 'type': 'str'}
4242
}

vsts/vsts/git/v4_0/models/git_commit_ref.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GitCommitRef(Model):
1919
:param change_counts:
2020
:type change_counts: dict
2121
:param changes:
22-
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
22+
:type changes: list of :class:`object <git.v4_0.models.object>`
2323
:param comment:
2424
:type comment: str
2525
:param comment_truncated:
@@ -44,7 +44,7 @@ class GitCommitRef(Model):
4444
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
4545
'author': {'key': 'author', 'type': 'GitUserDate'},
4646
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
47-
'changes': {'key': 'changes', 'type': '[GitChange]'},
47+
'changes': {'key': 'changes', 'type': '[object]'},
4848
'comment': {'key': 'comment', 'type': 'str'},
4949
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
5050
'commit_id': {'key': 'commitId', 'type': 'str'},

vsts/vsts/git/v4_0/models/git_pull_request_change.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,20 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------------------------
88

9-
from .git_change import GitChange
9+
from msrest.serialization import Model
1010

1111

12-
class GitPullRequestChange(GitChange):
12+
class GitPullRequestChange(Model):
1313
"""GitPullRequestChange.
1414
15-
:param change_id: Id of the change within the group. For example, within the iteration
16-
:type change_id: int
17-
:param new_content_template: New Content template to be used
18-
:type new_content_template: :class:`GitTemplate <git.v4_0.models.GitTemplate>`
19-
:param original_path: Original path of item if different from current path
20-
:type original_path: str
2115
:param change_tracking_id: Id used to track files through multiple changes
2216
:type change_tracking_id: int
2317
"""
2418

2519
_attribute_map = {
26-
'change_id': {'key': 'changeId', 'type': 'int'},
27-
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
28-
'original_path': {'key': 'originalPath', 'type': 'str'},
2920
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
3021
}
3122

32-
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
33-
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
23+
def __init__(self, change_tracking_id=None):
24+
super(GitPullRequestChange, self).__init__()
3425
self.change_tracking_id = change_tracking_id

vsts/vsts/git/v4_1/models/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from .git_base_version_descriptor import GitBaseVersionDescriptor
2424
from .git_blob_ref import GitBlobRef
2525
from .git_branch_stats import GitBranchStats
26-
from .git_change import GitChange
2726
from .git_cherry_pick import GitCherryPick
2827
from .git_commit import GitCommit
2928
from .git_commit_changes import GitCommitChanges
@@ -122,7 +121,6 @@
122121
'GitBaseVersionDescriptor',
123122
'GitBlobRef',
124123
'GitBranchStats',
125-
'GitChange',
126124
'GitCherryPick',
127125
'GitCommit',
128126
'GitCommitChanges',

vsts/vsts/git/v4_1/models/git_change.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

vsts/vsts/git/v4_1/models/git_commit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
1919
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
2020
:type change_counts: dict
2121
:param changes: An enumeration of the changes included with the commit.
22-
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
22+
:type changes: list of :class:`object <git.v4_1.models.object>`
2323
:param comment: Comment or message of the commit.
2424
:type comment: str
2525
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
@@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
4848
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
4949
'author': {'key': 'author', 'type': 'GitUserDate'},
5050
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
51-
'changes': {'key': 'changes', 'type': '[GitChange]'},
51+
'changes': {'key': 'changes', 'type': '[object]'},
5252
'comment': {'key': 'comment', 'type': 'str'},
5353
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
5454
'commit_id': {'key': 'commitId', 'type': 'str'},

vsts/vsts/git/v4_1/models/git_commit_changes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class GitCommitChanges(Model):
1515
:param change_counts:
1616
:type change_counts: dict
1717
:param changes:
18-
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
18+
:type changes: list of :class:`object <git.v4_1.models.object>`
1919
"""
2020

2121
_attribute_map = {
2222
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
23-
'changes': {'key': 'changes', 'type': '[GitChange]'}
23+
'changes': {'key': 'changes', 'type': '[object]'}
2424
}
2525

2626
def __init__(self, change_counts=None, changes=None):

vsts/vsts/git/v4_1/models/git_commit_diffs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
2323
:param change_counts:
2424
:type change_counts: dict
2525
:param changes:
26-
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
26+
:type changes: list of :class:`object <git.v4_1.models.object>`
2727
:param common_commit:
2828
:type common_commit: str
2929
:param target_commit:
@@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
3636
'base_commit': {'key': 'baseCommit', 'type': 'str'},
3737
'behind_count': {'key': 'behindCount', 'type': 'int'},
3838
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
39-
'changes': {'key': 'changes', 'type': '[GitChange]'},
39+
'changes': {'key': 'changes', 'type': '[object]'},
4040
'common_commit': {'key': 'commonCommit', 'type': 'str'},
4141
'target_commit': {'key': 'targetCommit', 'type': 'str'}
4242
}

vsts/vsts/git/v4_1/models/git_commit_ref.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GitCommitRef(Model):
1919
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
2020
:type change_counts: dict
2121
:param changes: An enumeration of the changes included with the commit.
22-
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
22+
:type changes: list of :class:`object <git.v4_1.models.object>`
2323
:param comment: Comment or message of the commit.
2424
:type comment: str
2525
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
@@ -44,7 +44,7 @@ class GitCommitRef(Model):
4444
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
4545
'author': {'key': 'author', 'type': 'GitUserDate'},
4646
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
47-
'changes': {'key': 'changes', 'type': '[GitChange]'},
47+
'changes': {'key': 'changes', 'type': '[object]'},
4848
'comment': {'key': 'comment', 'type': 'str'},
4949
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
5050
'commit_id': {'key': 'commitId', 'type': 'str'},

vsts/vsts/git/v4_1/models/git_pull_request_change.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,20 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------------------------
88

9-
from .git_change import GitChange
9+
from msrest.serialization import Model
1010

1111

12-
class GitPullRequestChange(GitChange):
12+
class GitPullRequestChange(Model):
1313
"""GitPullRequestChange.
1414
15-
:param change_id: ID of the change within the group of changes.
16-
:type change_id: int
17-
:param new_content_template: New Content template to be used when pushing new changes.
18-
:type new_content_template: :class:`GitTemplate <git.v4_1.models.GitTemplate>`
19-
:param original_path: Original path of item if different from current path.
20-
:type original_path: str
2115
:param change_tracking_id: ID used to track files through multiple changes.
2216
:type change_tracking_id: int
2317
"""
2418

2519
_attribute_map = {
26-
'change_id': {'key': 'changeId', 'type': 'int'},
27-
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
28-
'original_path': {'key': 'originalPath', 'type': 'str'},
2920
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
3021
}
3122

32-
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
33-
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
23+
def __init__(self, change_tracking_id=None):
24+
super(GitPullRequestChange, self).__init__()
3425
self.change_tracking_id = change_tracking_id

0 commit comments

Comments
 (0)