Last change
on this file since 1001 was
964,
checked in by osimons, 13 years ago
|
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.
|
-
Property svn:eol-style set to
native
-
Property svn:mime-type set to
text/python-source
|
File size:
770 bytes
|
Cov | Line | |
---|
| 1 | # -*- coding: utf-8 -*- |
---|
| 2 | |
---|
1 | 3 | """Recipe commands for Mercurial.""" |
---|
| 4 | |
---|
1 | 5 | import logging |
---|
| 6 | |
---|
1 | 7 | log = logging.getLogger('bitten.build.hgtools') |
---|
| 8 | |
---|
1 | 9 | __docformat__ = 'restructuredtext en' |
---|
| 10 | |
---|
1 | 11 | def pull(ctxt, revision=None, dir_='.'): |
---|
| 12 | """pull and update the local working copy from the Mercurial repository. |
---|
| 13 | |
---|
| 14 | :param ctxt: the build context |
---|
| 15 | :type ctxt: `Context` |
---|
| 16 | :param revision: the revision to check out |
---|
| 17 | :param dir\_: the name of a local subdirectory containing the working copy |
---|
| 18 | """ |
---|
0 | 19 | args = ['pull', '-u'] |
---|
0 | 20 | if revision: |
---|
0 | 21 | args += ['-r', revision.split(':')[-1]] |
---|
| 22 | |
---|
0 | 23 | from bitten.build import shtools |
---|
0 | 24 | returncode = shtools.execute(ctxt, file_='hg', args=args, dir_=dir_) |
---|
0 | 25 | if returncode != 0: |
---|
0 | 26 | ctxt.error('hg pull -u failed (%s)' % returncode) |
---|
| 27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.