[PATCH] allow churn extension alias lists to contain empty lines for grouping

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Sun Aug 29 03:54:43 CDT 2010


# HG changeset patch
# User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
# Date 1283072062 -7200
# Node ID 7a205d9aeea5b0352faae5b04a364b95a2567d63
# Parent  d01e28657429815d4b83098e2ff5dd0d72e961e6
allow churn extension alias lists to contain empty lines for grouping

diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -129,6 +129,8 @@ def churn(ui, repo, *pats, **opts):
         aliases = repo.wjoin('.hgchurn')
     if aliases:
         for l in open(aliases, "r"):
+            if not l.strip():
+                continue
             alias, actual = l.split('=' in l and '=' or None, 1)
             amap[alias.strip()] = actual.strip()
 
diff --git a/tests/test-churn b/tests/test-churn
--- a/tests/test-churn
+++ b/tests/test-churn
@@ -38,6 +38,7 @@ cd ..
 echo % churn with aliases
 cat > ../aliases <<EOF
 user1 alias1
+
 user3 alias3
 EOF
 hg churn --aliases ../aliases


More information about the Mercurial-devel mailing list