tests/test-evolve-abort-orphan.t
branchmercurial-5.0
changeset 5280 90fbbc29b93a
parent 4863 5cd7d16b8733
child 4865 31c481934138
equal deleted inserted replaced
5279:35e769c9604f 5280:90fbbc29b93a
     8 This test contains cases when `hg evolve` is doing orphan resolution.
     8 This test contains cases when `hg evolve` is doing orphan resolution.
     9 
     9 
    10 Setup
    10 Setup
    11 =====
    11 =====
    12 
    12 
    13 #testcases abortcommand abortflag
       
    14   $ cat >> $HGRCPATH <<EOF
    13   $ cat >> $HGRCPATH <<EOF
    15   > [phases]
    14   > [phases]
    16   > publish = False
    15   > publish = False
    17   > [alias]
    16   > [alias]
    18   > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
    17   > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
    19   > [extensions]
    18   > [extensions]
    20   > EOF
    19   > EOF
    21   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
    20   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
    22 
    21 
    23 #if abortflag
       
    24   $ cat >> $HGRCPATH <<EOF
    22   $ cat >> $HGRCPATH <<EOF
    25   > [alias]
    23   > [alias]
    26   > abort = evolve --abort
    24   > abort = evolve --abort
    27   > EOF
    25   > EOF
    28 #endif
       
    29 
    26 
    30   $ hg init abortrepo
    27   $ hg init abortrepo
    31   $ cd abortrepo
    28   $ cd abortrepo
    32   $ echo ".*\.orig" > .hgignore
    29   $ echo ".*\.orig" > .hgignore
    33   $ hg add .hgignore
    30   $ hg add .hgignore
    47       () draft
    44       () draft
    48 
    45 
    49 Testing --abort when no evolve is interrupted
    46 Testing --abort when no evolve is interrupted
    50 =============================================
    47 =============================================
    51 
    48 
    52 #if abortflag
       
    53   $ hg evolve --abort
    49   $ hg evolve --abort
    54   abort: no interrupted evolve to abort
    50   abort: no interrupted evolve to abort
    55   [255]
    51   [255]
    56 #else
       
    57   $ hg abort
       
    58   abort: no operation in progress
       
    59   [255]
       
    60 #endif
       
    61 
    52 
    62 Testing with wrong combination of flags
    53 Testing with wrong combination of flags
    63 =======================================
    54 =======================================
    64 
    55 
    65   $ hg evolve --abort --continue
    56   $ hg evolve --abort --continue
   115   user:        test
   106   user:        test
   116   date:        Thu Jan 01 00:00:00 1970 +0000
   107   date:        Thu Jan 01 00:00:00 1970 +0000
   117   instability: orphan
   108   instability: orphan
   118   summary:     added d
   109   summary:     added d
   119   
   110   
   120 #if abortcommand
       
   121 when in dry-run mode
       
   122   $ hg abort --dry-run
       
   123   evolve in progress, will be aborted
       
   124 #endif
       
   125 
   111 
   126   $ hg abort
   112   $ hg abort
   127   evolve aborted
   113   evolve aborted
   128   working directory is now at e93a9161a274
   114   working directory is now at e93a9161a274
   129 
   115