Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 5080:73fdc8bd3ed8
Update on pull -u when heads were closed (fixes issue666).
Patch written by Benoit Boissinot.
This should probably be improved in the future to handle long-living
branches, as joining two "other" heads will switch to that new head.
But this is not a new problem, as adding to the "other" head would have
switched to that new head, too.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 06 Aug 2007 20:25:50 +0200 |
parents | 3d35c8cb5eb4 |
children | f94dbc6c7eaf 90be02035993 |
comparison
equal
deleted
inserted
replaced
5079:04c1474ccddd | 5080:73fdc8bd3ed8 |
---|---|
2022 | 2022 |
2023 def postincoming(ui, repo, modheads, optupdate): | 2023 def postincoming(ui, repo, modheads, optupdate): |
2024 if modheads == 0: | 2024 if modheads == 0: |
2025 return | 2025 return |
2026 if optupdate: | 2026 if optupdate: |
2027 if modheads == 1: | 2027 if modheads <= 1: |
2028 return hg.update(repo, None) | 2028 return hg.update(repo, None) |
2029 else: | 2029 else: |
2030 ui.status(_("not updating, since new heads added\n")) | 2030 ui.status(_("not updating, since new heads added\n")) |
2031 if modheads > 1: | 2031 if modheads > 1: |
2032 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) | 2032 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) |