Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 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 | a177c6aa055a |
children | ea3320015d54 |
comparison
equal
deleted
inserted
replaced
35680:077ee15b8493 | 35681:e29823c6d3e8 |
---|---|
5528 if date: | 5528 if date: |
5529 rev = cmdutil.finddate(ui, repo, date) | 5529 rev = cmdutil.finddate(ui, repo, date) |
5530 | 5530 |
5531 # if we defined a bookmark, we have to remember the original name | 5531 # if we defined a bookmark, we have to remember the original name |
5532 brev = rev | 5532 brev = rev |
5533 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') | 5533 if rev: |
5534 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') | |
5534 ctx = scmutil.revsingle(repo, rev, rev) | 5535 ctx = scmutil.revsingle(repo, rev, rev) |
5535 rev = ctx.rev() | 5536 rev = ctx.rev() |
5536 if ctx.hidden(): | 5537 if ctx.hidden(): |
5537 ui.warn(_("updating to a hidden changeset %s\n") % ctx.hex()[:12]) | 5538 ui.warn(_("updating to a hidden changeset %s\n") % ctx.hex()[:12]) |
5538 | 5539 |