how to import tags?
Matt Harbison
mharbison72 at gmail.com
Sat May 26 00:29:22 UTC 2018
On Thu, 24 May 2018 16:35:31 -0400, Hollis Blanchard
<hollis_blanchard at mentor.com> wrote:
> On 05/24/2018 11:38 AM, Augie Fackler wrote:
>>
>>
>>> On May 24, 2018, at 2:20 PM, Hollis Blanchard
>>> <hollis_blanchard at mentor.com <mailto:hollis_blanchard at mentor.com>>
>>> wrote:
>>>
>>> On 05/23/2018 03:15 PM, Hollis Blanchard wrote:
>>>>
>>>> 2. Commit tags as children of the correct head.
>>>>
>>>> I don't see a 'tag' cmdline option for this, though: the parent
>>>> commit is the parent of the working directory, without an ability to
>>>> override. That means I would need to keep working directories for
>>>> all these mirrors, and since there are GBs of working directories
>>>> and millions of files, that would be significant overhead.
>>>>
>>> Looks like I can use 'hg debugsetparents' for exactly this purpose:
>>>
>>> hg debugsetparents REV1 [REV2]
>>>
>>> manually set the parents of the current working directory
>>>
>>> This is useful for writing repository conversion tools, but
>>> should be used
>>> with care. For example, neither the working directory nor the
>>> dirstate is
>>> updated, so file status may be incorrect after running this
>>> command.
>>>
>>> I hope that debug command sticks around…
>>>
>> I’d be very surprised if it went away. I’d probably do what you’re
>> doing given the same constraints.
>>
> I've run into two complications:
>
> 1. Bookmarks. If I apply a tag to a bookmarked changeset, I want the
> bookmark to advance (don't I?). However, debugsetparents doesn't
> activate the bookmark, so it doesn't advance. To work around that, I
> could script all the bookmark manipulation by hand, but that's awkward
> and becoming many python invocations...
>
> 2. Importing one label become a series of stateful commands:
> debugsetparents; tag; adjust bookmarks; maybe debugsetparents back. If
> something interrupts that sequence (e.g. concurrent imports, or even
> something external like 'kill'), then badness would result.
Maybe you can use `hg share -U` to create a scratch area in order to
debugsetparents and tag, and then throw it away (so no set back)? Then in
the case of an interrupt, the main repo will either get the tag commit, or
not.
IDK how well bookmarks play with share. You might need to adjust them on
the main repo.
> It seems like a 'tag --parent' option would solve all of these problems.
> Is that reasonable, if someone submitted a decent patch for it?
>
> Hollis Blanchard
> Mentor Graphics Emulation Division
More information about the Mercurial-devel
mailing list