changeset 9321:d7b6429c5ad4

churn: correct output when run in subdirectories
author Brendan Cully <brendan@kublai.com>
date Wed, 05 Aug 2009 17:17:06 -0700
parents 884964f99e07
children 81900431589f
files hgext/churn.py tests/test-churn
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/churn.py	Thu Aug 06 00:34:28 2009 +0200
+++ b/hgext/churn.py	Wed Aug 05 17:17:06 2009 -0700
@@ -24,7 +24,7 @@
 
 def changedlines(ui, repo, ctx1, ctx2, fns):
     lines = 0
-    fmatch = cmdutil.match(repo, pats=fns)
+    fmatch = cmdutil.matchfiles(repo, fns)
     diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch))
     for l in diff.split('\n'):
         if (l.startswith("+") and not l.startswith("+++ ") or
--- a/tests/test-churn	Thu Aug 06 00:34:28 2009 +0200
+++ b/tests/test-churn	Wed Aug 05 17:17:06 2009 -0700
@@ -28,11 +28,13 @@
 hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt
 
 echo % churn separate directories
-hg churn d/e
+cd d
+hg churn e
 echo % churn all
 hg churn
 echo % churn up to rev 2
 hg churn -r :2
+cd ..
 echo % churn with aliases
 cat > ../aliases <<EOF
 user1 alias1