2020-10-20 03:05:23 +03:00
|
|
|
# coding=utf-8
|
|
|
|
|
2019-07-18 06:59:57 +03:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
#
|
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
|
|
from testutil.dott import feature, sh, testtmp # noqa: F401
|
|
|
|
|
|
|
|
|
|
|
|
sh % "cat" << r"""
|
|
|
|
[extensions]
|
|
|
|
absorb=
|
|
|
|
""" >> "$HGRCPATH"
|
|
|
|
|
2020-09-24 19:44:20 +03:00
|
|
|
sh % "hg init repo"
|
|
|
|
sh % "cd repo"
|
2019-07-18 06:59:57 +03:00
|
|
|
sh % "hg debugdrawdag" << r"""
|
|
|
|
C
|
|
|
|
|
|
|
|
|
B
|
|
|
|
|
|
|
|
|
A
|
|
|
|
"""
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
sh % "hg debugmakepublic -r A"
|
2019-07-18 06:59:57 +03:00
|
|
|
|
|
|
|
sh % "hg update C -q"
|
|
|
|
sh % "printf B1" > "B"
|
|
|
|
|
|
|
|
sh % "hg absorb -aq"
|
|
|
|
|
|
|
|
sh % "hg log -G -T '{desc} {phase}'" == r"""
|
2020-07-02 23:11:57 +03:00
|
|
|
@ C draft
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-07-18 06:59:57 +03:00
|
|
|
o B draft
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-07-18 06:59:57 +03:00
|
|
|
o A public"""
|