Patchwork D7149: export: use unfiltered repo if we're exporting the working copy parent

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

Comments

phabricator - Oct. 22, 2019, 5:57 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/D7149

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 22, 2019, 9:42 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/D7149/new/

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

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
@@ -2621,6 +2621,11 @@ 
     if bookmark and changesets:
         raise error.Abort(_(b"-r and -B are mutually exclusive"))
 
+    if not bookmark and not changesets:
+        # Avoid loading obsmarkers if we're accessing only the working copy
+        # parent (which will never be hidden).
+        repo = repo.unfiltered()
+
     if bookmark:
         if bookmark not in repo._bookmarks:
             raise error.Abort(_(b"bookmark '%s' not found") % bookmark)