backend.parse(self)
def __len__(self):
return len(self.revlist)
- def __getitem__(self, i):
- return self.revlist[i]
def current(self):
"Return the revision currently checked out."
try:
selection.reverse()
return selection
def tip(self):
+ "Return the latest revision in the repo."
+ # FIXME: should return the current branch tip.
return self.revlist[0]
def native_to_revno(self, revision):
"Map a native ID to a revno"
def cat_method(*args):
"Dump revision content to standard output."
ctx = CommandContext("cat", args)
+ if ctx.is_range():
+ croak("cat refuses to cough up a hairball")
for arg in ctx.args:
metadata = History(arg)
ctx.resolve(metadata)
if ctx.is_empty():
ctx.select_tip(metadata)
with backend.lifter(arg):
- for item in metadata:
+ for item in metadata.revlist:
if item.revno in ctx:
backend.cat(arg, item.revision)
rev = self.joinrev(n[:-2])
for (i, item) in enumerate(metadata.revlist):
if item.revision == rev:
- return metadata[i].revno
+ return metadata.revlist[i].revno
return None
def succ(self, revno, metadata):
"Our successor on the current branch (1-origin)."
rev = self.joinrev(n)
for (i, item) in enumerate(metadata.revlist):
if item.revision == rev:
- return metadata[i].revno
+ return metadata.revlist[i].revno
return None
def branch_to_base(self, revid):
"Go from a branch ID sticky tag to the revision it was based on."
I = ignored, L = locked (recover with src checkout). The A and L
statuses should only occur if you have used RCS directly on a file.
-src cat [revision-range] ['file'...]::
- Send the specified revisions of the files to standard output.
+src cat ['revision'] ['file'...]::
+ Send the specified revision of the files to standard output.
src tag [list|-ldelete|del|-d}rename|-r] ['name'] ['revision'] ['file'...]::
Create, rename, or delete a tag. With no or only file arguments, list tags.