[PATCH] import: --obsolete flag for automatic obsolescence marker

Pierre-Yves David pierre-yves.david at logilab.fr
Fri Mar 29 13:10:07 CDT 2013


On Thu, Mar 28, 2013 at 05:08:44PM -0500, Sean Farley wrote:
> 
> Kevin Bullock writes:
> 
> > On 28 Mar 2013, at 1:43 PM, pierre-yves.david at logilab.fr wrote:
> >
> >> # HG changeset patch
> >> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> >> # Date 1364495597 -3600
> >> #      Thu Mar 28 19:33:17 2013 +0100
> >> # Node ID 89f8f7ad21e55e4442478909c9a3d269e418e6d6
> >> # Parent  fc5388b69f50c5c504736151898a4da0471811f8
> >> import: --obsolete flag for automatic obsolescence marker
> >> 
> >> A new `--obsolete` flag is added to import. When present, the new node will be
> >> marked as a successors of the one specified in the `Node` field of the imported
> >> patch. No marker are created is created revision have the same node.
> >> 
> >> This improve email based work flow where implicit rebase are likely to happen.
> >> 
> >> This new behavior requires a flags, otherwise the `hg export x | hg import -`
> >> idiot would change, turning the source obsolete.
> >> (Changing from `hg graft x` to `hg rebase --dest . --rev x`)
> >
> > I'd rather we do it without a flag (if obsolescence is enabled). For starters, we have a built-in graft command, making the old idiom obsolete and unnecessary. But if people want to do this sort of "manual graft", _and_ have obsolete enabled, they can use --config to disable it for the import invocation.
> >
> > If we add a flag, no one will use it and we won't get our lovely obsolescence markers added.
> 
> +1 on Kevin's reasoning here

still -1 on doing it on an automatic basis. hg import never had
"deleting commit" in it semantic and I do not think it is a good idea to
changes that.

We could hide the auto obsolesting under a richer flag like

    "hg import --rebase"

Whose semantic would be:

    1) apply the patch using pvec were it apply the best
    2) rebase it on the current working directory parent
    3) create obsolescence marker from <patch->#Node> to >result>

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130329/22d31f20/attachment.pgp>


More information about the Mercurial-devel mailing list