# HG changeset patch # User Ronny Pfannschmidt # Date 2010-08-29 08:54:22 # Node ID 2e7647d254582cb789679b28c9f7bd060707140b # Parent a4fbbe0fbc3894839c0b62d38e35f6a498c6bf28 churn: do not crash on empty lines in alias file 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 <