def get_changectx_for_changeset(repo, changeset_revision, **kwd):
 for changeset in repo.changelog:
  ctx = repo.changectx(changeset)
  if (str(ctx) == changeset_revision):
   return ctx
 return None

def get_changectx_for_changeset ( repo , changeset_revision , ** kwd ) : for changeset in repo . changelog : ctx = repo . changectx ( changeset ) if ( str ( ctx ) == changeset_revision ) : return ctx return None
retrieve a specified changectx from a repository .