SRC TODO list
-* Limit option for list and log.
-
* Implement reverse ranges and remove automatic reversal in print and log.
* Stop using rcsdiff, it leaks RCS version numbers onto the screen.
args = list(args)
custom = None
limit = None
- if args[0] == '--':
- args.pop(0)
- elif args[0] == "-f":
- args.pop(0)
- try:
- custom = args[0]
+ if args:
+ if args[0] == '--':
args.pop(0)
- except IndexError:
- croak("list -f requires a following string")
- elif args[0].startswith("-f"):
- custom = args[0][2:]
- args.pop(0)
- elif args[0] == "-l":
- args.pop(0)
- try:
- limit = args[0]
+ elif args[0] == "-f":
args.pop(0)
- limit = int(limit)
- except IndexError:
- croak("list -f requires a following string")
- except ValueError:
- croak("%s is not an integer" % limit)
+ try:
+ custom = args[0]
+ args.pop(0)
+ except IndexError:
+ croak("list -f requires a following string")
+ elif args[0].startswith("-f"):
+ custom = args[0][2:]
+ args.pop(0)
+ elif args[0] == "-l":
+ args.pop(0)
+ try:
+ limit = args[0]
+ args.pop(0)
+ limit = int(limit)
+ except IndexError:
+ croak("list -f requires a following string")
+ except ValueError:
+ croak("%s is not an integer" % limit)
ctx = CommandContext("list", args, default_to="branch_reversed")
for arg in ctx.args:
if ignore(arg) or not registered(arg):
"Report revision logs"
limit = None
args = list(args)
- if args[0] == '--':
- args.pop(0)
- elif args[0] == "-l":
- args.pop(0)
- try:
- limit = args[0]
+ if args:
+ if args[0] == '--':
args.pop(0)
- limit = int(limit)
- except IndexError:
- croak("list -f requires a following string")
- except ValueError:
- croak("%s is not an integer" % limit)
+ elif args[0] == "-l":
+ args.pop(0)
+ try:
+ limit = args[0]
+ args.pop(0)
+ limit = int(limit)
+ except IndexError:
+ croak("list -f requires a following string")
+ except ValueError:
+ croak("%s is not an integer" % limit)
ctx = CommandContext("log", args, default_to="branch_reversed")
for arg in ctx.args:
if ignore(arg) or not registered(arg):