def main(): # Defined as entry point. Must be callable without arguments. usage = "usage: %prog [-p SVN_PEG] [--help]" parser = OptionParser(usage) parser.add_option("-r", type="int", dest="svn_rev", help="limit pull up to specified revision") parser.add_option("-p", "--svn-peg", type="int", dest="svn_peg", help="SVN peg revision to locate checkout URL") parser.add_option("-n", "--dry-run", dest="dryrun", default=False, action="store_true", help="show incoming changesets without pulling them") parser.add_option( "--branch", type="string", dest="svn_branch", help= "override branch name (defaults to last path component of <SVN URL>)") parser.add_option("--svn-retry", dest="svnretry", default=False, action="store_true", help="retry SVN update command on failure") (options, args) = run_parser(parser, __doc__) if args: display_parser_error(parser, "incorrect number of arguments") return locked_main(real_main, options, args)
def main(): # Defined as entry point. Must be callable without arguments. usage = "usage: %prog [-cf]" parser = OptionParser(usage) parser.add_option("-f", "--force", default=False, action="store_true", dest="force", help="push even if no hg tag found for current SVN rev.") parser.add_option("-c", "--collapse", default=False, action="store_true", dest="collapse", help="collapse all hg changesets in a single SVN commit") parser.add_option("-n", "--dry-run", default=False, action="store_true", dest="dryrun", help="show outgoing changes to SVN without pushing them") parser.add_option("-e", "--edit", default=False, action="store_true", dest="edit", help="edit commit message using external editor") parser.add_option("-u", "--username", default=None, action="store", type="string", dest="username", help="specify a username ARG as same as svn --username") parser.add_option("-p", "--password", default=None, action="store", type="string", dest="password", help="specify a password ARG as same as svn --password") parser.add_option("--no-auth-cache", default=False, action="store_true", dest="cache", help="Prevents caching of authentication information") parser.add_option("--keep-author", default=False, action="store_true", dest="keep_author", help="keep the author when committing to SVN") (options, args) = run_parser(parser, __doc__) if args: display_parser_error(parser, "incorrect number of arguments") return locked_main(real_main, options, args)
def main(): # Defined as entry point. Must be callable without arguments. usage = "usage: %prog [-p SVN_PEG] [--help]" parser = OptionParser(usage) parser.add_option("-r", type="int", dest="svn_rev", help="limit pull up to specified revision") parser.add_option("-p", "--svn-peg", type="int", dest="svn_peg", help="SVN peg revision to locate checkout URL") parser.add_option("-n", "--dry-run", dest="dryrun", default=False, action="store_true", help="show incoming changesets without pulling them") parser.add_option("--branch", type="string", dest="svn_branch", help="override branch name (defaults to last path component of <SVN URL>)") parser.add_option("--svn-retry", dest="svnretry", default=False, action="store_true", help="retry SVN update command on failure") (options, args) = run_parser(parser, __doc__) if args: display_parser_error(parser, "incorrect number of arguments") return locked_main(real_main, options, args)