mercurial/commands.py
changeset 12383 f1e8d6f6e682
parent 12369 6f0d9d79111f
parent 12382 28ddf67198b2
child 12386 8eedf53547b8
--- a/mercurial/commands.py	Wed Sep 22 18:29:41 2010 -0500
+++ b/mercurial/commands.py	Thu Sep 23 01:59:02 2010 +0200
@@ -2502,7 +2502,11 @@
 
         revmatchfn = None
         if opts.get('patch') or opts.get('stat'):
-            revmatchfn = cmdutil.match(repo, fns, default='path')
+            if opts.get('follow') or opts.get('follow_first'):
+                # note: this might be wrong when following through merges
+                revmatchfn = cmdutil.match(repo, fns, default='path')
+            else:
+                revmatchfn = matchfn
 
         displayer.show(ctx, copies=copies, matchfn=revmatchfn)