Commits

Patrick Mézard  committed d68ccae

obsolete: make collapse create less markers

Collapsing A and B into C was registering:

A -> C
B -> C
A -> B

At this point, the last relation brings nothing and is removed for the
sake of simplicity:

A -> C
B -> C

test-evolve.t is slightly modified as one of the relations let stabilize
compute a target outside of the parent revision tree. This is a
stabilize bug, not trivial to fix, so let's tweak the test for now.

  • Participants
  • Parent commits b41ff69
  • Branches default

Comments (0)

Files changed (6)

File hgext/obsolete.py

             assert len(rootrevs) == 1, rootrevs
             rootnode = self[rootrevs[0]].node()
             for n in oldnodes:
-                if n != rootnode:
-                    self.addobsolete(n, rootnode)
                 self.addobsolete(newnode, n)
 
         def _turn_extinct_secret(self):

File tests/test-amend.t

   $ hg amend
   $ hg debugsuccessors
   07f494440405 a34b93d251e4
-  07f494440405 bd19cbe78fbf
   bd19cbe78fbf a34b93d251e4
   $ hg branch
   foo
   [255]
   $ hg debugsuccessors
   07f494440405 a34b93d251e4
-  07f494440405 bd19cbe78fbf
   bd19cbe78fbf a34b93d251e4
   $ hg phase 2
   2: draft
   [255]
   $ hg debugsuccessors
   07f494440405 a34b93d251e4
-  07f494440405 bd19cbe78fbf
   7384bbcba36f 000000000000
   bd19cbe78fbf a34b93d251e4
   $ glog

File tests/test-evolve.t

   4	feature-B: another feature - test
   1	: a nifty feature - test
   0	: base - test
-  $ hg up -q 1
-  Working directory parent is obsolete
+  $ hg up -q 0
   $ glog --hidden
   o  6:23409eba69a0@default(draft) a nifty feature
   |
   | | |
   | | o  2:7b36850622b2@default(secret) another feature
   | |/
-  | @  1:568a468b60fc@default(draft) a nifty feature
+  | o  1:568a468b60fc@default(draft) a nifty feature
   |/
-  o  0:e55e0562ee93@default(draft) base
+  @  0:e55e0562ee93@default(draft) base
   
   $ hg debugsuccessors
   524e478d4811 f8111a076f09
   568a468b60fc 23409eba69a0
-  568a468b60fc e416e48b2742
-  7b36850622b2 524e478d4811
   7b36850622b2 f8111a076f09
   e416e48b2742 23409eba69a0
   $ hg stabilize

File tests/test-obsolete-rebase.t

   
   $ hg debugsuccessors
   03f31481307a a7773ffa7edc
-  076e9b2ffbe1 03f31481307a
   076e9b2ffbe1 a7773ffa7edc
   4e322f7ce8e3 000000000000
   98e4a024635e 9c5494949763
   $ diff -u ../successors.old ../successors.new
   --- ../successors.old* (glob)
   +++ ../successors.new* (glob)
-  @@ -1,5 +1,7 @@
+  @@ -1,4 +1,6 @@
    03f31481307a a7773ffa7edc
-   076e9b2ffbe1 03f31481307a
    076e9b2ffbe1 a7773ffa7edc
   +4b9d80f48523 1951ead97108
    4e322f7ce8e3 000000000000

File tests/test-stabilize-order.t

    3a4a591493f8 f5ff10856e5a
    3ca0ded0dc50 ab8cbb6d87ff
   +7a7552255fb5 5e819fbb0d27
-   93418d2c0979 3a4a591493f8
    93418d2c0979 f5ff10856e5a
    ab8cbb6d87ff 6bf44048e43f
+   ef23d6ef94d6 ab8cbb6d87ff
   [1]
   $ glog
   @  9:5e819fbb0d27@default(draft) addc

File tests/test-stabilize-result.t

   
   $ hg debugsuccessors
   102a90ea7b4a 1447e1c4828d
-  102a90ea7b4a 41ad4fe8c795
   41ad4fe8c795 1447e1c4828d
   cce2c55b8965 000000000000