changeset 24023:163e25931f65

trydiff: remove dead branch in diffline() Since diffline() is never called when 'revs' is empty, it doesn't need to handle that case.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 16 Jan 2015 15:22:29 -0800
parents da63f557d0dc
children a5c7e86a81c1
files mercurial/patch.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Fri Jan 16 15:19:57 2015 -0800
+++ b/mercurial/patch.py	Fri Jan 16 15:22:29 2015 -0800
@@ -1755,11 +1755,8 @@
 
     def diffline(f, revs):
         if not repo.ui.quiet:
-            if revs:
-                revinfo = ' '.join(["-r %s" % rev for rev in revs])
-                line = 'diff %s %s\n' % (revinfo, f)
-            else:
-                line = 'diff %s\n' % f
+            revinfo = ' '.join(["-r %s" % rev for rev in revs])
+            line = 'diff %s %s\n' % (revinfo, f)
         else:
             line = ''
         return line