Submitter | Yuya Nishihara |
---|---|
Date | Sept. 20, 2016, 1:06 p.m. |
Message ID | <20160920220622.5932752b1255a06c1bcb01e6@tcha.org> |
Download | mbox | patch |
Permalink | /patch/16682/ |
State | Not Applicable |
Delegated to: | Ryan McElroy |
Headers | show |
Comments
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4442,10 +4442,10 @@ def grep(ui, repo, pattern, *pats, **opt def display(fm, fn, ctx, pstates, states): rev = ctx.rev() - if fm: + if fm.isplain(): + formatuser = ui.shortuser + else: formatuser = str - else: - formatuser = ui.shortuser if ui.quiet: datefmt = '%Y-%m-%d' else: diff --git a/mercurial/formatter.py b/mercurial/formatter.py --- a/mercurial/formatter.py +++ b/mercurial/formatter.py @@ -141,8 +141,6 @@ class plainformatter(baseformatter): self.hexfunc = hex else: self.hexfunc = short - def __nonzero__(self): - return False def startitem(self): pass def data(self, **data):