trydiff: remove dead branch in diffline()
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 16 Jan 2015 15:22:29 -0800
changeset 24023 163e25931f65
parent 24022 da63f557d0dc
child 24024 a5c7e86a81c1
trydiff: remove dead branch in diffline() Since diffline() is never called when 'revs' is empty, it doesn't need to handle that case.
mercurial/patch.py
--- 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