diff options
| -rwxr-xr-x | repo | 8 | ||||
| -rw-r--r-- | subcmds/init.py | 10 |
2 files changed, 16 insertions, 2 deletions
| @@ -23,7 +23,7 @@ REPO_REV = 'stable' | |||
| 23 | # limitations under the License. | 23 | # limitations under the License. |
| 24 | 24 | ||
| 25 | # increment this whenever we make important changes to this script | 25 | # increment this whenever we make important changes to this script |
| 26 | VERSION = (1, 23) | 26 | VERSION = (1, 24) |
| 27 | 27 | ||
| 28 | # increment this if the MAINTAINER_KEYS block is modified | 28 | # increment this if the MAINTAINER_KEYS block is modified |
| 29 | KEYRING_VERSION = (1, 2) | 29 | KEYRING_VERSION = (1, 2) |
| @@ -175,6 +175,9 @@ group.add_option('-b', '--manifest-branch', | |||
| 175 | group.add_option('-m', '--manifest-name', | 175 | group.add_option('-m', '--manifest-name', |
| 176 | dest='manifest_name', | 176 | dest='manifest_name', |
| 177 | help='initial manifest file', metavar='NAME.xml') | 177 | help='initial manifest file', metavar='NAME.xml') |
| 178 | group.add_option('-c', '--current-branch', | ||
| 179 | dest='current_branch_only', action='store_true', | ||
| 180 | help='fetch only current manifest branch from server') | ||
| 178 | group.add_option('--mirror', | 181 | group.add_option('--mirror', |
| 179 | dest='mirror', action='store_true', | 182 | dest='mirror', action='store_true', |
| 180 | help='create a replica of the remote repositories ' | 183 | help='create a replica of the remote repositories ' |
| @@ -202,6 +205,9 @@ group.add_option('-p', '--platform', | |||
| 202 | group.add_option('--no-clone-bundle', | 205 | group.add_option('--no-clone-bundle', |
| 203 | dest='no_clone_bundle', action='store_true', | 206 | dest='no_clone_bundle', action='store_true', |
| 204 | help='disable use of /clone.bundle on HTTP/HTTPS') | 207 | help='disable use of /clone.bundle on HTTP/HTTPS') |
| 208 | group.add_option('--no-tags', | ||
| 209 | dest='no_tags', action='store_true', | ||
| 210 | help="don't fetch tags in the manifest") | ||
| 205 | 211 | ||
| 206 | 212 | ||
| 207 | # Tool | 213 | # Tool |
diff --git a/subcmds/init.py b/subcmds/init.py index 45d69b79..bb7187d7 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -91,6 +91,9 @@ to update the working directory files. | |||
| 91 | g.add_option('-b', '--manifest-branch', | 91 | g.add_option('-b', '--manifest-branch', |
| 92 | dest='manifest_branch', | 92 | dest='manifest_branch', |
| 93 | help='manifest branch or revision', metavar='REVISION') | 93 | help='manifest branch or revision', metavar='REVISION') |
| 94 | g.add_option('-c', '--current-branch', | ||
| 95 | dest='current_branch_only', action='store_true', | ||
| 96 | help='fetch only current manifest branch from server') | ||
| 94 | g.add_option('-m', '--manifest-name', | 97 | g.add_option('-m', '--manifest-name', |
| 95 | dest='manifest_name', default='default.xml', | 98 | dest='manifest_name', default='default.xml', |
| 96 | help='initial manifest file', metavar='NAME.xml') | 99 | help='initial manifest file', metavar='NAME.xml') |
| @@ -121,6 +124,9 @@ to update the working directory files. | |||
| 121 | g.add_option('--no-clone-bundle', | 124 | g.add_option('--no-clone-bundle', |
| 122 | dest='no_clone_bundle', action='store_true', | 125 | dest='no_clone_bundle', action='store_true', |
| 123 | help='disable use of /clone.bundle on HTTP/HTTPS') | 126 | help='disable use of /clone.bundle on HTTP/HTTPS') |
| 127 | g.add_option('--no-tags', | ||
| 128 | dest='no_tags', action='store_true', | ||
| 129 | help="don't fetch tags in the manifest") | ||
| 124 | 130 | ||
| 125 | # Tool | 131 | # Tool |
| 126 | g = p.add_option_group('repo Version options') | 132 | g = p.add_option_group('repo Version options') |
| @@ -231,7 +237,9 @@ to update the working directory files. | |||
| 231 | sys.exit(1) | 237 | sys.exit(1) |
| 232 | 238 | ||
| 233 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, | 239 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, |
| 234 | clone_bundle=not opt.no_clone_bundle): | 240 | clone_bundle=not opt.no_clone_bundle, |
| 241 | current_branch_only=opt.current_branch_only, | ||
| 242 | no_tags=opt.no_tags): | ||
| 235 | r = m.GetRemote(m.remote.name) | 243 | r = m.GetRemote(m.remote.name) |
| 236 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) | 244 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) |
| 237 | 245 | ||
