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

login
register
mail settings
Submitter phabricator
Date Nov. 12, 2019, 9:33 p.m.
Message ID <cd9fffead566fe6134e4e7b9f8255069@localhost.localdomain>
Download mbox | patch
Permalink /patch/43149/
State Not Applicable
Headers show

Comments

phabricator - Nov. 12, 2019, 9:33 p.m.
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




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
@@ -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)