Mercurial > hg-stable
view mercurial/mergeutil.py @ 46174:a1601ff3877c
procutil: introduce pseudo file object that just raises EBADF
This should be safer than closing underlying fd as the fd may be reused.
On Python 2, closed sys.stdin could be redirected to a random file having
fd=0, but we'd be better not copying this behavior.
Only readinto() and write() are implemented according to the following ABC
table. fileno() is not implemented since fd=0/1/2 may be assigned later
to other files.
https://docs.python.org/3/library/io.html#class-hierarchy
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 19 Dec 2020 11:10:18 +0900 |
parents | fa87536d3d70 |
children | dfca84970da8 |
line wrap: on
line source
# mergeutil.py - help for merge processing in mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from .i18n import _ from . import error def checkunresolved(ms): if list(ms.unresolved()): raise error.StateError( _(b"unresolved merge conflicts (see 'hg help resolve')") )