# HG changeset patch # User Alexander Solovyov # Date 1274989823 -10800 # Node ID ffd85ab578be21fd952398607e5d6c86f1b1359e # Parent 30c620e48d1c78eb9a12c8500cb40faf74605f2d churn: add possibility to include/exclude paths diff -r 30c620e48d1c -r ffd85ab578be hgext/churn.py --- a/hgext/churn.py Wed Jun 02 14:28:45 2010 +0200 +++ b/hgext/churn.py Thu May 27 22:50:23 2010 +0300 @@ -9,7 +9,7 @@ '''command to display statistics about repository history''' from mercurial.i18n import _ -from mercurial import patch, cmdutil, util, templater +from mercurial import patch, cmdutil, util, templater, commands import os import time, datetime @@ -182,6 +182,6 @@ ('s', 'sort', False, _('sort by key (default: sort by count)')), ('', 'diffstat', False, _('display added/removed lines separately')), ('', 'aliases', '', _('file with email aliases')), - ], + ] + commands.walkopts, _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]")), } diff -r 30c620e48d1c -r ffd85ab578be tests/test-churn --- a/tests/test-churn Wed Jun 02 14:28:45 2010 +0200 +++ b/tests/test-churn Thu May 27 22:50:23 2010 +0300 @@ -30,6 +30,8 @@ hg churn e echo % churn all hg churn +echo % churn excluding one dir +hg churn -X e echo % churn up to rev 2 hg churn -r :2 cd .. diff -r 30c620e48d1c -r ffd85ab578be tests/test-churn.out --- a/tests/test-churn.out Wed Jun 02 14:28:45 2010 +0200 +++ b/tests/test-churn.out Thu May 27 22:50:23 2010 +0300 @@ -8,6 +8,10 @@ user3 3 *************************************************************** user1 3 *************************************************************** user2 2 ****************************************** +% churn excluding one dir +user3 3 *************************************************************** +user2 2 ****************************************** +user1 2 ****************************************** % churn up to rev 2 user2 2 *************************************************************** user1 1 ********************************