[PATCH 2 of 2] histedit: use str.startswith to check for comments in action list

adgar at google.com adgar at google.com
Fri Aug 22 15:47:21 CDT 2014


# HG changeset patch
# User Mike Edgar <adgar at google.com>
# Date 1408740034 14400
#      Fri Aug 22 16:40:34 2014 -0400
# Node ID df02780e56f269f41442dc4c7b98776dada7d8ff
# Parent  3e73eb37f5c8b6a837983c5f9d505ac4cfade546
histedit: use str.startswith to check for comments in action list

diff -r 3e73eb37f5c8 -r df02780e56f2 hgext/histedit.py
--- a/hgext/histedit.py	Fri Aug 22 16:37:55 2014 -0400
+++ b/hgext/histedit.py	Fri Aug 22 16:40:34 2014 -0400
@@ -610,7 +610,7 @@
             rules = f.read()
             f.close()
         rules = [l for l in (r.strip() for r in rules.splitlines())
-                 if l and not l[0] == '#']
+                 if not l.startswith('#')]
         rules = verifyrules(rules, repo, ctxs)
 
         parentctx = repo[root].parents()[0]


More information about the Mercurial-devel mailing list