tests/test-commandserver.py
branchstable
changeset 18757 1c8e0d6ac3b0
parent 16687 e34106fa0dc3
child 19132 605deb776abf
child 19166 e958b17696fe
equal deleted inserted replaced
18756:76d49dab6a00 18757:1c8e0d6ac3b0
   234     f = open('.hgignore', 'ab')
   234     f = open('.hgignore', 'ab')
   235     f.write('ignored-file')
   235     f.write('ignored-file')
   236     f.close()
   236     f.close()
   237     runcommand(server, ['status', '-i', '-u'])
   237     runcommand(server, ['status', '-i', '-u'])
   238 
   238 
       
   239 def phasecacheafterstrip(server):
       
   240     readchannel(server)
       
   241 
       
   242     # create new head, 5:731265503d86
       
   243     runcommand(server, ['update', '-C', '0'])
       
   244     f = open('a', 'ab')
       
   245     f.write('a\n')
       
   246     f.close()
       
   247     runcommand(server, ['commit', '-Am.', 'a'])
       
   248     runcommand(server, ['log', '-Gq'])
       
   249 
       
   250     # make it public; draft marker moves to 4:7966c8e3734d
       
   251     runcommand(server, ['phase', '-p', '.'])
       
   252     runcommand(server, ['phase', '.'])  # load _phasecache.phaseroots
       
   253 
       
   254     # strip 1::4 outside server
       
   255     os.system('hg --config extensions.mq= strip 1')
       
   256 
       
   257     # shouldn't raise "7966c8e3734d: no node!"
       
   258     runcommand(server, ['branches'])
       
   259 
   239 if __name__ == '__main__':
   260 if __name__ == '__main__':
   240     os.system('hg init')
   261     os.system('hg init')
   241 
   262 
   242     check(hellomessage)
   263     check(hellomessage)
   243     check(unknowncommand)
   264     check(unknowncommand)
   256     check(tagscache)
   277     check(tagscache)
   257     check(setphase)
   278     check(setphase)
   258     check(rollback)
   279     check(rollback)
   259     check(branch)
   280     check(branch)
   260     check(hgignore)
   281     check(hgignore)
       
   282     check(phasecacheafterstrip)