From b25b69b8d0461a795706e3ec3387f0547d4c7b3a Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 16 Jun 2011 17:41:05 +0000 Subject: [PATCH] Add --depth option to repo. See related repo change: https://review.source.android.com/#change,22722 Review URL: http://codereview.chromium.org/7111045 Patch from Doug Anderson . git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@89361 0039d316-1c4b-4281-b951-d872f2087c98 --- repo | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/repo b/repo index 773ad8258..32f0df0b1 100755 --- a/repo +++ b/repo @@ -28,7 +28,7 @@ if __name__ == '__main__': del magic # increment this whenever we make important changes to this script -VERSION = (1, 10) +VERSION = (1, 11) # increment this if the MAINTAINER_KEYS block is modified KEYRING_VERSION = (1,0) @@ -109,23 +109,22 @@ group = init_optparse.add_option_group('Manifest options') group.add_option('-u', '--manifest-url', dest='manifest_url', help='manifest repository location', metavar='URL') -group.add_option('-o', '--origin', - dest='manifest_origin', - help="use REMOTE instead of 'origin' to track upstream", - metavar='REMOTE') group.add_option('-b', '--manifest-branch', dest='manifest_branch', help='manifest branch or revision', metavar='REVISION') group.add_option('-m', '--manifest-name', dest='manifest_name', - help='initial manifest file (deprecated)', - metavar='NAME.xml') + help='initial manifest file', metavar='NAME.xml') group.add_option('--mirror', dest='mirror', action='store_true', help='mirror the forrest') group.add_option('--reference', dest='reference', help='location of mirror directory', metavar='DIR') +group.add_option('--depth', type='int', default=None, + dest='depth', + help='create a shallow clone with given depth; see git clone') + # Tool group = init_optparse.add_option_group('repo Version options') @@ -601,4 +600,3 @@ def main(orig_args): if __name__ == '__main__': main(sys.argv[1:]) -