Skip to content

Update verbose level and catch merge errors during branch update #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ To list all *mbed CLI* commands use `mbed --help`. A detailed command-specific h

### Creating and importing programs

*mbed CLI* can create and import both mbed Classic and mbed OS based programs.
*mbed CLI* can create and import both mbed 2.0 and mbed OS 4.0 based programs.

#### Creating a new program

Expand Down
21 changes: 12 additions & 9 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


# Application version
ver = '0.7.2'
ver = '0.7.3'

# Default paths to Mercurial and Git
hg_cmd = 'hg'
Expand Down Expand Up @@ -605,7 +605,10 @@ def update(rev=None, clean=False, is_local=False):
remote = Git.getremote()
branch = Git.getbranch()
if remote and branch:
Git.merge('%s/%s' % (remote, branch))
try:
Git.merge('%s/%s' % (remote, branch))
except ProcessException:
pass
else:
err = "Unable to update \"%s\" in \"%s\".\n" % (os.path.basename(os.getcwd()), os.getcwd())
if not remote:
Expand Down Expand Up @@ -1898,7 +1901,7 @@ def compile(toolchain=None, mcu=None, source=False, build=False, compile_library
popen(['python', os.path.join(tools_dir, 'get_config.py')]
+ ['-t', tchain, '-m', target]
+ list(chain.from_iterable(izip(repeat('--source'), source)))
+ (['-v'] if very_verbose else [])
+ (['-v'] if verbose else [])
+ (list(chain.from_iterable(izip(repeat('--prefix'), config_prefix))) if config_prefix else []),
env=env)
elif compile_library:
Expand All @@ -1912,7 +1915,7 @@ def compile(toolchain=None, mcu=None, source=False, build=False, compile_library
+ (['-c'] if clean else [])
+ list(chain.from_iterable(izip(repeat('--source'), source)))
+ ['--build', build]
+ (['-v'] if very_verbose else [])
+ (['-v'] if verbose else [])
+ args,
env=env)
else:
Expand All @@ -1926,7 +1929,7 @@ def compile(toolchain=None, mcu=None, source=False, build=False, compile_library
+ (['-c'] if clean else [])
+ list(chain.from_iterable(izip(repeat('--source'), source)))
+ ['--build', build]
+ (['-v'] if very_verbose else [])
+ (['-v'] if verbose else [])
+ args,
env=env)

Expand Down Expand Up @@ -1979,7 +1982,7 @@ def test_(toolchain=None, mcu=None, compile_list=False, run_list=False, compile_
if compile_list:
popen(['python', '-u', os.path.join(tools_dir, 'test.py'), '--list']
+ (['-n', tests_by_name] if tests_by_name else [])
+ (['-v'] if very_verbose else [])
+ (['-v'] if verbose else [])
+ args,
env=env)

Expand All @@ -1992,21 +1995,21 @@ def test_(toolchain=None, mcu=None, compile_list=False, run_list=False, compile_
+ ['--build', build]
+ ['--test-spec', test_spec]
+ (['-n', tests_by_name] if tests_by_name else [])
+ (['-v'] if very_verbose else [])
+ (['-v'] if verbose else [])
+ args,
env=env)

if run_list:
popen(['mbedgt', '--test-spec', test_spec, '--list']
+ (['-n', tests_by_name] if tests_by_name else [])
+ (['-V'] if very_verbose else [])
+ (['-V'] if verbose else [])
+ args,
env=env)

if run_only or build_and_run_tests:
popen(['mbedgt', '--test-spec', test_spec]
+ (['-n', tests_by_name] if tests_by_name else [])
+ (['-V'] if very_verbose else [])
+ (['-V'] if verbose else [])
+ args,
env=env)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def read(fname):
setup(
name="mbed-cli",
packages=["mbed"],
version="0.7.2",
version="0.7.3",
url='http://github.com/ARMmbed/mbed-cli',
author='ARM mbed',
author_email='[email protected]',
Expand Down