comparison bitten/build/hgtools.py @ 885:f703a0bf6548

Fix `hg:pull` compat with Trac 0.12 as that changes how Mercurial revisions numbers are used. Closes #638. Thanks to krigstask for report and patch.
author osimons
date Fri, 10 Dec 2010 09:33:37 +0000
parents 9b5630fdd35e
children
comparison
equal deleted inserted replaced
883:dfbf2f857a50 885:f703a0bf6548
16 :param revision: the revision to check out 16 :param revision: the revision to check out
17 :param dir\_: the name of a local subdirectory containing the working copy 17 :param dir\_: the name of a local subdirectory containing the working copy
18 """ 18 """
19 args = ['pull', '-u'] 19 args = ['pull', '-u']
20 if revision: 20 if revision:
21 args += ['-r', revision.split(':')[1]] 21 args += ['-r', revision.split(':')[-1]]
22 22
23 from bitten.build import shtools 23 from bitten.build import shtools
24 returncode = shtools.execute(ctxt, file_='hg', args=args, dir_=dir_) 24 returncode = shtools.execute(ctxt, file_='hg', args=args, dir_=dir_)
25 if returncode != 0: 25 if returncode != 0:
26 ctxt.error('hg pull -u failed (%s)' % returncode) 26 ctxt.error('hg pull -u failed (%s)' % returncode)
Copyright (C) 2012-2017 Edgewall Software