mercurial/commands.py
changeset 7372 e17dbf140035
parent 7369 87158be081b8
child 7387 7e9a15fa6c8f
child 7402 bffdab64dfbb
equal deleted inserted replaced
7371:6ad2b914acbd 7372:e17dbf140035
  2089 
  2089 
  2090 def postincoming(ui, repo, modheads, optupdate, checkout):
  2090 def postincoming(ui, repo, modheads, optupdate, checkout):
  2091     if modheads == 0:
  2091     if modheads == 0:
  2092         return
  2092         return
  2093     if optupdate:
  2093     if optupdate:
  2094         if modheads <= 1 or checkout:
  2094         if (modheads <= 1 or len(repo.branchheads()) == 1) or checkout:
  2095             return hg.update(repo, checkout)
  2095             return hg.update(repo, checkout)
  2096         else:
  2096         else:
  2097             ui.status(_("not updating, since new heads added\n"))
  2097             ui.status(_("not updating, since new heads added\n"))
  2098     if modheads > 1:
  2098     if modheads > 1:
  2099         ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
  2099         ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))