232
232
# aliases for now, when we fix the core logic, then they
233
233
# will do what you expect.
234
234
in_store = in_history
235
# in_branch = in_store
236
237
def in_branch(self, branch, need_revno=True):
237
"""Evaluate this revision spec and return a RevisionInfo object.
239
If need_revno is False, the returned RevisionInfo object might
240
have the revno attribute set as None (for performance reasons),
241
even if the revno exists in the specified branch.
243
The default implementation is an alias for RevisionSpec.in_history.
245
238
return self.in_history(branch)
240
def as_revision_id(self, context_branch):
241
"""Return just the revision_id for this revisions spec.
243
Some revision specs require a context_branch to be able to determine
244
their value. Not all specs will make use of it.
246
return self._as_revision_id(context_branch)
248
def _as_revision_id(self, context_branch):
249
"""Implementation of as_revision_id()
251
Classes should override this function to provide appropriate
252
functionality. The default is to just call '.in_history().rev_id'
254
return self.in_history(context_branch).rev_id
247
256
def __repr__(self):
248
257
# this is mostly for helping with testing
249
258
return '<%s %s>' % (self.__class__.__name__,