Size: 4104
Comment:
|
Size: 4313
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 190: | Line 190: |
=== Analysis === 1. `hg update` moving to branch head 2. `complains about non-linear` 3. ignoring other lower heads 4. behavior change with --clean === Behavior Change Proposal === |
Note:
This page is primarily intended for developers of Mercurial.
Default destination plan
A lot of Mercurial command as "default" behavior, some needs revisiting.
Contents
1. Default Update Destination
(we discuss the case without bookmark)
1.1. Current Behavior
Current default value for update is: max(branch(.))
1.1.1. Pure Consumer Case
If the user is just using hg pull and hg update this work fine.
#1 User is on branch foo,
#2 hg pull bring new changeset in branch foo,
#3 hg update bring the user on the latest (just pulled) changeset on foo.
hg update updated working copy content to latest version, missin accomplished.
1.1.2. Consumer Case: pulling multiple heads
#1 User is on branch foo,
#2 hg pull bring multiple heads in branch foo,
#3 hg update bring the user one of the head.
user got only half of the pulled changesets
used head is "arbitrary"
No warning about the user heads
(<!>, pulling multiple heads on a branch point at FeatureBranchesStruggle or advanced usecase/users)
1.1.3. Producer Case: simple
#1 User is on branch foo, with some own local changesets on branch foo
#2 hg pull bring new changeset in branch foo,
The pull commend mention that a new head is created.
#3 hg update refuse to update for "non-linear update"
This prompt the use toward doing a merge
The message is not quite explicit about that
Message is not issued if Y is created after the pull (quite common, if pulling with uncommitted change)
hg update --clean will happily move to D without any message
1.1.4. Productor Case: pulling multiple heads
#1 User is on branch foo, with some own local changesets on branch foo
#2 hg pull bring new changeset on the same topological branch and another new heads,
(could also be achieved with use have X, Y locally but went back on X for some reason before the pull)
The pull commend mention that a new head is created.
#3 hg update refuse to update for "non-linear update"
This prompt the use toward doing a merge
The message is not quite explicit about that a merge
Merging will not reduce the number of heads becase we are not a head
hg update --clean will happily move to D without any message, actually 'updating backward' our current working copy.
if Y existed before the pull, hg up would have brought us on Y.
1.2. Analysis
hg update moving to branch head
complains about non-linear
- ignoring other lower heads
- behavior change with --clean
1.3. Behavior Change Proposal
2. Default Rebase Destination
3. Progress
((./) done, in progress,
Need to be done)
extra default destinations into their own functions,
make the report/failure logic optional,
expose default destination as revsets,
rework default update destination,
rework default rebase destination,
rework default merge destination,