comparison mercurial/commands.py @ 4231:83153299aab5

avoid a traceback with hg branch newbranch; hg up
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 16 Mar 2007 00:22:59 -0300
parents 24c22a3f2ef8
children 0d51eb296fb9 89075f106414
comparison
equal deleted inserted replaced
4230:c93562fb12cc 4231:83153299aab5
2561 else: 2561 else:
2562 if node: 2562 if node:
2563 node = repo.lookup(node) 2563 node = repo.lookup(node)
2564 else: 2564 else:
2565 wc = repo.workingctx() 2565 wc = repo.workingctx()
2566 node = repo.branchtags()[wc.branch()] 2566 try:
2567 node = repo.branchtags()[wc.branch()]
2568 except KeyError:
2569 raise util.Abort(_("branch %s not found") % wc.branch())
2567 return node 2570 return node
2568 2571
2569 def verify(ui, repo): 2572 def verify(ui, repo):
2570 """verify the integrity of the repository 2573 """verify the integrity of the repository
2571 2574