mercurial/patch.py
changeset 24024 a5c7e86a81c1
parent 24023 163e25931f65
child 24025 bbb011f4eb32
--- a/mercurial/patch.py	Fri Jan 16 15:22:29 2015 -0800
+++ b/mercurial/patch.py	Fri Jan 16 15:27:04 2015 -0800
@@ -1754,12 +1754,8 @@
         bprefix = 'b/'
 
     def diffline(f, revs):
-        if not repo.ui.quiet:
-            revinfo = ' '.join(["-r %s" % rev for rev in revs])
-            line = 'diff %s %s\n' % (revinfo, f)
-        else:
-            line = ''
-        return line
+        revinfo = ' '.join(["-r %s" % rev for rev in revs])
+        return 'diff %s %s\n' % (revinfo, f)
 
     date1 = util.datestr(ctx1.date())
     date2 = util.datestr(ctx2.date())
@@ -1854,7 +1850,7 @@
                 if op is not None:
                     header.append('%s from %s\n' % (op, path1))
                     header.append('%s to %s\n' % (op, path2))
-        elif revs:
+        elif revs and not repo.ui.quiet:
             header.append(diffline(path1, revs))
 
         if binarydiff and not opts.nobinary: