Patchwork [01,of,10,RFC] command: set minchunk to zero to disable chunking on the command line

login
register
mail settings
Submitter Sean Farley
Date Dec. 21, 2012, 5:37 a.m.
Message ID <8c8d483cdb59f2cbb1cd.1356068271@laptop.local>
Download mbox | patch
Permalink /patch/235/
State Superseded
Headers show

Comments

Sean Farley - Dec. 21, 2012, 5:37 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1355935277 21600
# Node ID 8c8d483cdb59f2cbb1cdc77f83a7edae57e86d23
# Parent  d7c28954d9010d639de9ea856c29ff3889440c3f
command: set minchunk to zero to disable chunking on the command line

So far as I can tell, chunking isn't needed on the command line (assumption based on running the tests). If we can disable it here, then this will allow future patches to return a list of labels from the template engine.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -880,10 +880,13 @@ 
                 cur = postfix and ('%s_%s' % (type, postfix)) or type
                 if mode and cur in self.t:
                     types[type] = cur
 
         try:
+            # set minchunk to 0 because we don't need increasing chunks on the
+            # command line ... right?
+            self.t.minchunk = 0
 
             # write header
             if types['header']:
                 h = templater.stringify(self.t(types['header'], **props))
                 if self.buffered: