Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4937:53a1847a99d1
Simplify update.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 18 Jul 2007 14:00:55 -0700 |
parents | bcba70b8006d |
children | 9af1b47fe585 90be978c9d3d |
comparison
equal
deleted
inserted
replaced
4936:bcba70b8006d | 4937:53a1847a99d1 |
---|---|
2031 def postincoming(ui, repo, modheads, optupdate): | 2031 def postincoming(ui, repo, modheads, optupdate): |
2032 if modheads == 0: | 2032 if modheads == 0: |
2033 return | 2033 return |
2034 if optupdate: | 2034 if optupdate: |
2035 if modheads == 1: | 2035 if modheads == 1: |
2036 return hg.update(repo, repo.changelog.tip()) # update | 2036 return hg.update(repo, None) |
2037 else: | 2037 else: |
2038 ui.status(_("not updating, since new heads added\n")) | 2038 ui.status(_("not updating, since new heads added\n")) |
2039 if modheads > 1: | 2039 if modheads > 1: |
2040 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) | 2040 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) |
2041 else: | 2041 else: |