Re: svn commit: rev 1329 - trunk/subversion/svnadmin trunk/subversion/tests/clients/cmdline
From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-02-20 08:33:01 CET
cmpilato@collab.net wrote:
I don't like going down this road though, as its not clean and may lead to
Here's a small hack for this. It's not a full blown command line parser,
Best,
-- Blair Zajac <blair@orcaware.com> Web and OS performance plots - http://www.orcaware.com/orca/ Index: ./subversion/svnadmin/main.c =================================================================== --- ./subversion/svnadmin/main.c +++ ./subversion/svnadmin/main.c Tue Feb 19 23:19:40 2002 @@ -137,8 +137,8 @@ " If just LOWER_REV is given, that revision tree is printed.\n" " If two revisions are given, that range is printed, inclusive.\n" "\n" - " lstxns REPOS_PATH [long]\n" - " Print all txn names and, if \"long\" is specified, their\n" + " lstxns [--long] REPOS_PATH\n" + " Print all txn names and, if \"--long\" is specified, their\n" " metadata and trees.\n" "\n" #if 0 @@ -303,15 +303,25 @@ char *txn_name; svn_boolean_t show_extra = FALSE; - if (argc >= 4) + /* Check for the --long command line option. */ + if (strcmp(argv[2], "--long") == 0) { - if (strcmp (argv[3], "long")) + if (argc != 4) { usage (argv[0], 1); return EXIT_FAILURE; } + + /* If --long is being used, path currently points to it, + so move path to the next string for the repository. */ + path = argv[3]; show_extra = TRUE; } + else if (argc != 3) + { + usage (argv[0], 1); + return EXIT_FAILURE; + } INT_ERR (svn_repos_open (&repos, path, pool)); fs = svn_repos_fs (repos); Index: ./subversion/tests/clients/cmdline/svnadmin_tests.py =================================================================== --- ./subversion/tests/clients/cmdline/svnadmin_tests.py +++ ./subversion/tests/clients/cmdline/svnadmin_tests.py Tue Feb 19 23:29:20 2002 @@ -78,8 +78,8 @@ rm = re.compile("^Revision\s+(.+)") else: output_lines, errput_lines = svntest.main.run_svnadmin("lstxns", - repo_dir, - "long") + "--long", + repo_dir) rm = re.compile("^Txn\s+(.+):") for line in output_lines: --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Sat Oct 21 14:37:09 2006 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.