mercurial/patch.py
changeset 17942 5e655418aa8d
parent 17941 9a6e4d5d7ea8
child 17943 66b9832331c9
--- a/mercurial/patch.py	Thu Nov 15 12:19:03 2012 -0800
+++ b/mercurial/patch.py	Thu Nov 15 13:49:04 2012 -0800
@@ -1584,9 +1584,8 @@
         return []
 
     revs = None
-    if not repo.ui.quiet:
-        hexfunc = repo.ui.debugflag and hex or short
-        revs = [hexfunc(node) for node in [node1, node2] if node]
+    hexfunc = repo.ui.debugflag and hex or short
+    revs = [hexfunc(node) for node in [node1, node2] if node]
 
     copy = {}
     if opts.git or opts.upgrade:
@@ -1665,6 +1664,8 @@
         return os.path.join(prefix, f)
 
     def diffline(revs, a, b, opts):
+        if repo.ui.quiet and not opts.git:
+            return ''
         parts = ['diff']
         if opts.git:
             parts.append('--git')