tests/test-obsolete.t
changeset 45156 c26335fa4225
parent 45155 a381618210d0
child 45214 6063c1857d0a
equal deleted inserted replaced
45155:a381618210d0 45156:c26335fa4225
   249   adding file changes
   249   adding file changes
   250   added 1 changesets with 1 changes to 1 files (+1 heads)
   250   added 1 changesets with 1 changes to 1 files (+1 heads)
   251   $ hg push ../tmpa
   251   $ hg push ../tmpa
   252   pushing to ../tmpa
   252   pushing to ../tmpa
   253   searching for changes
   253   searching for changes
   254   abort: push includes phase-divergent changeset: 5601fb93a350!
   254   abort: push includes unstable changesets:
       
   255     5601fb93a350 (phase-divergent)
   255   [255]
   256   [255]
   256 
   257 
   257 Fixing "bumped" situation
   258 Fixing "bumped" situation
   258 We need to create a clone of 5 and add a special marker with a flag
   259 We need to create a clone of 5 and add a special marker with a flag
   259 
   260 
   614 refuse to push obsolete changeset
   615 refuse to push obsolete changeset
   615 
   616 
   616   $ hg push ../tmpc/ -r 'desc("original_d")'
   617   $ hg push ../tmpc/ -r 'desc("original_d")'
   617   pushing to ../tmpc/
   618   pushing to ../tmpc/
   618   searching for changes
   619   searching for changes
   619   abort: push includes obsolete changeset: 94b33453f93b!
   620   abort: push includes obsolete changesets:
       
   621     94b33453f93b
   620   [255]
   622   [255]
   621 
   623 
   622 refuse to push unstable changeset
   624 refuse to push unstable changeset
   623 
   625 
   624   $ hg push ../tmpc/
   626   $ hg push ../tmpc/
   625   pushing to ../tmpc/
   627   pushing to ../tmpc/
   626   searching for changes
   628   searching for changes
   627   abort: push includes orphan changeset: cda648ca50f5!
   629   abort: push includes obsolete changesets:
       
   630     94b33453f93b
       
   631   push includes unstable changesets:
       
   632     cda648ca50f5 (orphan)
   628   [255]
   633   [255]
   629 
   634 
   630 with --force it will work anyway
   635 with --force it will work anyway
   631 
   636 
   632   $ hg push ../tmpc/ --force
   637   $ hg push ../tmpc/ --force
   644   $ hg push ../tmpc/
   649   $ hg push ../tmpc/
   645   pushing to ../tmpc/
   650   pushing to ../tmpc/
   646   searching for changes
   651   searching for changes
   647   no changes found
   652   no changes found
   648   [1]
   653   [1]
       
   654 
       
   655 pushing should work even if the outgoing changes contain an unrelated changeset
       
   656 (neither obsolete nor unstable) (issue6372)
       
   657 
       
   658   $ hg up 1 -q
       
   659   $ hg branch new -q
       
   660   $ mkcommit c
       
   661 
       
   662   $ hg push ../tmpc/ --new-branch
       
   663   pushing to ../tmpc/
       
   664   searching for changes
       
   665   adding changesets
       
   666   adding manifests
       
   667   adding file changes
       
   668   added 1 changesets with 1 changes to 1 files (+1 heads)
       
   669 
       
   670 make later tests work unmodified
       
   671 
       
   672   $ hg --config extensions.strip= strip tip -q
       
   673   $ hg up 5 -q
   649 
   674 
   650 Test that extinct changeset are properly detected
   675 Test that extinct changeset are properly detected
   651 
   676 
   652   $ hg log -r 'extinct()'
   677   $ hg log -r 'extinct()'
   653 
   678 
  1194   $ hg log -r 50c51b361e60 -T '{whyunstable % "{instability}: {reason} {node|shortest}\n"}'
  1219   $ hg log -r 50c51b361e60 -T '{whyunstable % "{instability}: {reason} {node|shortest}\n"}'
  1195   orphan: obsolete parent 3de5
  1220   orphan: obsolete parent 3de5
  1196   phase-divergent: immutable predecessor 245b
  1221   phase-divergent: immutable predecessor 245b
  1197   content-divergent: predecessor 245b
  1222   content-divergent: predecessor 245b
  1198 
  1223 
       
  1224   $ hg push  ../tmpf -r 50c51b361e60
       
  1225   pushing to ../tmpf
       
  1226   searching for changes
       
  1227   abort: push includes unstable changesets:
       
  1228     50c51b361e60 (orphan, phase-divergent, content-divergent)
       
  1229   [255]
       
  1230 
       
  1231 
  1199 #if serve
  1232 #if serve
  1200 
  1233 
  1201   $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
  1234   $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
  1202   $ cat hg.pid >> $DAEMON_PIDS
  1235   $ cat hg.pid >> $DAEMON_PIDS
  1203 
  1236