annotate tests/test-evolve-content-divergent-first-changeset.t @ 5079:1f92a6aa40d6

evolve: add pre-check logic for content-divergence in rewriteutil.precheck() For now, pre-check will abort if rewriting a rev create divergence (and config experimental.evolution.allowdivergence is not set to True). But this behaviour can be improved where instead of abort maybe we can confirm the user to either proceed with divergence or some other options depends on what command user is running. Changes in test file are used to overrides the pre-check for testing purpose (using experimental.evolution.allowdivergence=yes).
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Mon, 04 Nov 2019 01:30:50 +0530
parents b779b40f996e
children 1fe3f7ffb462
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4984
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
1 $ . $TESTDIR/testlib/pythonpath.sh
5079
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
2 $ cat >> $HGRCPATH << EOF
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
3 > [extensions]
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
4 > evolve=
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
5 > [experimental]
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
6 > evolution.allowdivergence = True
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
7 > EOF
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4984
diff changeset
8
4984
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
9
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
10 This test file tests the case of content-divergence resolution of changesets
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
11 that have the null revision as the parent.
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
12
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
13 $ hg init issue6201
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
14 $ cd issue6201
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
15
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
16 $ touch test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
17 $ hg add test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
18 $ hg commit -m test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
19 $ hg log -T '{node|short}\n'
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
20 be090ea66256
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
21
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
22 $ echo a >> test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
23 $ hg amend -m div1
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
24 $ hg log -T '{node|short}\n'
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
25 79fa0eb22d65
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
26
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
27 $ hg up be090ea66256 --hidden --quiet
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
28 updated to hidden changeset be090ea66256
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
29 (hidden revision 'be090ea66256' was rewritten as: 79fa0eb22d65)
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
30 working directory parent is obsolete! (be090ea66256)
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
31 $ echo a >> test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
32 $ echo b >> test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
33 $ hg amend -m div2
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
34 2 new content-divergent changesets
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
35 $ hg log -T '{node|short}\n'
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
36 4b2524b7508e
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
37 79fa0eb22d65
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
38
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
39 $ hg evolve --content-divergent --config ui.merge=internal:other
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
40 merge:[1] div1
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
41 with: [2] div2
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
42 base: [0] test
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
43 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
44 working directory is now at 12772224141b
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
45
b779b40f996e evolve: fix content-divergence resolution when p1 is null (issue6201)
Manuel Jacob <me@manueljacob.de>
parents:
diff changeset
46 $ hg evolve --list