# HG changeset patch # User Martin Geisler # Date 2010-12-13 10:53:17 # Node ID ece1c069ddd6b77b9f5bbf606eb7cc8175e52bd2 # Parent e76701bf4480879fbc655324e37c653bb73d463d # Parent a1a7da34e7c2bc55da0aac80aca5ecf483d42155 merge with stable diff --git a/hgext/churn.py b/hgext/churn.py --- a/hgext/churn.py +++ b/hgext/churn.py @@ -62,6 +62,7 @@ def countrate(ui, repo, amap, *pats, **o key = getkey(ctx) key = amap.get(key, key) # alias remap + key = key.strip() # ignore leading and trailing spaces if opts.get('changesets'): rate[key] = (rate.get(key, (0,))[0] + 1, 0) else: diff --git a/hgext/eol.py b/hgext/eol.py --- a/hgext/eol.py +++ b/hgext/eol.py @@ -11,18 +11,20 @@ configuration file every time you run an configuration files. It uses two sections, ``[patterns]`` and ``[repository]``. -The ``[patterns]`` section specifies the line endings used in the -working directory. The format is specified by a file pattern. The -first match is used, so put more specific patterns first. The -available line endings are ``LF``, ``CRLF``, and ``BIN``. +The ``[patterns]`` section specifies how line endings should be +converted between the working copy and the repository. The format is +specified by a file pattern. The first match is used, so put more +specific patterns first. The available line endings are ``LF``, +``CRLF``, and ``BIN``. Files with the declared format of ``CRLF`` or ``LF`` are always -checked out in that format and files declared to be binary (``BIN``) -are left unchanged. Additionally, ``native`` is an alias for the -platform's default line ending: ``LF`` on Unix (including Mac OS X) -and ``CRLF`` on Windows. Note that ``BIN`` (do nothing to line -endings) is Mercurial's default behaviour; it is only needed if you -need to override a later, more general pattern. +checked out and stored in the repository in that format and files +declared to be binary (``BIN``) are left unchanged. Additionally, +``native`` is an alias for checking out in the platform's default line +ending: ``LF`` on Unix (including Mac OS X) and ``CRLF`` on +Windows. Note that ``BIN`` (do nothing to line endings) is Mercurial's +default behaviour; it is only needed if you need to override a later, +more general pattern. The optional ``[repository]`` section specifies the line endings to use for files stored in the repository. It has a single setting, @@ -46,6 +48,10 @@ Example versioned ``.hgeol`` file:: [repository] native = LF +.. note:: + The rules will first apply when files are touched in the working + copy, e.g. by updating to null and back to tip to touch all files. + The extension uses an optional ``[eol]`` section in your hgrc file (not the ``.hgeol`` file) for settings that control the overall behavior. There are two settings: diff --git a/tests/test-churn.t b/tests/test-churn.t --- a/tests/test-churn.t +++ b/tests/test-churn.t @@ -139,3 +139,22 @@ this was failing with a ZeroDivisionErro $ hg churn test 0 $ cd .. + +Ignore trailing or leading spaces in emails + + $ cd repo + $ touch bar + $ hg ci -Am'bar' -u 'user4 ' + adding bar + $ touch foo + $ hg ci -Am'foo' -u 'user4 < user4@x.com >' + adding foo + $ hg log -l2 --template '[{author|email}]\n' + [ user4@x.com ] + [user4@x.com] + $ hg churn -c + user1 4 ********************************************************* + user3 3 ******************************************* + user4@x.com 2 ***************************** + user2 2 ***************************** + with space 1 **************