<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div>Thanks, Matt - I'll go back and make these changes</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; ">Murali</div><div><br></div>  <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Matt Mackall <mpm@selenic.com><br> <b><span style="font-weight: bold;">To:</span></b> S Muralidhar <smuralid@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> mercurial-devel@selenic.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, September 13, 2012 1:31 PM<br> <b><span
 style="font-weight: bold;">Subject:</span></b> Re: [PATCH 3 of 3] log: Speed up hg log on untracked files (issue1340)<br> </font> </div> <br>
On Thu, 2012-09-13 at 10:41 -0700, S Muralidhar wrote:<br>> # HG changeset patch<br>> # User smuralid<br>> # Date 1347511152 25200<br>> # Node ID 46c4a5f7f808504706ecf584f470cfd5406dafbd<br>> # Parent  53e10b4a0769c55d7f475a2669d8fa9294352aae<br>> log: Speed up hg log on untracked files (issue1340)<br>       ^<br><br>ContributingChanges:<br><br>* first line of commit message is of the form "topic: uncapitalized, no<br>trailing period" <br><br>> 'hg log' on untracked files tends to be fairly slow. The root cause is<br>> that we end up using the 'slowpath' when we can't find a revlog for<br>> the files listed. This could happen if the file in question is an<br>> untracked file, or it is a directory.<br><br>This changes semantics. A performance patch should avoid changing<br>semantics.<br><br>Here's an implementation of what I suggested earlier, which leaves all<br>tests unchanged:<br><br>diff -r
 17f1ef5cfaa5 mercurial/cmdutil.py<br>--- a/mercurial/cmdutil.py    Wed Sep 12 21:30:51 2012 -0700<br>+++ b/mercurial/cmdutil.py    Thu Sep 13 15:24:43 2012 -0500<br>@@ -1110,6 +1110,19 @@<br>                 wanted.add(rev)<br>                 if copied:<br>                     copies.append(copied)<br>+<br>+        # We decided to fall back to the slowpath because at least one<br>+        # path was not a file. Make sure at least one of the paths<br>+        # existed in history.<br>+        if slowpath:<br>+            for path in match.files():<br>+                if path == '.':<br>+                 
   break<br>+                if path in repo.store:<br>+                    break<br>+            else:<br>+                return []<br>+<br>     if slowpath:<br>         # We have to read the changelog to match filenames against<br>         # changed files<br><br>..but there are still problems with non-fncache repos.<br><br>-- <br>Mathematics is the supreme nostalgia of our time.<br><br><br><br><br> </div> </div>  </div></body></html>