update: fix crash on bare update when directaccess is enabled
'rev' may be None. An empty 'rev' string shouldn't also be passed to
unhidehashlikerevs().
--- a/mercurial/commands.py Tue Jan 16 21:42:42 2018 +0900
+++ b/mercurial/commands.py Tue Jan 16 21:51:27 2018 +0900
@@ -5530,7 +5530,8 @@
# if we defined a bookmark, we have to remember the original name
brev = rev
- repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
+ if rev:
+ repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
ctx = scmutil.revsingle(repo, rev, rev)
rev = ctx.rev()
if ctx.hidden():
--- a/tests/test-directaccess.t Tue Jan 16 21:42:42 2018 +0900
+++ b/tests/test-directaccess.t Tue Jan 16 21:51:27 2018 +0900
@@ -162,6 +162,9 @@
$ hg up 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg up
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
`hg revert`
$ hg revert -r 28ad74 --all