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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Nov 12 21:33:55 UTC 2019


martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 18046.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7148?vs=17369&id=18046

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -176,6 +176,9 @@
     elif commandname == b'diff':
         if not kwargs.get(b'rev') and not kwargs.get(b'change'):
             use_unfiltered = True
+    elif commandname == b'annotate':
+        if not kwargs.get(b'rev'):
+            use_unfiltered = True
 
     return repo.unfiltered() if use_unfiltered else repo
 
@@ -455,6 +458,8 @@
         raise error.Abort(_(b'at least one of -n/-c is required for -l'))
 
     rev = opts.get(b'rev')
+    repo =_maybeunfilteredrepo(repo, b'annotate', pats, opts)
+
     if rev:
         repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn')
     ctx = scmutil.revsingle(repo, rev)



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


More information about the Mercurial-devel mailing list