Changing default phase when no data is availble
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Jan 9 17:18:53 UTC 2012
(Reordered answer)
On 3 janv. 2012, at 19:52, Matt Mackall wrote:
> On Tue, 2012-01-03 at 19:36 +0100, Pierre-Yves David wrote:
>> No the whole point is: With the current code, once I upgrape my mercurial
>> version to 2.1.0 can't modify changeset I did not pulled/pushed yet.
>
> In other words, it "fails safe". Which matters for all of 30 minutes
> after upgrade and/or one manual command. I don't think this is worth
> worrying about.
As timeless pointed it won't be an issue for people using mq. For people other
>>>> The current default is "Public", I'm advocating a shift to "Draft".
>>>
>>> Then this will be both useless and dangerous for the N years it takes
>>> Bitbucket and Google and Kiln and whoever else to implement phase
>>> support.
>>
>> No, you got it wrong:
>>
>> My proposal is content of *local* repository are seen as draft if no phases
>> data is available.
>
> Ok, then this is still dangerous. User who knows he's using 2.0 and thus
> 'rebase is safe' can accidentally rebase an entire public branch if he
> happens to be using an 'old' repo.
This is a pretty convincing argument is favor of keeping this default.
>> No the whole point is: With the current code, once I upgrape my mercurial
>> version to 2.1.0 can't modify changeset I did not pulled/pushed yet.
>
> In other words, it "fails safe". Which matters for all of 30 minutes
> after upgrade and/or one manual command. I don't think this is worth
> worrying about.
As timeless pointed it won't be an issue for people using mq.
But for people using other way to edit history this is a **major** hassle as both Augie and I can testify. Moreover this will impact very basic user who are used to commit early and use ``hg pull --rebase``.
So we need a decent way to deal with this situation. I have two in mind:
==
I) First solution is to have a phase.old-as-draft option.
When phase.old-as-draft=true:
* The default phase is draft when not data are found.
* A warning is displayed when no data phase data are found
(A variation is to make this the default behavior when phases.publish=False which break the "public=False" only alter server)
==
II) Second solution is to have a ``hg syncphase`` command.
This command will synchronise phase boundary without exchanging any changeset. This command can have a --exact (or --copy) option that will strictly copy the remote phase instead of using the minimal phase value.
If we have such command people could do a "hg syncphase --exact [dest]" to restore proper phase on the local repo and safely rebase local only content.
(I think I'll implement such command on day or another in particular with a --push switch to push phase data.
``hg syncphase --exact [dest]`` allowing to move remote boundary backward in order to fix mistake.)
==
Please pick at least one of the solution before 2.1
--
Pierre-Yves
More information about the Mercurial-devel
mailing list