Mercurial > hg
annotate tests/test-check-commit.t @ 27746:f0e9f38d250f
rebase: prevent creating divergence
Before this patch rebase would create divergence when you were rebasing obsolete
changesets on a destination not containing one of its successors.
This patch introduces rebase.allowdivergence to explicitly allow
divergence creation with rebase.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 12 Jan 2016 13:43:41 -0800 |
parents | 409a20314c64 |
children | 598e21079884 |
rev | line source |
---|---|
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 #require test-repo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 Enable obsolescence to avoid the warning issue when obsmarker are found |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 |
22955
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22067
diff
changeset
|
5 $ cat >> $HGRCPATH << EOF |
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22067
diff
changeset
|
6 > [experimental] |
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22067
diff
changeset
|
7 > evolution=createmarkers |
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 > EOF |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 Go back in the hg repo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 $ cd $TESTDIR/.. |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 $ for node in `hg log --rev 'draft() and ::.' --template '{node|short}\n'`; do |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
15 > hg export $node | contrib/check-commit > ${TESTTMP}/check-commit.out |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 > if [ $? -ne 0 ]; then |
23623
80a37f706011
test-check-commit-hg: clarify misleading "commit message rules" error
Martin von Zweigbergk <martinvonz@google.com>
parents:
22955
diff
changeset
|
17 > echo "Revision $node does not comply to rules" |
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 > echo '------------------------------------------------------' |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 > cat ${TESTTMP}/check-commit.out |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 > echo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 > fi |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 > done |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
23 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
24 |