Last change
on this file 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
|
Line | |
---|
1 | # -*- coding: utf-8 -*- |
---|
2 | |
---|
3 | """Recipe commands for Mercurial.""" |
---|
4 | |
---|
5 | import logging |
---|
6 | |
---|
7 | log = logging.getLogger('bitten.build.hgtools') |
---|
8 | |
---|
9 | __docformat__ = 'restructuredtext en' |
---|
10 | |
---|
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 | """ |
---|
19 | args = ['pull', '-u'] |
---|
20 | if revision: |
---|
21 | args += ['-r', revision.split(':')[-1]] |
---|
22 | |
---|
23 | from bitten.build import shtools |
---|
24 | returncode = shtools.execute(ctxt, file_='hg', args=args, dir_=dir_) |
---|
25 | if returncode != 0: |
---|
26 | ctxt.error('hg pull -u failed (%s)' % returncode) |
---|
27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.