tests/test-fix.t
branchstable
changeset 47886 86a60679cf61
parent 47767 66ad7e32011f
child 48177 066cdec8f74f
equal deleted inserted replaced
47885:3962503cd1e8 47886:86a60679cf61
   869   b
   869   b
   870   CC
   870   CC
   871 
   871 
   872   $ cd ..
   872   $ cd ..
   873 
   873 
       
   874 We should be allowed to fix the working (and only the working copy) while
       
   875 merging.
       
   876 
       
   877   $ hg init fixworkingcopywhilemerging
       
   878   $ cd fixworkingcopywhilemerging
       
   879 
       
   880   $ printf "a\nb\nc\n" > file.changed
       
   881   $ hg commit -Aqm "ancestor"
       
   882 
       
   883   $ printf "aa\nb\nc\n" > file.changed
       
   884   $ hg commit -m "change a"
       
   885 
       
   886   $ hg checkout '.^'
       
   887   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   888   $ printf "a\nb\ncc\n" > file.changed
       
   889   $ hg commit -m "change c"
       
   890   created new head
       
   891 
       
   892   $ hg merge
       
   893   merging file.changed
       
   894   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
       
   895   (branch merge, don't forget to commit)
       
   896   $ cat file.changed
       
   897   aa
       
   898   b
       
   899   cc
       
   900 Not allowed to fix a parent of the working copy while merging
       
   901   $ hg fix -r . --working-dir
       
   902   abort: outstanding uncommitted merge
       
   903   (use 'hg commit' or 'hg merge --abort')
       
   904   [20]
       
   905   $ hg fix --working-dir
       
   906   $ cat file.changed
       
   907   AA
       
   908   b
       
   909   CC
       
   910 
       
   911   $ cd ..
       
   912 
   874 Abort fixing revisions if there is an unfinished operation. We don't want to
   913 Abort fixing revisions if there is an unfinished operation. We don't want to
   875 make things worse by editing files or stripping/obsoleting things. Also abort
   914 make things worse by editing files or stripping/obsoleting things. Also abort
   876 fixing the working directory if there are unresolved merge conflicts.
   915 fixing the working directory if there are unresolved merge conflicts.
   877 
   916 
   878   $ hg init abortunresolved
   917   $ hg init abortunresolved