• Home
  • Raw
  • Download

Lines Matching full:change

106     br'change is closed',
107 br'Cannot reduce vote on labels for closed change',
113 GOB_ERROR_REASON_CLOSED_CHANGE = 'CLOSED CHANGE'
391 first_param: A change identifier
419 "MultiQueryChanges requires a list of change numbers/id's")
444 """Given a gerrit host name and change number, return change page url."""
448 def _GetChangePath(change): argument
449 """Given a change id, return a path prefix for the change."""
450 return 'changes/%s' % str(change).replace('/', '%2F')
453 def GetChangeUrl(host, change): argument
454 """Given a gerrit host name and change id, return an url for the change."""
455 return 'https://%s/a/%s' % (host, _GetChangePath(change))
458 def GetChange(host, change): argument
459 """Query a gerrit server for information about a single change."""
460 return FetchUrlJson(host, _GetChangePath(change))
463 def GetChangeReview(host, change, revision=None): argument
464 """Get the current review information for a change."""
467 path = '%s/revisions/%s/review' % (_GetChangePath(change), revision)
471 def GetChangeCommit(host, change, revision=None): argument
472 """Get the current review information for a change."""
475 path = '%s/revisions/%s/commit' % (_GetChangePath(change), revision)
479 def GetChangeCurrentRevision(host, change): argument
480 """Get information about the latest revision for a given change."""
481 jmsg = GetChangeReview(host, change)
486 def GetChangeDetail(host, change, o_params=None): argument
487 """Query a gerrit server for extended information about a single change."""
488 path = '%s/detail' % _GetChangePath(change)
494 def GetChangeReviewers(host, change): argument
495 """Get information about all reviewers attached to a change.
499 change: The Gerrit change ID.
502 GetReviewers(host, change)
505 def ReviewedChange(host, change): argument
506 """Mark a gerrit change as reviewed."""
507 path = '%s/reviewed' % _GetChangePath(change)
511 def UnreviewedChange(host, change): argument
512 """Mark a gerrit change as unreviewed."""
513 path = '%s/unreviewed' % _GetChangePath(change)
517 def IgnoreChange(host, change): argument
518 """Ignore a gerrit change."""
519 path = '%s/ignore' % _GetChangePath(change)
523 def UnignoreChange(host, change): argument
524 """Unignore a gerrit change."""
525 path = '%s/unignore' % _GetChangePath(change)
529 def AbandonChange(host, change, msg=''): argument
530 """Abandon a gerrit change."""
531 path = '%s/abandon' % _GetChangePath(change)
536 def RestoreChange(host, change, msg=''): argument
537 """Restore a previously abandoned change."""
538 path = '%s/restore' % _GetChangePath(change)
543 def DeleteDraft(host, change): argument
544 """Delete a gerrit draft change."""
545 path = _GetChangePath(change)
556 ' %r' % change)
559 def SubmitChange(host, change, revision=None, wait_for_merge=True): argument
560 """Submits a gerrit change via Gerrit."""
563 path = '%s/revisions/%s/submit' % (_GetChangePath(change), revision)
568 def CheckChange(host, change, sha1=None): argument
569 """Performs consistency checks on the change, and fixes inconsistencies.
571 This is useful for forcing Gerrit to check whether a change has already been
572 merged into the git repo. Namely, if |sha1| is provided and the change is in
573 'NEW' status, Gerrit will check if a change with that |sha1| is in the repo
574 and mark the change as 'MERGED' if it exists.
578 change: The Gerrit change ID.
581 path = '%s/check' % (_GetChangePath(change),)
592 def GetAssignee(host, change): argument
593 """Get assignee for a change."""
594 path = '%s/assignee' % _GetChangePath(change)
598 def AddAssignee(host, change, assignee): argument
599 """Add reviewers to a change.
603 change: The Gerrit change ID.
606 path = '%s/assignee' % _GetChangePath(change)
611 def MarkPrivate(host, change): argument
616 change: CL number on the given host.
618 path = '%s/private' % _GetChangePath(change)
622 # 201: created -- change was successfully marked private.
628 reason='Change was already marked private',
632 def MarkNotPrivate(host, change): argument
637 change: CL number on the given host.
639 path = '%s/private.delete' % _GetChangePath(change)
644 # 204: no content -- change was successfully marked not private.
649 reason='Change was already marked not private',
656 reason='Got unexpected 200 when marking change not private.',
660 def GetReviewers(host, change): argument
661 """Get information about all reviewers attached to a change.
665 change: The Gerrit change ID.
667 path = '%s/reviewers' % _GetChangePath(change)
671 def AddReviewers(host, change, add=None, notify=None): argument
672 """Add reviewers to a change."""
680 path = '%s/reviewers' % _GetChangePath(change)
687 def RemoveReviewers(host, change, remove=None, notify=None): argument
688 """Remove reveiewers from a change."""
697 path = '%s/reviewers/%s/delete' % (_GetChangePath(change), r)
706 def SetReview(host, change, revision=None, msg=None, labels=None, notify=None): argument
712 path = '%s/revisions/%s/review' % (_GetChangePath(change), revision)
724 reason='CL %s not found in %s' % (change, host))
731 reason='Unable to set "%s" label on change %s.' % (key, change))
734 def SetTopic(host, change, topic): argument
735 """Set |topic| for a change. If |topic| is empty, it will be deleted"""
736 path = '%s/topic' % _GetChangePath(change)
741 def SetHashtags(host, change, add, remove): argument
742 """Adds and / or removes hashtags from a change.
746 change: A gerrit change number.
750 path = '%s/hashtags' % _GetChangePath(change)
756 def ResetReviewLabels(host, change, label, value='0', revision=None, argument
758 """Reset the value of a given label for all reviewers on a change."""
762 # always the risk that the "current" revision will change in between API
769 host, change, o_params=['CURRENT_REVISION', 'CURRENT_COMMIT'])
773 path = '%s/revisions/%s/review' % (_GetChangePath(change), revision)
790 reason='Unable to set %s label for user "%s" on change %s.' % (
791 label, username, change))
793 new_revision = GetChangeCurrentRevision(host, change)
797 reason='Could not get review information for change "%s"' % change)
801 reason='While resetting labels on change "%s", a new patchset was '
802 'uploaded.' % change)