mercurial/cmdutil.py
branchstable
changeset 23500 9601229ed361
parent 23403 edf29f9c15f0
child 23501 424d669118d3
--- a/mercurial/cmdutil.py	Sun Nov 16 23:41:44 2014 -0800
+++ b/mercurial/cmdutil.py	Fri Dec 05 14:27:32 2014 -0800
@@ -1745,6 +1745,9 @@
             else:
                 slowpath = False
 
+    fpats = ('_patsfollow', '_patsfollowfirst')
+    fnopats = (('_ancestors', '_fancestors'),
+               ('_descendants', '_fdescendants'))
     if slowpath:
         # See walkchangerevs() slow path.
         #
@@ -1763,11 +1766,10 @@
             matchargs.append('x:' + p)
         matchargs = ','.join(('%r' % p) for p in matchargs)
         opts['_matchfiles'] = matchargs
+        if follow:
+            opts[fnopats[0][followfirst]] = '.'
     else:
         if follow:
-            fpats = ('_patsfollow', '_patsfollowfirst')
-            fnopats = (('_ancestors', '_fancestors'),
-                       ('_descendants', '_fdescendants'))
             if pats:
                 # follow() revset interprets its file argument as a
                 # manifest entry, so use match.files(), not pats.