Mercurial > hg
comparison mercurial/merge.py @ 19798:76df01e56e7f
update: improve error message for clean non-linear update
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 23 Sep 2013 17:43:33 -0700 |
parents | 499fc471296b |
children | ab3e42225dbc |
comparison
equal
deleted
inserted
replaced
19797:a9abdb168425 | 19798:76df01e56e7f |
---|---|
662 y n n * | --- ok --- | 662 y n n * | --- ok --- |
663 y y * * | --- (4) --- | 663 y y * * | --- (4) --- |
664 | 664 |
665 x = can't happen | 665 x = can't happen |
666 * = don't-care | 666 * = don't-care |
667 1 = abort: crosses branches (use 'hg merge' or 'hg update -c') | 667 1 = abort: not a linear update (merge or update --check to force update) |
668 2 = abort: crosses branches (use 'hg merge' to merge or | 668 2 = abort: crosses branches (use 'hg merge' to merge or |
669 use 'hg update -C' to discard changes) | 669 use 'hg update -C' to discard changes) |
670 3 = abort: uncommitted local changes | 670 3 = abort: uncommitted local changes |
671 4 = incompatible options (checked in commands.py) | 671 4 = incompatible options (checked in commands.py) |
672 | 672 |
729 elif dirty: | 729 elif dirty: |
730 msg = _("crosses branches (merge branches or use" | 730 msg = _("crosses branches (merge branches or use" |
731 " --clean to discard changes)") | 731 " --clean to discard changes)") |
732 raise util.Abort(msg) | 732 raise util.Abort(msg) |
733 else: # node is none | 733 else: # node is none |
734 msg = _("crosses branches (merge branches or update" | 734 msg = _("not a linear update") |
735 " --check to force update)") | 735 hint = _("merge or update --check to force update") |
736 raise util.Abort(msg) | 736 raise util.Abort(msg, hint=hint) |
737 else: | 737 else: |
738 # Allow jumping branches if clean and specific rev given | 738 # Allow jumping branches if clean and specific rev given |
739 pa = p1 | 739 pa = p1 |
740 | 740 |
741 ### calculate phase | 741 ### calculate phase |