Commit 80fdbbcf authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

archive: add support to specify hidden revs if directaccess config is set

Differential Revision:
parent b6ce3568771d
......@@ -467,7 +467,10 @@ def archive(ui, repo, dest, **opts):
opts = pycompat.byteskwargs(opts)
ctx = scmutil.revsingle(repo, opts.get('rev'))
rev = opts.get('rev')
if rev:
repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
ctx = scmutil.revsingle(repo, rev)
if not ctx:
raise error.Abort(_('no working directory: please specify a revision'))
node = ctx.node()
......@@ -148,6 +148,11 @@ Testing with hash
$ hg status --change 28ad74
A c
`hg archive`
This should not throw error
$ hg archive -r 28ad74 foo
`hg update`
$ hg up 28ad74
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment