tests/test-merge-halt.t
branchstable
changeset 48271 5228a6dc212b
parent 48270 3e66e4517744
child 48427 38941a28406a
equal deleted inserted replaced
48270:3e66e4517744 48271:5228a6dc212b
    42   $ hg rebase -s 1 -d 2 --tool false
    42   $ hg rebase -s 1 -d 2 --tool false
    43   rebasing 1:1f28a51c3c9b "c"
    43   rebasing 1:1f28a51c3c9b "c"
    44   merging a
    44   merging a
    45   merging b
    45   merging b
    46   merging a failed!
    46   merging a failed!
    47   merge halted after failed merge (see hg resolve)
    47   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
    48   [240]
    48   [240]
    49 
    49 
    50   $ hg resolve --list
    50   $ hg resolve --list
    51   U a
    51   U a
    52   U b
    52   U b
    70   merging b
    70   merging b
    71   merging a failed!
    71   merging a failed!
    72   continue merge operation (yn)? y
    72   continue merge operation (yn)? y
    73   merging b failed!
    73   merging b failed!
    74   continue merge operation (yn)? n
    74   continue merge operation (yn)? n
    75   merge halted after failed merge (see hg resolve)
    75   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
    76   [240]
    76   [240]
    77 
    77 
    78   $ hg resolve --list
    78   $ hg resolve --list
    79   U a
    79   U a
    80   U b
    80   U b
    99   was merge successful (yn)? y
    99   was merge successful (yn)? y
   100    output file b appears unchanged
   100    output file b appears unchanged
   101   was merge successful (yn)? n
   101   was merge successful (yn)? n
   102   merging b failed!
   102   merging b failed!
   103   continue merge operation (yn)? n
   103   continue merge operation (yn)? n
   104   merge halted after failed merge (see hg resolve)
   104   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   105   [240]
   105   [240]
   106 
   106 
   107   $ hg resolve --list
   107   $ hg resolve --list
   108   R a
   108   R a
   109   U b
   109   U b
   122   $ hg rebase -s 1 -d 2 --tool true
   122   $ hg rebase -s 1 -d 2 --tool true
   123   rebasing 1:1f28a51c3c9b "c"
   123   rebasing 1:1f28a51c3c9b "c"
   124   merging a
   124   merging a
   125   merging b
   125   merging b
   126   merging a failed!
   126   merging a failed!
   127   merge halted after failed merge (see hg resolve)
   127   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   128   [240]
   128   [240]
   129 
   129 
   130   $ hg resolve --list
   130   $ hg resolve --list
   131   U a
   131   U a
   132   U b
   132   U b
   143   merging a
   143   merging a
   144   merging b
   144   merging b
   145   was merge of 'a' successful (yn)? y
   145   was merge of 'a' successful (yn)? y
   146   was merge of 'b' successful (yn)? n
   146   was merge of 'b' successful (yn)? n
   147   merging b failed!
   147   merging b failed!
   148   merge halted after failed merge (see hg resolve)
   148   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   149   [240]
   149   [240]
   150 
   150 
   151   $ hg resolve --list
   151   $ hg resolve --list
   152   R a
   152   R a
   153   U b
   153   U b
   165 
   165 
   166 Check that unshelve isn't broken by halting the merge
   166 Check that unshelve isn't broken by halting the merge
   167   $ cat <<EOS >> $HGRCPATH
   167   $ cat <<EOS >> $HGRCPATH
   168   > [extensions]
   168   > [extensions]
   169   > shelve =
   169   > shelve =
       
   170   > [merge-tools]
       
   171   > false.check=conflicts
       
   172   > false.premerge=false
   170   > EOS
   173   > EOS
   171   $ echo foo > shelve_file1
   174   $ echo foo > shelve_file1
   172   $ echo foo > shelve_file2
   175   $ echo foo > shelve_file2
   173   $ hg ci -qAm foo
   176   $ hg ci -qAm foo
   174   $ echo bar >> shelve_file1
   177   $ echo bar >> shelve_file1
   184   unshelving change 'default'
   187   unshelving change 'default'
   185   rebasing shelved changes
   188   rebasing shelved changes
   186   merging shelve_file1
   189   merging shelve_file1
   187   merging shelve_file2
   190   merging shelve_file2
   188   merging shelve_file1 failed!
   191   merging shelve_file1 failed!
   189   merge halted after failed merge (see hg resolve)
   192   unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
   190   [240]
   193   [240]
   191 FIXME: This should claim it's in an 'unshelve' state
       
   192   $ hg status --config commands.status.verbose=True
   194   $ hg status --config commands.status.verbose=True
   193   M shelve_file1
   195   M shelve_file1
   194   M shelve_file2
   196   M shelve_file2
   195   ? shelve_file1.orig
   197   ? shelve_file1.orig
   196   ? shelve_file2.orig
   198   ? shelve_file2.orig
   197   # The repository is in an unfinished *update* state.
   199   # The repository is in an unfinished *unshelve* state.
   198   
   200   
   199   # Unresolved merge conflicts:
   201   # Unresolved merge conflicts:
   200   # 
   202   # 
   201   #     shelve_file1
   203   #     shelve_file1
   202   #     shelve_file2
   204   #     shelve_file2
   203   # 
   205   # 
   204   # To mark files as resolved:  hg resolve --mark FILE
   206   # To mark files as resolved:  hg resolve --mark FILE
   205   
   207   
   206   # To continue:    hg update .
   208   # To continue:    hg unshelve --continue
       
   209   # To abort:       hg unshelve --abort
   207   
   210   
   208 FIXME: This should not be referencing a stripped commit.
       
   209   $ hg resolve --tool false --all --re-merge
   211   $ hg resolve --tool false --all --re-merge
   210   abort: unknown revision '4a1d727ea5bb6aed9adfacb2a8f776bae44301d6'
   212   merging shelve_file1
   211   [255]
   213   merging shelve_file2
   212 Ensure the shelve is still around, since we haven't finished the operation yet.
   214   merging shelve_file1 failed!
       
   215   merge halted after failed merge (see hg resolve)
       
   216   [240]
   213   $ hg shelve --list
   217   $ hg shelve --list
   214   default         (* ago)    changes to: foo (glob)
   218   default         (* ago)    changes to: foo (glob)
   215 FIXME: `hg unshelve --abort` should work.
       
   216   $ hg unshelve --abort
   219   $ hg unshelve --abort
   217   abort: no unshelve in progress
   220   unshelve of 'default' aborted
   218   [20]