comparison tests/test-commandserver.py @ 20330:69a0d22b9677 stable

dispatch: take --hidden from individual commands into account The command server would otherwise ignore that option, since the repo object is only created once.
author Julien Cristau <julien.cristau@logilab.fr>
date Mon, 27 Jan 2014 10:57:20 +0100
parents c57e99386d88
children a8e6ab7eb361
comparison
equal deleted inserted replaced
20329:45f23b1ff345 20330:69a0d22b9677
260 os.system('hg -q --config extensions.mq= strip 1') 260 os.system('hg -q --config extensions.mq= strip 1')
261 261
262 # shouldn't raise "7966c8e3734d: no node!" 262 # shouldn't raise "7966c8e3734d: no node!"
263 runcommand(server, ['branches']) 263 runcommand(server, ['branches'])
264 264
265 def obsolete(server):
266 readchannel(server)
267
268 runcommand(server, ['up', 'null'])
269 runcommand(server, ['phase', '-df', 'tip'])
270 os.system('hg debugobsolete `hg log -r tip --template {node}`')
271 runcommand(server, ['log', '--hidden'])
272 runcommand(server, ['log'])
273
265 if __name__ == '__main__': 274 if __name__ == '__main__':
266 os.system('hg init') 275 os.system('hg init')
267 276
268 check(hellomessage) 277 check(hellomessage)
269 check(unknowncommand) 278 check(unknowncommand)
283 check(setphase) 292 check(setphase)
284 check(rollback) 293 check(rollback)
285 check(branch) 294 check(branch)
286 check(hgignore) 295 check(hgignore)
287 check(phasecacheafterstrip) 296 check(phasecacheafterstrip)
297 obs = open('obs.py', 'w')
298 obs.write('import mercurial.obsolete\nmercurial.obsolete._enabled = True\n')
299 obs.close()
300 hgrc = open('.hg/hgrc', 'a')
301 hgrc.write('[extensions]\nobs=obs.py\n')
302 hgrc.close()
303 check(obsolete)