tests/test-evolve-issue5832.t
changeset 3655 19e3771f4bcc
child 3656 62e4149435d8
equal deleted inserted replaced
3654:23e515ca0143 3655:19e3771f4bcc
       
     1 Test for issue 5832 present at https://bz.mercurial-scm.org/show_bug.cgi?id=5832
       
     2 ================================================================================
       
     3 
       
     4 Setup
       
     5 =====
       
     6 
       
     7   $ cat >> $HGRCPATH <<EOF
       
     8   > [phases]
       
     9   > publish = False
       
    10   > [alias]
       
    11   > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
       
    12   > [extensions]
       
    13   > EOF
       
    14   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
       
    15 
       
    16   $ hg init issue5832
       
    17   $ cd issue5832
       
    18 
       
    19   $ echo base > base
       
    20   $ hg ci -Aqm "added base"
       
    21 
       
    22   $ echo a > a
       
    23   $ hg ci -Aqm "added a"
       
    24 
       
    25   $ echo b > b
       
    26   $ hg ci -Aqm "added b"
       
    27 
       
    28   $ hg up .^^
       
    29   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
    30   $ echo c > c
       
    31   $ echo d > d
       
    32   $ hg ci -Aqm "added c and d"
       
    33 
       
    34   $ hg merge
       
    35   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    36   (branch merge, don't forget to commit)
       
    37   $ hg ci -m "merge commit"
       
    38 
       
    39   $ hg glog
       
    40   @    4:b9b387427a53 merge commit
       
    41   |\    () draft
       
    42   | o  3:9402371b436e added c and d
       
    43   | |   () draft
       
    44   o |  2:a1da0651488c added b
       
    45   | |   () draft
       
    46   o |  1:1b24879c5c3c added a
       
    47   |/    () draft
       
    48   o  0:bde1d2b6b5e5 added base
       
    49       () draft
       
    50 
       
    51   $ hg up 1b24879c5c3c
       
    52   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
       
    53   $ echo foo > a
       
    54   $ hg amend
       
    55   2 new orphan changesets
       
    56 
       
    57   $ hg up bde1d2b6b5e5
       
    58   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    59   $ echo c > c
       
    60   $ hg ci -Aqm "added c"
       
    61   $ hg up .^
       
    62   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    63   $ echo d > d
       
    64   $ hg ci -Aqm "added d"
       
    65   $ hg glog
       
    66   @  7:5841d7cf9893 added d
       
    67   |   () draft
       
    68   | o  6:62fb70414f99 added c
       
    69   |/    () draft
       
    70   | o  5:7014ec2829cd added a
       
    71   |/    () draft
       
    72   | *    4:b9b387427a53 merge commit
       
    73   | |\    () draft
       
    74   +---o  3:9402371b436e added c and d
       
    75   | |     () draft
       
    76   | *  2:a1da0651488c added b
       
    77   | |   () draft
       
    78   | x  1:1b24879c5c3c added a
       
    79   |/    () draft
       
    80   o  0:bde1d2b6b5e5 added base
       
    81       () draft
       
    82 
       
    83   $ hg prune -r 9402371b436e --succ 62fb70414f99 --succ 5841d7cf9893 --split
       
    84   1 changesets pruned
       
    85 
       
    86   $ hg glog
       
    87   @  7:5841d7cf9893 added d
       
    88   |   () draft
       
    89   | o  6:62fb70414f99 added c
       
    90   |/    () draft
       
    91   | o  5:7014ec2829cd added a
       
    92   |/    () draft
       
    93   | *    4:b9b387427a53 merge commit
       
    94   | |\    () draft
       
    95   +---x  3:9402371b436e added c and d
       
    96   | |     () draft
       
    97   | *  2:a1da0651488c added b
       
    98   | |   () draft
       
    99   | x  1:1b24879c5c3c added a
       
   100   |/    () draft
       
   101   o  0:bde1d2b6b5e5 added base
       
   102       () draft
       
   103 
       
   104 Checking what evolve is trying to do
       
   105 
       
   106   $ hg evolve --dry-run --any --all
       
   107   ** unknown exception encountered, please report by visiting
       
   108   ** https://mercurial-scm.org/wiki/BugTracker
       
   109   ** Python 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
       
   110   ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257)
       
   111   ** Extensions loaded: evolve
       
   112   Traceback (most recent call last):
       
   113     File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in <module>
       
   114       dispatch.run()
       
   115     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run
       
   116       status = (dispatch(req) or 0)
       
   117     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
       
   118       ret = _runcatch(req)
       
   119     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
       
   120       return _callcatch(ui, _runcatchfunc)
       
   121     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
       
   122       return scmutil.callcatch(ui, func)
       
   123     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch
       
   124       return func()
       
   125     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
       
   126       return _dispatch(req)
       
   127     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch
       
   128       cmdpats, cmdoptions)
       
   129     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
       
   130       ret = _runcommand(ui, options, cmd, d)
       
   131     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand
       
   132       return cmdfunc()
       
   133     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in <lambda>
       
   134       d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
       
   135     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check
       
   136       return func(*args, **kwargs)
       
   137     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve
       
   138       revs = _orderrevs(repo, revs)
       
   139     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs
       
   140       dependencies, rdependencies = utility.builddependencies(repo, revs)
       
   141     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies
       
   142       dependencies[r].add(succ)
       
   143   AttributeError: 'list' object has no attribute 'add'
       
   144   [1]
       
   145 
       
   146 Resolving instability using `hg evolve`
       
   147 
       
   148   $ hg evolve --any --all
       
   149   ** unknown exception encountered, please report by visiting
       
   150   ** https://mercurial-scm.org/wiki/BugTracker
       
   151   ** Python 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
       
   152   ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257)
       
   153   ** Extensions loaded: evolve
       
   154   Traceback (most recent call last):
       
   155     File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in <module>
       
   156       dispatch.run()
       
   157     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run
       
   158       status = (dispatch(req) or 0)
       
   159     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
       
   160       ret = _runcatch(req)
       
   161     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
       
   162       return _callcatch(ui, _runcatchfunc)
       
   163     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
       
   164       return scmutil.callcatch(ui, func)
       
   165     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch
       
   166       return func()
       
   167     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
       
   168       return _dispatch(req)
       
   169     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch
       
   170       cmdpats, cmdoptions)
       
   171     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
       
   172       ret = _runcommand(ui, options, cmd, d)
       
   173     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand
       
   174       return cmdfunc()
       
   175     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in <lambda>
       
   176       d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
       
   177     File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check
       
   178       return func(*args, **kwargs)
       
   179     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve
       
   180       revs = _orderrevs(repo, revs)
       
   181     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs
       
   182       dependencies, rdependencies = utility.builddependencies(repo, revs)
       
   183     File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies
       
   184       dependencies[r].add(succ)
       
   185   AttributeError: 'list' object has no attribute 'add'
       
   186   [1]