how to import tags?
Hollis Blanchard
hollis_blanchard at mentor.com
Tue May 29 12:24:59 EDT 2018
This is the logical sequence of commands that my import script runs. Do
these results make sense to anybody?
[... many commands, including successful debugsetparents/tag pairs ...]
foo.hg$ hg debugsetparents heads(descendants(2785083))
foo.hg$ hg -v tag --force --rev 2785083 MyTag
abort: working copy of .hgtags is changed
(please commit .hgtags manually)
*foo.hg$ hg status****M .hgtags****foo.hg$ hg revert .hgtags****abort: .hgtags at 356c2bf65f98: not found in manifest!*
(The tags are applied after the regular commits, so I'm using
debugsetparents to land the tag-commit on the head related to the
commit-being-tagged. )The intent is for a graph like this:
o (other heads)
|
| o tag 2
| |
| o tag 1
| |
| o the commit which was tagged by "tag 1" and "tag 2"
| /
o (other commits)
Hollis Blanchard
Mentor Graphics Emulation Division
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.
>> Hollis Blanchard
>> Mentor Graphics Emulation Division
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> <mailto:Mercurial-devel at mercurial-scm.org>
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180529/a903d4fb/attachment.html>
More information about the Mercurial-devel
mailing list