Patchwork [5,of,6] log: drop dead code to concatenate --line-range patterns and pats

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 7, 2018, 1:25 p.m.
Message ID <f95d0d1e012a512550de.1518009906@mimosa>
Download mbox | patch
Permalink /patch/27426/
State Accepted
Headers show

Comments

Yuya Nishihara - Feb. 7, 2018, 1:25 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1516517424 -32400
#      Sun Jan 21 15:50:24 2018 +0900
# Node ID f95d0d1e012a512550de945350e08f3dc7db090f
# Parent  03f30f86c95a3847be7bb7b89a8cc22d9abee524
log: drop dead code to concatenate --line-range patterns and pats

It's disabled since 2e45bbd3db7b, and the current implementation is unlikely
to be reused.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3428,20 +3428,9 @@  def log(ui, repo, *pats, **opts):
         return logcmdutil.graphlog(ui, repo, revs, filematcher, opts)
 
     if linerange:
-        revs, lrfilematcher, hunksfilter = logcmdutil.getlinerangerevs(
+        revs, filematcher, hunksfilter = logcmdutil.getlinerangerevs(
             repo, revs, opts)
 
-        if filematcher is not None:
-            basefilematcher = filematcher
-
-            def filematcher(rev):
-                files = (basefilematcher(rev).files()
-                         + lrfilematcher(rev).files())
-                return scmutil.matchfiles(repo, files)
-
-        elif filematcher is None:
-            filematcher = lrfilematcher
-
     getrenamed = None
     if opts.get('copies'):
         endrev = None