comparison mercurial/ui.py @ 1882:c0320567931f

merge util.esystem and util.system.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 10 Mar 2006 22:42:59 -0800
parents 2e0fd78587bd
children 622ee75cb4c9
comparison
equal deleted inserted replaced
1880:05c7d75be925 1882:c0320567931f
207 editor = (os.environ.get("HGEDITOR") or 207 editor = (os.environ.get("HGEDITOR") or
208 self.config("ui", "editor") or 208 self.config("ui", "editor") or
209 os.environ.get("EDITOR", "vi")) 209 os.environ.get("EDITOR", "vi"))
210 210
211 os.environ["HGUSER"] = self.username() 211 os.environ["HGUSER"] = self.username()
212 util.system("%s \"%s\"" % (editor, name), errprefix=_("edit failed")) 212 util.system("%s \"%s\"" % (editor, name),
213 environ={'HGUSER': self.username()},
214 onerr=util.Abort, errprefix=_("edit failed"))
213 215
214 t = open(name).read() 216 t = open(name).read()
215 t = re.sub("(?m)^HG:.*\n", "", t) 217 t = re.sub("(?m)^HG:.*\n", "", t)
216 218
217 os.unlink(name) 219 os.unlink(name)