changeset 16176:0bb0b9f22cd7

merge with stable
author Matt Mackall <mpm@selenic.com>
date Sat, 25 Feb 2012 16:48:07 -0600
parents 0a73c4bd9f47 (current diff) 280e834c9d15 (diff)
children b8c1a8a57540
files mercurial/commands.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Feb 25 22:11:36 2012 +0100
+++ b/mercurial/commands.py	Sat Feb 25 16:48:07 2012 -0600
@@ -3853,9 +3853,11 @@
     limit = cmdutil.loglimit(opts)
     count = 0
 
-    endrev = None
-    if opts.get('copies') and opts.get('rev'):
-        endrev = max(scmutil.revrange(repo, opts.get('rev'))) + 1
+    getrenamed, endrev = None, None
+    if opts.get('copies'):
+        if opts.get('rev'):
+            endrev = max(scmutil.revrange(repo, opts.get('rev'))) + 1
+        getrenamed = templatekw.getrenamedfn(repo, endrev=endrev)
 
     df = False
     if opts["date"]:
@@ -3899,9 +3901,8 @@
                 return
 
         copies = None
-        if opts.get('copies') and rev:
+        if getrenamed is not None and rev:
             copies = []
-            getrenamed = templatekw.getrenamedfn(repo, endrev=endrev)
             for fn in ctx.files():
                 rename = getrenamed(fn, rev)
                 if rename: