Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmwindows.py @ 30322:4b1af1c867fa
scmutil: move util.termwidth()
I'm going to get rid of sys.stderr|out|in references from posix.termwidth().
In order to do that, termwidth() needs to take a ui, but functions in util.py
shouldn't depend on a ui object. So moves termwidth() to scmutil.py.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 20 Oct 2016 21:38:44 +0900 |
parents | 3df9f780c90e |
children | 5c379b1f56c7 |
line wrap: on
line diff
--- a/mercurial/scmwindows.py Sun Nov 06 00:37:50 2016 -0700 +++ b/mercurial/scmwindows.py Thu Oct 20 21:38:44 2016 +0900 @@ -5,6 +5,7 @@ from . import ( osutil, util, + win32, ) try: @@ -51,3 +52,6 @@ path.append(os.path.join(userprofile, 'mercurial.ini')) path.append(os.path.join(userprofile, '.hgrc')) return path + +def termwidth(): + return win32.termwidth()