tests/testlib/topic_setup.sh
author Martin von Zweigbergk <martinvonz@google.com>
Mon, 11 Mar 2019 23:57:12 -0700
changeset 4500 cfcb7eedc666
parent 2828 fa2deeb5dd03
permissions -rw-r--r--
evolve: use merge.update() for resolving phase divergence Iterating over the manifest when tree manifests and narrowness is in play produces entries for paths outside the narrowspec that represent trees. For example, if the tests/ directory of the hg repo was not in the narrowspec (and the hg repo was using tree manifests, which it doesn't), then there would be a "tests/" entry in the manifest. The merge code deals with some of these cases. For example, it's valid to do a merge if only the local side changes directories outside the narrowspec. That allows rebasing a local commit onto a public commit that had changes to the excluded paths to work. However, _resolvephasedivergent() was iterating of the manifests, which resulted in crashes for some of our users when they tried to resolve phase-divergent commits (actually content-divergent commits that became phase-divergent after the intermediate rebase). We can fix that by relying on merge.update(), since that already handles this case.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
#!/bin/sh
2828
fa2deeb5dd03 test: setup python path for topic tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2045
diff changeset
     2
. $TESTDIR/testlib/pythonpath.sh
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
# This file holds logic that is used in many tests.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
# It can be called in a test like this:
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1901
diff changeset
     6
#  $ . "$TESTDIR/testlib/topic_setup.sh"
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
1840
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
     8
# Enable obsolete markers and enable extensions
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
     9
cat >> $HGRCPATH << EOF
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    10
[experimental]
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    11
evolution=createmarkers,exchange
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    12
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    13
[extensions]
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    14
rebase=
2828
fa2deeb5dd03 test: setup python path for topic tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2045
diff changeset
    15
topic=
1840
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    16
EOF