diff -r c93562fb12cc -r 83153299aab5 mercurial/commands.py --- a/mercurial/commands.py Fri Mar 16 00:22:58 2007 -0300 +++ b/mercurial/commands.py Fri Mar 16 00:22:59 2007 -0300 @@ -2563,7 +2563,10 @@ node = repo.lookup(node) else: wc = repo.workingctx() - node = repo.branchtags()[wc.branch()] + try: + node = repo.branchtags()[wc.branch()] + except KeyError: + raise util.Abort(_("branch %s not found") % wc.branch()) return node def verify(ui, repo):