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

Kevin Bullock kbullock+mercurial at ringworld.org
Thu Mar 28 14:36:46 CDT 2013


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.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list