Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4942:b8076522e889
Simplify update.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 18 Jul 2007 14:00:55 -0700 |
parents | e8c0b52c363c |
children | 9af1b47fe585 93b7e2fa7ee3 |
comparison
equal
deleted
inserted
replaced
4941:e8c0b52c363c | 4942:b8076522e889 |
---|---|
2016 def postincoming(ui, repo, modheads, optupdate): | 2016 def postincoming(ui, repo, modheads, optupdate): |
2017 if modheads == 0: | 2017 if modheads == 0: |
2018 return | 2018 return |
2019 if optupdate: | 2019 if optupdate: |
2020 if modheads == 1: | 2020 if modheads == 1: |
2021 return hg.update(repo, repo.changelog.tip()) # update | 2021 return hg.update(repo, None) |
2022 else: | 2022 else: |
2023 ui.status(_("not updating, since new heads added\n")) | 2023 ui.status(_("not updating, since new heads added\n")) |
2024 if modheads > 1: | 2024 if modheads > 1: |
2025 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) | 2025 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) |
2026 else: | 2026 else: |