From patchwork Thu Aug 7 19:17:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [stable] histedit: use str.startswith, remove duplicate line and extra blank line From: adgar@google.com X-Patchwork-Id: 5316 Message-Id: <4fc87e9ba34429406ff2.1407439048@adgar.nyc.corp.google.com> To: mercurial-devel@selenic.com Date: Thu, 07 Aug 2014 15:17:28 -0400 # HG changeset patch # User Mike Edgar # Date 1407427942 14400 # Thu Aug 07 12:12:22 2014 -0400 # Node ID 4fc87e9ba34429406ff29446c5fdd8b5a17687e1 # Parent ba5fc3f81f1588507a5a84ac2b43679705ceec7b histedit: use str.startswith, remove duplicate line and extra blank line diff -r ba5fc3f81f15 -r 4fc87e9ba344 hgext/histedit.py --- a/hgext/histedit.py Tue Jun 17 20:26:51 2014 -0700 +++ b/hgext/histedit.py Thu Aug 07 12:12:22 2014 -0400 @@ -209,7 +209,6 @@ return commitfunc - def applychanges(ui, repo, ctx, opts): """Merge changeset from ctx (only) in the current working directory""" wcpar = repo.dirstate.parents()[0] @@ -602,11 +601,10 @@ 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] - keep = opts.get('keep', False) replacements = []