Mercurial > hg-stable
changeset 35681:e29823c6d3e8
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().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 16 Jan 2018 21:51:27 +0900 |
parents | 077ee15b8493 |
children | 8273c1a47282 |
files | mercurial/commands.py tests/test-directaccess.t |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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