windows: removed duplicate termwidth definition stable
authorMartin Geisler <martin@geisler.net>
Thu, 19 Jul 2012 00:53:27 +0200
branchstable
changeset 17222 98823bd0d697
parent 17174 32b2e6d641e4
child 17223 c315842cb25f
child 17225 a06e2681dd17
windows: removed duplicate termwidth definition Changeset dbf91976f900 caused this when the "from win32 import *" line was replaced with explicit import statements: the wildcard import was at the bottom of the file and so windows.termwidth was overwritten by win32.termwidth as indented, but the new explicit import statements were at the top and so win32.termwidth got lost. With the switch to ctypes, win32 can always be imported and so the fallback termwidth in windows is no longer needed.
mercurial/windows.py
--- a/mercurial/windows.py	Fri Jul 06 01:14:02 2012 -0300
+++ b/mercurial/windows.py	Thu Jul 19 00:53:27 2012 +0200
@@ -295,13 +295,6 @@
 def gethgcmd():
     return [sys.executable] + sys.argv[:1]
 
-def termwidth():
-    # cmd.exe does not handle CR like a unix console, the CR is
-    # counted in the line length. On 80 columns consoles, if 80
-    # characters are written, the following CR won't apply on the
-    # current line but on the new one. Keep room for it.
-    return 79
-
 def groupmembers(name):
     # Don't support groups on Windows for now
     raise KeyError()