diffmanifests 3.2.3__py2.py3-none-any.whl → 3.3.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of diffmanifests might be problematic. Click here for more details.

@@ -1,3 +1,3 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- VERSION = '3.2.3'
3
+ VERSION = '3.3.0'
@@ -49,6 +49,7 @@ class Commit:
49
49
  COMMITTER = 'committer'
50
50
  DATE = 'date'
51
51
  DIFF = 'diff'
52
+ HASHTAGS = 'hashtags'
52
53
  MESSAGE = 'message'
53
54
  REPO = 'repo'
54
55
  TOPIC = 'topic'
@@ -28,10 +28,10 @@ class Querier(object):
28
28
  def _query(commit):
29
29
  buf = self.gerrit.query('commit:' + commit, 0)
30
30
  if buf is None or len(buf) != 1:
31
- return '', ''
32
- return self.gerrit.url().replace('/a', '/') + str(buf[0]['_number']), buf[0].get('topic', '')
31
+ return '', '', []
32
+ return self.gerrit.url().replace('/a', '/') + str(buf[0]['_number']), buf[0].get('topic', ''), buf[0].get('hashtags', [])
33
33
 
34
- change, topic = _query(commit['commit'])
34
+ change, topic, hashtags = _query(commit['commit'])
35
35
  return [{
36
36
  Commit.AUTHOR: '%s <%s>' % (commit['author']['name'], commit['author']['email']),
37
37
  Commit.BRANCH: branch,
@@ -40,6 +40,7 @@ class Querier(object):
40
40
  Commit.COMMITTER: '%s <%s>' % (commit['committer']['name'], commit['committer']['email']),
41
41
  Commit.DATE: commit['author']['time'],
42
42
  Commit.DIFF: label.upper(),
43
+ Commit.HASHTAGS: hashtags,
43
44
  Commit.MESSAGE: commit['message'].strip(),
44
45
  Commit.REPO: repo,
45
46
  Commit.TOPIC: topic,
@@ -52,6 +53,7 @@ class Querier(object):
52
53
  if '\u4e00' <= item <= '\u9fff':
53
54
  return True
54
55
  return False
56
+
55
57
  buf1 = " ".join(commit1['committer']['time'].split(" ")[1:])
56
58
  if _helper(buf1) is True:
57
59
  buf1 = datetime.datetime.strptime(buf1, '%m月 %d %H:%M:%S %Y %z')
@@ -76,7 +78,7 @@ class Querier(object):
76
78
  completed = False
77
79
  next = commits.get('next', None) if backward else commits.get('previous', None)
78
80
  for item in commits['log']:
79
- if item['commit'] == commit1[Repo.COMMIT]:
81
+ if item['commit'] == commit1[Repo.COMMIT] or item['commit'].startswith(commit1[Repo.COMMIT]):
80
82
  completed = True
81
83
  break
82
84
  if (backward and self._ahead(item, commit)) \
@@ -0,0 +1,175 @@
1
+ Metadata-Version: 2.4
2
+ Name: diffmanifests
3
+ Version: 3.3.0
4
+ Summary: Diff Manifests via Gitiles API
5
+ Home-page: https://github.com/craftslab/diffmanifests
6
+ Download-URL: https://github.com/craftslab/diffmanifests/archive/v3.3.0.tar.gz
7
+ Author: Jia Jia
8
+ Author-email: angersax@sina.com
9
+ License: Apache-2.0
10
+ Keywords: diff,manifests,gitiles,api
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Operating System :: OS Independent
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: colorama
17
+ Requires-Dist: requests
18
+ Requires-Dist: xmltodict
19
+ Provides-Extra: dev
20
+ Requires-Dist: coverage; extra == "dev"
21
+ Requires-Dist: coveralls; extra == "dev"
22
+ Requires-Dist: openpyxl; extra == "dev"
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Requires-Dist: setuptools; extra == "dev"
25
+ Requires-Dist: twine; extra == "dev"
26
+ Requires-Dist: wheel; extra == "dev"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: download-url
33
+ Dynamic: home-page
34
+ Dynamic: keywords
35
+ Dynamic: license
36
+ Dynamic: license-file
37
+ Dynamic: provides-extra
38
+ Dynamic: requires-dist
39
+ Dynamic: summary
40
+
41
+ # diffmanifests
42
+
43
+ [![PyPI](https://img.shields.io/pypi/v/diffmanifests.svg?color=brightgreen)](https://pypi.org/project/diffmanifests/)
44
+ [![Coverage Status](https://coveralls.io/repos/github/craftslab/diffmanifests/badge.svg?branch=master)](https://coveralls.io/github/craftslab/diffmanifests?branch=master)
45
+ [![License](https://img.shields.io/github/license/craftslab/diffmanifests.svg?color=brightgreen)](https://github.com/craftslab/diffmanifests/blob/master/LICENSE)
46
+
47
+
48
+
49
+ *diffmanifests* is a tool used to see deeper differences between manifests via Gerrit & Gitiles API.
50
+
51
+
52
+
53
+ ## Requirement
54
+
55
+ - Python >= 3.7
56
+
57
+
58
+
59
+ ## Install
60
+
61
+ ```bash
62
+ pip install diffmanifests
63
+ ```
64
+
65
+
66
+
67
+ ## Update
68
+
69
+ ```bash
70
+ pip install diffmanifests --upgrade
71
+ ```
72
+
73
+
74
+
75
+ ## Run
76
+
77
+ ```bash
78
+ diffmanifests --config-file config.json --manifest1-file manifest1.xml --manifest2-file manifest2.xml --output-file output.json
79
+ ```
80
+
81
+
82
+
83
+ ## Settings
84
+
85
+ *Diff Manifests* parameters can be set in the directory [config](https://github.com/craftslab/diffmanifests/blob/master/diffmanifests/config).
86
+
87
+ An example of configuration in [config.json](https://github.com/craftslab/diffmanifests/blob/master/diffmanifests/config/config.json):
88
+
89
+ ```json
90
+ {
91
+ "gerrit": {
92
+ "pass": "pass",
93
+ "url": "http://localhost:80",
94
+ "user": "user"
95
+ },
96
+ "gitiles": {
97
+ "pass": "pass",
98
+ "retry": 1,
99
+ "timeout": -1,
100
+ "url": "http://localhost:80",
101
+ "user": "user"
102
+ }
103
+ }
104
+ ```
105
+
106
+
107
+
108
+ ## Features
109
+
110
+ *Diff Manifests* supports the following capabilities:
111
+
112
+ ### 📊 Manifest Comparison
113
+
114
+ Compare commit 2 with commit 1 in diagram A/B/C to identify changes between manifest versions.
115
+
116
+ ![branch](branch.png)
117
+
118
+
119
+
120
+ ### 🏷️ Hashtags Support
121
+
122
+ The tool includes comprehensive support for querying changes with hashtags from the Gerrit REST API v3.12.1. This feature enhances change tracking and categorization.
123
+
124
+ **Key Benefits:**
125
+
126
+ - Automatic hashtag extraction from Gerrit changes
127
+ - Enhanced change categorization and filtering
128
+ - Better integration with Gerrit workflows
129
+ - Graceful fallback for changes without hashtags
130
+
131
+ **Output Structure:**
132
+
133
+ Each commit in the output JSON now includes a `hashtags` field containing an array of hashtags:
134
+
135
+ ```json
136
+ {
137
+ "author": "Developer Name <dev@example.com>",
138
+ "branch": "master",
139
+ "change": "https://gerrit.example.com/c/12345",
140
+ "commit": "abc123def456789...",
141
+ "committer": "Developer Name <dev@example.com>",
142
+ "date": "2025-08-20 12:00:00 +0000",
143
+ "diff": "ADD COMMIT",
144
+ "hashtags": ["security", "cve", "bugfix"],
145
+ "message": "Fix security vulnerability CVE-2025-1234",
146
+ "repo": "platform/frameworks/base",
147
+ "topic": "security-fix",
148
+ "url": "https://android.googlesource.com/platform/frameworks/base/+/abc123def456789"
149
+ }
150
+ ```
151
+
152
+ **Examples of hashtag usage:**
153
+
154
+ - `["feature", "ui", "enhancement"]` - New UI features
155
+ - `["bugfix", "critical"]` - Critical bug fixes
156
+ - `["security", "cve"]` - Security-related changes
157
+ - `[]` - Changes without hashtags (empty array)
158
+
159
+ **Technical Details:**
160
+
161
+ - Hashtags are retrieved using the [Gerrit REST API ChangeInfo entity](https://gerrit-documentation.storage.googleapis.com/Documentation/3.12.1/rest-api-changes.html#change-info)
162
+ - Automatic error handling ensures stable operation even when hashtags are unavailable
163
+ - Backward compatibility maintained for existing workflows
164
+
165
+
166
+
167
+ ## License
168
+
169
+ Project License can be found [here](https://github.com/craftslab/diffmanifests/blob/master/LICENSE).
170
+
171
+
172
+
173
+ ## Reference
174
+
175
+ [git-repo/subcmds/diffmanifests](https://gerrit.googlesource.com/git-repo/+/master/subcmds/diffmanifests.py)
@@ -3,7 +3,7 @@ diffmanifests/main.py,sha256=SI14T_8yTuzC1KOQL-QpXwPKlALr1DyI1KBM1vIhFtI,2179
3
3
  diffmanifests/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  diffmanifests/cmd/argument.py,sha256=vP7Wlczk1KFGtubNrLRrp3B6imuOexkeAzb8AzbzOGM,1736
5
5
  diffmanifests/cmd/banner.py,sha256=kpqxOlU4_wJxOswV_iX6eevNppSbn08O-aII-AjEAFQ,297
6
- diffmanifests/cmd/version.py,sha256=iyCML-3XM1tH7T5W3OC15fi6qECM7PVyOtR4g_7ZQjc,43
6
+ diffmanifests/cmd/version.py,sha256=BYu5-Osvb9q6KdQL_2JrUPd9ClswN93eZWyHi9MtGSE,43
7
7
  diffmanifests/config/config.json,sha256=xYVNdl-xZAs_VzvB_vzgQF3zaMZq9Zam1ncCXOPxKfM,299
8
8
  diffmanifests/differ/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  diffmanifests/differ/differ.py,sha256=nIfwogtTMeTlofoaiX-wYRKHYx4m3T7LwKbRlMZqpdc,3436
@@ -16,12 +16,12 @@ diffmanifests/logger/logger.py,sha256=uxofaUpOd2IzEoVImNMztDzqk_F939b7FcePJ6_Vbz
16
16
  diffmanifests/printer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  diffmanifests/printer/printer.py,sha256=Fbqy6wqxiIgOPnVESzXHDFTslTZpfrvESdpPLxWe-kM,3467
18
18
  diffmanifests/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- diffmanifests/proto/proto.py,sha256=QqdUlDvUpqvKtSonPocBzoEiDE4a7ZhtcEW-4NHoiFE,1275
19
+ diffmanifests/proto/proto.py,sha256=sQ808ExLEA_u7eQkYrKkeFkAn3jPEgujz69S52FiyfQ,1301
20
20
  diffmanifests/querier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- diffmanifests/querier/querier.py,sha256=SVAXIhadoi8u5HSUuDB5SIc07e8mBqD00L6COEbHVnw,7161
22
- diffmanifests-3.2.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
- diffmanifests-3.2.3.dist-info/METADATA,sha256=YRp8XG0AA0D0f7XpB83XCDnFkJESRgfj-4bbpMLvYms,2553
24
- diffmanifests-3.2.3.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
25
- diffmanifests-3.2.3.dist-info/entry_points.txt,sha256=l9pmGB0o1VRTFRza8MFEI6_PcOpBJV1BCbdunD7I4kY,58
26
- diffmanifests-3.2.3.dist-info/top_level.txt,sha256=EHlzZzRVketGFo3Qhjb1pGSfn2FjXZOLmjuTsCqIHlA,14
27
- diffmanifests-3.2.3.dist-info/RECORD,,
21
+ diffmanifests/querier/querier.py,sha256=QZmdO2Yr68kM2IDA8fgBvfyaC-k53ugXbxDGLXZWye4,7294
22
+ diffmanifests-3.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
+ diffmanifests-3.3.0.dist-info/METADATA,sha256=Tksb0hWczev6hTOEMq5JFKJiM7t76FtOcgbeTwURd_c,4718
24
+ diffmanifests-3.3.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
25
+ diffmanifests-3.3.0.dist-info/entry_points.txt,sha256=l9pmGB0o1VRTFRza8MFEI6_PcOpBJV1BCbdunD7I4kY,58
26
+ diffmanifests-3.3.0.dist-info/top_level.txt,sha256=EHlzZzRVketGFo3Qhjb1pGSfn2FjXZOLmjuTsCqIHlA,14
27
+ diffmanifests-3.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -1,109 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: diffmanifests
3
- Version: 3.2.3
4
- Summary: Diff Manifests via Gitiles API
5
- Home-page: https://github.com/craftslab/diffmanifests
6
- Download-URL: https://github.com/craftslab/diffmanifests/archive/v3.2.3.tar.gz
7
- Author: Jia Jia
8
- Author-email: angersax@sina.com
9
- License: Apache-2.0
10
- Keywords: diff,manifests,gitiles,api
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: License :: OSI Approved :: Apache Software License
13
- Classifier: Operating System :: OS Independent
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: colorama
17
- Requires-Dist: coverage
18
- Requires-Dist: coveralls
19
- Requires-Dist: openpyxl
20
- Requires-Dist: pytest
21
- Requires-Dist: requests
22
- Requires-Dist: setuptools
23
- Requires-Dist: twine
24
- Requires-Dist: wheel
25
- Requires-Dist: xmltodict
26
-
27
- # diffmanifests
28
-
29
- [![PyPI](https://img.shields.io/pypi/v/diffmanifests.svg?color=brightgreen)](https://pypi.org/project/diffmanifests/)
30
- [![Coverage Status](https://coveralls.io/repos/github/craftslab/diffmanifests/badge.svg?branch=master)](https://coveralls.io/github/craftslab/diffmanifests?branch=master)
31
- [![License](https://img.shields.io/github/license/craftslab/diffmanifests.svg?color=brightgreen)](https://github.com/craftslab/diffmanifests/blob/master/LICENSE)
32
-
33
-
34
-
35
- *diffmanifests* is a tool used to see deeper differences between manifests via Gerrit & Gitiles API.
36
-
37
-
38
- ## Requirement
39
-
40
- - Python >= 3.7
41
-
42
-
43
-
44
- ## Install
45
-
46
- ```bash
47
- pip install diffmanifests
48
- ```
49
-
50
-
51
-
52
- ## Update
53
-
54
- ```bash
55
- pip install diffmanifests --upgrade
56
- ```
57
-
58
-
59
-
60
- ## Run
61
-
62
- ```bash
63
- diffmanifests --config-file config.json --manifest1-file manifest1.xml --manifest2-file manifest2.xml --output-file output.json
64
- ```
65
-
66
-
67
-
68
- ## Settings
69
-
70
- *Diff Manifests* parameters can be set in the directory [config](https://github.com/craftslab/diffmanifests/blob/master/diffmanifests/config).
71
-
72
- An example of configuration in [config.json](https://github.com/craftslab/diffmanifests/blob/master/diffmanifests/config/config.json):
73
-
74
- ```json
75
- {
76
- "gerrit": {
77
- "pass": "pass",
78
- "url": "http://localhost:80",
79
- "user": "user"
80
- },
81
- "gitiles": {
82
- "pass": "pass",
83
- "retry": 1,
84
- "timeout": -1,
85
- "url": "http://localhost:80",
86
- "user": "user"
87
- }
88
- }
89
- ```
90
-
91
-
92
-
93
- ## Feature
94
-
95
- *Diff Manifests* supports to compare commit 2 with commit 1 in diagram A/B/C.
96
-
97
- ![branch](branch.png)
98
-
99
-
100
-
101
- ## License
102
-
103
- Project License can be found [here](https://github.com/craftslab/diffmanifests/blob/master/LICENSE).
104
-
105
-
106
-
107
- ## Reference
108
-
109
- [git-repo/subcmds/diffmanifests](https://gerrit.googlesource.com/git-repo/+/master/subcmds/diffmanifests.py)