| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
From now only the REST API is supported.
This makes installation of the package a bit lighter as we no
longer depend on paramiko and pycrypto
Change-Id: Ieda773d596fd43047c05895f3304690ddf709094
|
| |
|
|
| |
Change-Id: I083eca93f4969fa9c2d157da39f342de62cf5fd6
|
| |
|
|
|
|
| |
* client.stop_event_stream() was not closing
Change-Id: Idf38565332a7865063caf614992ba376804da1a7
|
| |
|
|
| |
Change-Id: I65d45f11f3b467f4cf8bc34a4a63749406d78abf
|
| |
|
|
|
|
|
| |
kwargs now made passable to request functions so that lower-level
python-requests interface can be fully utilized.
Change-Id: I38eff49314a3966546e0b272af2e58ed276269d9
|
| |
|
|
| |
Change-Id: I64f69dc544129772446f4995e6f148c388cb0f62
|
| |
|
|
| |
Change-Id: I32b970452809d31037ad15783d2f50e894e530ed
|
| |
|
|
|
|
|
| |
Include the account information for the user who gave the
approval.
Change-Id: I3857c9913c38a5c5223111274314e107f4c81090
|
| |
|
|
|
|
|
| |
The "currentPatchset" field of the query results includes information
about the review label scores.
Change-Id: I41d54225284e15b2b61b79bfaa309cd5c2b4b86a
|
| |
|
|
| |
Change-Id: I188e4cc116878cdd6679e45bf3ee545b20ce974e
|
| |
|
|
|
|
|
|
|
|
|
| |
The from_json method returns None if the key does not exist
in the json data, so we don't need to check for existence of
the key when constructing the object.
This also ensures that the constructed object has a sortkey
member.
Change-Id: Ic342f8b25aeded0e999f93fa29190853354c57f0
|
| |
|
|
|
|
|
| |
Remove GerritRestAPIError. Raise requests.HTTPError when a request
results in an HTTP Error. Raise ValueError in other places.
Change-Id: I25188f64161a6ca8159e7777e3f288f775463c25
|
| |
|
|
| |
Change-Id: I91b90d26fde775d5d58ee127fd9015757090a978
|
| |
|
|
| |
Change-Id: If1863c06619a11f93efc7c25c7c33c749950d6a5
|
| |
|
|
|
|
|
|
|
|
| |
If the username is not given in the constructor, it is detected
from the ssh config.
Add a method that allows the client to get the detected username
that was used to connect to Gerrit.
Change-Id: I15747d1446b07ce6b250f294fe72842a1be50a6c
|
| |
|
|
| |
Change-Id: I031b9293fd6ae3afe28e114b8d5ecc6de34f1bb3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 06c88c8 (merged with pull request #13) added exception
handling:
except Exception as e:
which causes a pylint warning:
W0703: Catching too general exception Exception
However in this case we actually do want to catch all types
of exception because the intention is to make sure pygerrit
doesn't fall over when something unexpected happens.
Add a suppression of this warning. The suppression is only
effective on this particular line; the warning will be raised
again if we do the same thing again somewhere else.
Change-Id: If812d441c1dc625651db34c6d3763cedc98b68a9
|
| |\
| |
| | |
Avoid busy loop when receiving incoming stream data.
|
| | | |
|
| | |
| |
| |
| |
| | |
Checking whether bytes are available is a non-blocking operation,
causing the receive loop to become a busy loop.
|
| | |
| |
| |
| | |
Change-Id: I16ef5fe0ba55902985c8cfec1d4845a3533ad82c
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master:
Add myself to authors
Add an authors list that contributors can add themselves to
Fix indentation
Reason is optional in abandon and restore changes
Return sortKey from query result, to allow resuming query.
Change-Id: I357d82fee44c47f960000b8db4f7c6d0d95a0993
|
| | |\ \
| | | |
| | | | |
Return sortKey from query result, to allow resuming query.
|
| | | | | |
|
| | | |/
| | |
| | |
| | | |
This is required to be able to retrieve more than 500 changes using the query interface.
|
| | |/ |
|
| |/
|
|
| |
Change-Id: I124054f2ba667f41ba5e916e3832e6a341b4ae96
|
| |
|
|
|
|
|
|
|
|
| |
Instead of trying to abstract the authentication away from the client,
allow the client to provide the authentication handler.
Implement simple handlers for HTTP basic and digest authentication with
credentials from netrc.
Change-Id: Icd6c7d359ecbd441308bc6f67fd19c7f55ebcb8f
|
| |
|
|
|
|
|
| |
Add a convenience method to construct the url to be passed to the
server, from the base url and the given endpoint.
Change-Id: I1725a371aa8a82c132039a9614bf20223af591f3
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master:
Bump version to 0.1.1
Add changelog
Fix #10: Allow to manually specify ssh username and port
Completely refactor the stream event handling
Add missing __repr__ methods on ErrorEvent and UnhandledEvent
Fix initialisation of error event
Fix #11: correct handling of `identityfile` in the ssh config
Allow example script to continue if errors are received
Fix #9: Add a bit more detail in the documentation
Fix #8: Support the "topic-changed" stream event
Fix #7: Support the "reviewer-added" stream event
Fix #6: Support the "merge-failed" stream event
Fix #5: Move json parsing and error handling into the event factory
Improved logging in the example script
Fix #3: Don't treat unhandled event types as errors
Fix #4: Keep event's raw json data in the event object
Add __repr__ methods on event and model classes
Remove redundant `exec_command` method
Fix #2: Establish SSH connection in a thread-safe way
Fix #1: Use select.select() instead of select.poll()
Change-Id: Ib91384b16acca30bfc5aadcdc1131c8bdecef583
|
| | |
| |
| |
| | |
Change-Id: Id2a68941ddfbeaee540406e821f1df09408c198f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the username and port are specified when constructing the client,
they will be used instead of attempting to fetch from the ssh config
file.
In this case the full hostname of the server is required, rather
than only the name as listed in the ssh config.
Change-Id: I82b8638d99922c9b40a54a8275ffc085f505696f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of using select.select() to wait for input, use the methods
provided by paramiko's client channel object.
Read from both stdout and stderr, and send ErrorEvent if anything is
received on stderr.
Ref #1
Fix #12
Change-Id: Ic67392cb9d689a1f457f5d02eb17a5432112a0c0
|
| | |
| |
| |
| |
| |
| | |
Also fix a minor coding style issue.
Change-Id: Ib366a816e5cf979eb94c7ce545d1c87c6c3984c8
|
| | |
| |
| |
| | |
Change-Id: I19e955c3ca7c84600ec89ff24d5c7458202ff609
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The `identityfile` element of the result returned by SSHConfig.lookup()
is a list, not a string, therefore calling `expanduser` on it results
in a crash.
Change-Id: I8673295d66cac9ca3b522867735b1211f0556d21
|
| | |
| |
| |
| | |
Change-Id: I70b9cbea1da20a1434eea39e3d8e85e94357b792
|
| | |
| |
| |
| | |
Change-Id: I72ece72c08ddc6da31c14db35dd84f35d61d39ed
|
| | |
| |
| |
| | |
Change-Id: I3308b44dc1bbfcaa70e38cb4857c2241c551cfa4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pass the raw string into the event factory and parse it to a json
object there. If the string is not valid json, generate an error
event.
Add a unit test for handling of invalid json on the event stream.
Change-Id: I209a89fd28c3a594b71443fc106e25d58c5cc1ea
|
| | |
| |
| |
| |
| |
| |
| |
| | |
If an unknown event is received on the event stream, for example if a
new event has been added in a later version of Gerrit, do not raise
an error. Instead, generate an "UnhandledEvent" event.
Change-Id: Ia1902bf4a54883011b7ad3e004f58a2ba8739b21
|
| | |
| |
| |
| |
| |
| |
| |
| | |
If any future versions of Gerrit add data elements that are not
encapsulated by the event class, clients will be able to access them
via the raw json data.
Change-Id: Ia689acb808f9d200f53b86c60f024e865dd12a18
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This gives more meaningful output when doing:
print(event)
and means it's not necessary to use str(event).
Change-Id: I3c1546ab89c481bec24fbc4445ed7f33aa05eff8
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The `exec_command` overrides the method of the same name from the
parent class unnecessarily.
Remove it and call the parent `exec_command` method directly from the
`run_gerrit_command` method.
Change-Id: I977000a372c9b6e9143ca0e740b971a606a83146
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Use an Event(), rather than a boolean, to determine whether or not
the remote is connected.
Protect the connection logic with a Lock().
Change-Id: Ifc5888894a90b7e3a11e21ec3f9bf69f0a7608a8
|
| | |
| |
| |
| |
| |
| |
| |
| | |
select.poll() does not work on all platforms.
Replace it with select.select().
Change-Id: Iadd09127c99b5b47ebc28f6f4e57fcc1eb4c8710
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The initial intention was for these to only be used internally,
and add wrapper methods to be used by clients.
Instead, we now make them public, allowing the API to be used
as a basic REST client before any wrappers are added.
Change-Id: Icfa92125466b9b798ac30fb865d2d15a2892f552
|
| | |
| |
| |
| | |
Change-Id: I8a7557818cd3c207035ef627e6912ee945c083c6
|
| | |
| |
| |
| | |
Change-Id: I9cdb6b7ff2bf6ea20925c5b2eac68ef454a6ea23
|
| | |
| |
| |
| |
| |
| |
| | |
If the username and password are given, pass them to the
request with HTTP digest authentication.
Change-Id: If15628262a4ef6b370c3d0794dbc9ecd3a0be624
|