+ # the 'adopt' mode is really special and doesn't share any option
+ if mode == 'adopt':
+ parser.add_option("-m","--module",action="append",dest="modules",default=[],
+ help="modules, can be used several times or with quotes")
+ parser.add_option("-t","--tag",action="store", dest="tag", default='master',
+ help="specify the tag to adopt, default is 'master'")
+ parser.add_option("-v","--verbose", action="store_true", dest="verbose", default=False,
+ help="run in verbose mode")
+ (options, args) = parser.parse_args()
+ options.workdir='unused'
+ options.dry_run=False
+ options.mode='adopt'
+ if len(args)==0 or len(options.modules)==0:
+ parser.print_help()
+ sys.exit(1)
+ adopt_tag (options,args)
+ return
+
+ # the other commands (module-* and release-changelog) share the same skeleton
+ if mode in [ 'tag', 'branch'] :