mercurial/commands.py
changeset 4175 a2335e832e16
parent 4156 30857b5779f8
child 4177 ba51a8225a60
child 4190 e8ee8fdeddb1
child 4204 f9bbcebcacea
equal deleted inserted replaced
4174:7307d2e98b32 4175:a2335e832e16
  2542             repo.ui.warn(_("Using head %s for branch %s\n")
  2542             repo.ui.warn(_("Using head %s for branch %s\n")
  2543                          % (short(node), branch))
  2543                          % (short(node), branch))
  2544         else:
  2544         else:
  2545             raise util.Abort(_("branch %s not found") % branch)
  2545             raise util.Abort(_("branch %s not found") % branch)
  2546     else:
  2546     else:
  2547         node = node and repo.lookup(node) or repo.changelog.tip()
  2547         if node:
       
  2548             node = repo.lookup(node)
       
  2549         else:
       
  2550             wc = repo.workingctx()
       
  2551             node = repo.branchtags()[wc.branch()]
  2548     return node
  2552     return node
  2549 
  2553 
  2550 def verify(ui, repo):
  2554 def verify(ui, repo):
  2551     """verify the integrity of the repository
  2555     """verify the integrity of the repository
  2552 
  2556