:param revision:
        :type revision: :class:`revision.data.Revision`
        :param is_amend:
        :type is_amend: boolean
        :return: The Orchestrator instance (for method chaining)
        :rtype: :class:`revision.orchestrator.Orchestrator`
557746
def commit(self, revision, is_amend=False):
        
        if not isinstance(revision, Revision):
            raise InvalidArgType()

        if not self.current_client:
            raise ClientNotSpecified()

        if is_amend:
            self.current_client.save(revision)
        else:
            self.current_client.write()
            self.current_client.save(revision)

        return self
592349
def _pull_content_revision_parent(self):
        

        if self._revision_id is None:
            query_params = {
                "prop": "extracts|revisions",
                "explaintext": "",
                "rvprop": "ids",
            }
            query_params.update(self.__title_query_param())
            request = self.mediawiki.wiki_request(query_params)
            page_info = request["query"]["pages"][self.pageid]
            self._content = page_info["extract"]
            self._revision_id = page_info["revisions"][0]["revid"]
            self._parent_id = page_info["revisions"][0]["parentid"]
        return self._content, self._revision_id, self._parent_id
170234
def atomic(func):
    
    try:
        from reversion.revisions import create_revision

        return transaction.atomic(create_revision()(func))
    except ImportError:
        return transaction.atomic(func)
642918
def trigger_revisions(self, trigger_id, **kwargs):
        ""
        api_path = "/api/v2/triggers/{trigger_id}/revisions.json"
        api_path = api_path.format(trigger_id=trigger_id)
        return self.call(api_path, **kwargs)
316249
def insert(self, revision, index):
        
        if not isinstance(revision, Revision):
            raise InvalidArgType()

        for rev in self.revisions:
            if rev == revision:
                return self

        self.revisions.insert(index, revision)

        return self
960042
def current_revision
      @_current_revision ||= File.open(
        File.join(
          RackCommitStats.config.file_path_prefix, REVISION_LOG_FILE
        ), 'r'
      ).readlines.last.split
    end
192800
def sort(amend: bool = False, stage: bool = False):
    
    _sort(amend, stage)
402925
private static int findCommonAncestor(RevisionInternal rev, List<String> possibleRevIDs) {
        if (possibleRevIDs == null || possibleRevIDs.size() == 0) {
            return 0;
        }
        List<String> history = Database.parseCouchDBRevisionHistory(rev.getProperties());

        //rev is missing _revisions property
        assert (history != null);

        boolean changed = history.retainAll(possibleRevIDs);
        String ancestorID = history.size() == 0 ? null : history.get(0);

        if (ancestorID == null) {
            return 0;
        }

        int generation = RevisionUtils.parseRevIDNumber(ancestorID);

        return generation;
    }
699835
def rev(self, rev):
        """"""
        d = self.dict
        d['revision'] = rev
        return self.from_dict(d)
711647
def checkout(self, revision, options):
        
        rev = revision.key
        self.repo.git.checkout(rev)
1160968
def get_distribute_alterations_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['distribute_alterations'])
        metadata.update({'existing_boolean_values': self._my_map['distributeAlterations']})
        return Metadata(**metadata)
120799
def author_edit_view(self, context):
        
        fragment = Fragment()
        self.render_children(context, fragment, can_reorder=True, can_add=False)
        return fragment
676992
def get_review_sh(self, revision, item):
        

        identity = self.get_sh_identity(revision)
        update = parser.parse(item[self.get_field_date()])
        erevision = self.get_item_sh_fields(identity, update)

        return erevision
345768
public function restore( Revision $revision ) {
		$params = [
			'type' => 'revision',
			'show' => 'content',
			// Note: pre 1.24 this is a delete token, post it is csrf
			'token' => $this->api->getToken( 'delete' ),
			'ids' => $revision->getId(),
		];

		$this->api->postRequest( new SimpleRequest(
			'revisiondelete',
			$params
		) );

		return true;
	}
892952
def revision_list(
    request, template_name='wakawaka/revision_list.html', extra_context=None
):
    
    revision_list = Revision.objects.all()
    template_context = {'revision_list': revision_list}
    template_context.update(extra_context or {})
    return render(request, template_name, template_context)
1263329
def rev(self, i):
        """"""
        on = copy(self)
        on.revision = i
        return on
313366
function (streamInfo, rev) {
    this.set('_revision', rev);
    streamInfo.context = streamInfo.context || '_general';
    this.get('_revisions')[streamInfo.context + '_' + streamInfo.aggregate + '_' + streamInfo.aggregateId] = rev;
  }