Differences between revisions 3 and 4
Revision 3 as of 2015-10-22 18:00:10
Size: 4104
Comment:
Revision 4 as of 2015-10-22 18:09:02
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.

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.

  • {X} user got only half of the pulled changesets

  • <!> used head is "arbitrary"

  • {X} 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

  • {X} Message is not issued if Y is created after the pull (quite common, if pulling with uncommitted change)

  • {X} 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

  • {X} Merging will not reduce the number of heads becase we are not a head

  • {X} hg update --clean will happily move to D without any message, actually 'updating backward' our current working copy.

  • {X} if Y existed before the pull, hg up would have brought us on Y.

1.2. Analysis

  1. hg update moving to branch head

  2. complains about non-linear

  3. ignoring other lower heads
  4. behavior change with --clean

1.3. Behavior Change Proposal

2. Default Rebase Destination

3. Progress

((./) done, <!> in progress, {X} Need to be done)

  • (./) extra default destinations into their own functions,

  • {X} make the report/failure logic optional,

  • {X} expose default destination as revsets,

  • {X} rework default update destination,

  • {X} rework default rebase destination,

  • {X} rework default merge destination,


CategoryDeveloper and CategoryNewFeatures

DefaultDestinationPlan (last edited 2016-02-24 16:27:36 by Pierre-YvesDavid)