tests/testlib/topic_setup.sh
author Pulkit Goyal <7895pulkit@gmail.com>
Sun, 18 Jun 2017 03:23:46 +0530
changeset 2624 fd602980f7ee
parent 2045 db617700d318
child 2828 fa2deeb5dd03
permissions -rw-r--r--
topics: make sure we commit on new parents while changing topics (issue5441) While changing topics of a set of linear commits, we used to commit our new changesets with new topic on parents of its predecessor i.e. changeset before the topic change. If the topic of parent was also changed, that parent will become obsolete and hence resulting the cnew commit in unstable state. For a set of linear commits this repeats and we end up in a tree state as mentioned in the bug. This patch fixes the bug by checking whether the parent was obsoleted and if yes, commit on the new parent.
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
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
# This file holds logic that is used in many tests.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
# 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
     5
#  $ . "$TESTDIR/testlib/topic_setup.sh"
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
1840
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
     7
# Enable obsolete markers and enable extensions
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
     8
cat >> $HGRCPATH << EOF
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
     9
[experimental]
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    10
evolution=createmarkers,exchange
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    11
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    12
[extensions]
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    13
rebase=
2321fd2ed56e testlib: enable rebase and obsolete for easier testing
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
    14
EOF
1901
85390446f8c1 packaging: fix setup.py and install as hgext3rd.topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1840
diff changeset
    15
echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic" >> $HGRCPATH