py3: fix hg doctor in shared repos

Summary:
It read the sharedpath manually but needed to read it as utf8, not
bytes.

Reviewed By: quark-zju

Differential Revision: D23194858

fbshipit-source-id: aa73c2cc782070ba6c4d2c441d6f5338842b137f
This commit is contained in:
Durham Goode 2020-08-18 14:56:13 -07:00 committed by Facebook GitHub Bot
parent 59f867a442
commit 6632d69936

View File

@ -58,7 +58,7 @@ def doctor(ui, **opts):
return
repohgpath = os.path.join(repopath, ".hg")
vfs = vfsmod.vfs(repohgpath)
sharedhgpath = vfs.tryread("sharedpath") or repohgpath
sharedhgpath = vfs.tryreadutf8("sharedpath").rstrip("\n") or repohgpath
svfs = vfsmod.vfs(os.path.join(sharedhgpath, "store"))
ui.write(_("checking internal storage\n"))