Patchwork D7148: annotate: use unfiltered repo if we're annotating the working copy

login
register
mail settings
Submitter phabricator
Date Oct. 22, 2019, 5:56 p.m.
Message ID <differential-rev-PHID-DREV-rhyz4zfvy35ko5w5n4lw-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42534/
State New
Headers show

Comments

phabricator - Oct. 22, 2019, 5:56 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Same reasoning as in the previous patch.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7148

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 22, 2019, 9:41 p.m.
marmoute added a comment.


  Do you have performance number for this ?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7148/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7148

To: martinvonz, #hg-reviewers
Cc: marmoute, mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -438,6 +438,11 @@ 
         raise error.Abort(_(b'at least one of -n/-c is required for -l'))
 
     rev = opts.get(b'rev')
+    if not rev:
+        # Avoid loading obsmarkers if we're accessing only the working copy
+        # parent (which will never be hidden).
+        repo = repo.unfiltered()
+
     if rev:
         repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn')
     ctx = scmutil.revsingle(repo, rev)