Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 42519:a68350a7fc55
log: pass getcopies() function instead of getrenamed() to displayer (API)
This reduces the duplication between the two displayer functions (and
between them and scmutil.getcopiesfn()). It's still more code than two
patches ago, but there's less duplication.
Differential Revision: https://phab.mercurial-scm.org/D6546
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 19 Jun 2019 10:19:32 -0700 |
parents | abd4783db5a7 |
children | 5f2f6912c9e6 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jun 19 09:59:45 2019 -0700 +++ b/mercurial/commands.py Wed Jun 19 10:19:32 2019 -0700 @@ -3887,12 +3887,12 @@ # then filter the result by logcmdutil._makerevset() and --limit revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) - getrenamed = None + getcopies = None if opts.get('copies'): endrev = None if revs: endrev = revs.max() + 1 - getrenamed = scmutil.getrenamedfn(repo, endrev=endrev) + getcopies = scmutil.getcopiesfn(repo, endrev=endrev) ui.pager('log') displayer = logcmdutil.changesetdisplayer(ui, repo, opts, differ, @@ -3901,7 +3901,7 @@ displayfn = logcmdutil.displaygraphrevs else: displayfn = logcmdutil.displayrevs - displayfn(ui, repo, revs, displayer, getrenamed) + displayfn(ui, repo, revs, displayer, getcopies) @command('manifest', [('r', 'rev', '', _('revision to display'), _('REV')),