diff mercurial/windows.py @ 11011:648130161e4d

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Mon, 26 Apr 2010 22:42:46 +0200
parents 18e81d42ee5c
children 99eee847beaa
line wrap: on
line diff
--- a/mercurial/windows.py	Mon Apr 26 21:35:09 2010 +0200
+++ b/mercurial/windows.py	Mon Apr 26 22:42:46 2010 +0200
@@ -356,6 +356,13 @@
 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
+
 try:
     # override functions with win32 versions if possible
     from win32 import *