Skip to content

Commit feff58a

Browse files
committed
Merge pull request #112 from screamerbg/pylint-and-cleanup
Pylint, code cleanup and fixes
2 parents be068d4 + c0c9cac commit feff58a

File tree

3 files changed

+238
-153
lines changed

3 files changed

+238
-153
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ This document covers the installation and usage of *mbed CLI*.
66

77
## Table of Contents
88
1. [Requirements](#requirements)
9-
1. [Installing mbed-cli](#installing-mbed-cli)
9+
1. [Installing and uninstalling](#installing-mbed-cli)
10+
1. [Working context and command help](#working-context-and-command-help)
1011
1. [Creating and importing programs](#creating-and-importing-programs)
1112
1. [Importing an existing program](#importing-and-creating-programs)
1213
2. [Creating a new program](#creating-a-new-program)
@@ -62,6 +63,19 @@ To uninstall *mbed-cli* you can use:
6263

6364
## Using mbed-cli
6465

66+
### Working context and command help
67+
68+
All *mbed CLI* commands use the current directory as a working context, meaning that before calling any *mbed* command, you should first change your working directory to the one you want to operate in. For example:
69+
```
70+
$ cd my-program
71+
$ cd mbed-os
72+
$ mbed update master # updates "mbed-os", not "my-program"
73+
```
74+
75+
Also note that *mbed CLI* requires that a program, the root of the code tree, is under version control - either Git or Mercurial. This makes it possible to seamlessly switch between revisions of the whole program and its libraries, control the program history, synchronize the program with remote repositories, share it with others, etc. Version control is also the primary and preferred delivery mechanism for mbed OS source code, which allows everyone to contribute to mbed OS at any time!
76+
77+
*mbed CLI* provides list of all available commnads and global help via `mbed --help`, and also command-specific help via `--help` param to the command, e.g. `mbed update --help`.
78+
6579
### Creating and importing programs
6680

6781
mbed CLI allows creating new programs and importing existing ones, always with the full mbed-os release as the program's basis.
@@ -110,7 +124,7 @@ $ mbed import https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheu
110124
$ cd mbed-Client-Morpheus-from-source
111125
```
112126

113-
<span class="notes">**Note**:Asome of the repositories that *mbed-cli* will clone might require special access (Mercurial will ask you for your credentials if that's the case). If you don't have access, e-mail [[email protected]](mailto:[email protected]) or [[email protected]](mailto:[email protected]) with your developer.mbed.org account name.</span>
127+
<span class="notes">**Note**: Some of the repositories that *mbed-cli* will clone might require special access (Mercurial will ask you for your credentials if that's the case). If you don't have access, e-mail [[email protected]](mailto:[email protected]) or [[email protected]](mailto:[email protected]) with your developer.mbed.org account name.</span>
114128

115129
### Adding and removing libraries
116130

@@ -187,6 +201,8 @@ You can apply the same mechanism for libraries and their dependencies by executi
187201

188202
#### Update options
189203

204+
<span style="background-color:#E6E6E6;border:1px solid #000;display:block; height:100%; padding:10px">**Note**: As with any *mbed CLI* command, `mbed update` uses the current directory as a working context, meaning that before calling `mbed update` you should first change your working directory to the one you want to update, e.g. `cd mbed-os`.</span>
205+
190206
To help understand what options you can use with *mbed-cli*, please see the examples below.
191207

192208
**Case 1: I want to update a program or a library to the latest version in a specific or current branch**
@@ -199,6 +215,8 @@ __I want a clean update (and discard uncommitted changes)__
199215

200216
Run `mbed update [branch] --clean`
201217

218+
It's important to remember that specifying a branch to `mbed update` would only checkout that branch and won't automatically merge/fast-forward to the remote/upstream branch. You can run `mbed update` to merge (fast-forward) your local branch with the latest remote branch. On git you can do `git pull`.
219+
202220
**Case 2: I want to update a program or a library to a specific revision or a tag**
203221

204222
__I want to preserve my uncommitted changes__
@@ -211,7 +229,7 @@ Run `mbed update <#rev|tag_name> --clean`
211229

212230
The `--clean` option tells *mbed-cli* to update that program or library and its dependencies, and discard all local changes.
213231

214-
__When you have unpublished local libraries
232+
__When you have unpublished local libraries__
215233

216234
There are two additional options that define how unpublished local libraries are handled:
217235

0 commit comments

Comments
 (0)