Allow phabdiff in blame when HGPLAIN=1

Summary: Currently HGPLAIN=1 will disable the -p flag, even though it's analogue, -n, works fine. This should allow either flag to work with or without HGPLAIN

Reviewed By: DurhamG

Differential Revision: D26440729

fbshipit-source-id: f7058a82c32229f5ff9867f299ed72fe167c7104
This commit is contained in:
John Allen 2021-02-27 12:16:47 -08:00 committed by Facebook GitHub Bot
parent f3feef687f
commit 8df57108e6

View File

@ -443,15 +443,13 @@ def blame(orig, ui, repo, *pats, **opts):
pass
return res
if ui.plain():
return orig(ui, repo, *pats, **opts)
# changeset is the new default
if all(
not opts.get(f)
for f in ["changeset", "number", "phabdiff", "user", "date", "file"]
):
opts["changeset"] = True
if not ui.plain():
# changeset is the new default
if all(
not opts.get(f)
for f in ["changeset", "number", "phabdiff", "user", "date", "file"]
):
opts["changeset"] = True
# without --phabdiff or with -T, use the default formatter
if not opts.get("phabdiff") or opts.get("template"):