Patchwork D1811: annotate: add support to specify hidden revs if directaccess config is set

login
register
mail settings
Submitter phabricator
Date Jan. 6, 2018, 2:53 a.m.
Message ID <11cda8d74fa69f4cab824f002cdff20a@localhost.localdomain>
Download mbox | patch
Permalink /patch/26576/
State Not Applicable
Headers show

Comments

phabricator - Jan. 6, 2018, 2:53 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb6ce3568771d: annotate: add support to specify hidden revs if directaccess config is set (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1811?vs=4707&id=4727

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-directaccess.t

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/tests/test-directaccess.t b/tests/test-directaccess.t
--- a/tests/test-directaccess.t
+++ b/tests/test-directaccess.t
@@ -138,6 +138,11 @@ 
   $ hg identify -r 28ad74
   28ad74487de9
 
+`hg annotate`
+
+  $ hg annotate -r 28ad74 a
+  0: foo
+
 `hg status`
 
   $ hg status --change 28ad74
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -293,7 +293,10 @@ 
         # to mimic the behavior of Mercurial before version 1.5
         opts['file'] = True
 
-    ctx = scmutil.revsingle(repo, opts.get('rev'))
+    rev = opts.get('rev')
+    if rev:
+        repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
+    ctx = scmutil.revsingle(repo, rev)
 
     rootfm = ui.formatter('annotate', opts)
     if ui.quiet: