help="Match the regular expression limiting patterns without regard to letter case.")
parser.add_argument("-r", "--read-revs", metavar="FILE",
help="Read revs for previously read comments from FILE (default: $HOME/.gimrr/comment.revs).")
+parser.add_argument("-n", "--new-only", action="store_true",
+ help="List only new comments.")
class CFormatter(string.Formatter):
def __init__(self):
for line in reversed(out.split("\n")):
if not line:
continue
+
sha, subj, name, email, date = line.split("\t")
+
+ if sha in revs:
+ if args.new_only:
+ continue
+ cargs["f"] = ""
+ else:
+ cargs["f"] = "N"
+
cargs["c"] = sha
cargs["s"] = subj
cargs["n"] = name
cargs["e"] = email
cargs["d"] = date
cargs["m"] = c2m[sha]
- if sha in revs:
- cargs["f"] = ""
- else:
- cargs["f"] = "N"
printc(args.fmt, cargs)