Mercurial > hg
comparison tests/test-merge-types.t @ 28029:72072cfc7e91
update: warn about other topological heads on bare update
A concern around the user experience of Mercurial is user getting stuck on there
own topological branch forever. For example, someone pulling another topological
branch, missing that message in pull asking them to merge and getting stuck on
there own local branch.
The current way to "address" this concern was for bare 'hg update' to target the
tipmost (also latest pulled) changesets and complain when the update was not
linear. That way, failure to merge newly pulled changesets would result in some
kind of failure.
Yet the failure was quite obscure, not working in all cases (eg: commit right
after pull) and the behavior was very impractical in the common case
(eg: issue4673).
To be able to change that behavior, we need to provide other ways to alert a
user stucks on one of many topological head. We do so with an extra message after
bare update:
1 other heads for branch "default"
Bookmark get its own special version:
1 other divergent bookmarks for "foobar"
There is significant room to improve the message itself, and we should augment
it with hint about how to see theses other heads or handle the situation (see
in-line comment). But having "a" message is already a significant improvement
compared to the existing situation. Once we have it we can iterate on a better
version of it. As having such message is an important step toward changing the
default destination for update and other nicety, I would like to move forward
quickly on getting such message.
This was discussed during London - October 2015 Sprint.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 02 Feb 2016 14:49:02 +0000 |
parents | 88d5db4b155c |
children | a7f8939641aa |
comparison
equal
deleted
inserted
replaced
28028:ac49ecb2a897 | 28029:72072cfc7e91 |
---|---|
153 | 153 |
154 $ hg up -C 0 | 154 $ hg up -C 0 |
155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
156 $ hg up | 156 $ hg up |
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
158 1 other heads for branch "default" | |
158 $ hg st | 159 $ hg st |
159 ? a.orig | 160 ? a.orig |
160 | 161 |
161 Update to link with local change should cause a merge prompt (issue3200): | 162 Update to link with local change should cause a merge prompt (issue3200): |
162 | 163 |
173 picked tool ':prompt' for a (binary False symlink True changedelete False) | 174 picked tool ':prompt' for a (binary False symlink True changedelete False) |
174 no tool found to merge a | 175 no tool found to merge a |
175 keep (l)ocal, take (o)ther, or leave (u)nresolved? u | 176 keep (l)ocal, take (o)ther, or leave (u)nresolved? u |
176 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 177 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
177 use 'hg resolve' to retry unresolved file merges | 178 use 'hg resolve' to retry unresolved file merges |
179 1 other heads for branch "default" | |
178 [1] | 180 [1] |
179 $ hg diff --git | 181 $ hg diff --git |
180 diff --git a/a b/a | 182 diff --git a/a b/a |
181 old mode 120000 | 183 old mode 120000 |
182 new mode 100644 | 184 new mode 100644 |