Opened 17 years ago
Closed 16 years ago
#5630 closed defect (duplicate)
trac-admin --help falsely advertises extra initenv parameter
Reported by: | Owned by: | Eli Carter | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | devel |
Severity: | minor | Keywords: | documentation |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
-
console.py
447 447 ## Initenv 448 448 _help_initenv = [('initenv', 449 449 'Create and initialize a new environment interactively'), 450 ('initenv <projectname> <db> <repostype> <repospath> <templatepath>',450 ('initenv <projectname> <db> <repostype> <repospath>', 451 451 'Create and initialize a new environment from arguments')] 452 452 453 453 def do_initdb(self, line):
Fixes it.
While you're in there, it would be good to document these parameters more completely in the —help; you can't get it right without running it interactively to find out, e.g. what a legal database descriptor looks like. And even then, you won't really know your available options.
Attachments (0)
Change History (18)
comment:1 by , 17 years ago
follow-up: 3 comment:2 by , 17 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
Severity: | normal → minor |
Wasn't that fixed in r5790?
follow-up: 4 comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-ups: 5 6 comment:4 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to ecarter:
I'm going to close this ticket since the main issue is addressed. Improving the help text should be a separate issue.
What main issue? The whole point of my report was the help text! Are you asking me to enter another ticket with some rephrasing of the content? How could I possibly make the point of my report clearer?
comment:5 by , 17 years ago
Replying to Dave Abrahams <dave@boost-consulting.com>:
Replying to ecarter:
I'm going to close this ticket since the main issue is addressed. Improving the help text should be a separate issue.
What main issue? The whole point of my report was the help text! Are you asking me to enter another ticket with some rephrasing of the content? How could I possibly make the point of my report clearer?
No, you're right. I should not have closed the ticket, and I apologize.
follow-up: 7 comment:6 by , 17 years ago
Keywords: | documentation added |
---|
To the specifics of this request:
While you're in there, it would be good to document these parameters more completely in the —help; you can't get it right without running it interactively to find out, e.g. what a legal database descriptor looks like. And even then, you won't really know your available options.
In general, I'd say that the command line is not the place for detailed documentation. For complex topics (like the format of a database descriptor), it should simply point to the appropriate wiki page describing it (TracEnvironment in this case).
Now of course here we have a special case, as this is the command for creating the Trac instance, so we can't tell the user to look for detailed documentation in Trac ;-)
I see several options:
- point to the raw trac/wiki/default-page/TracEnvironment file which is mostly readable as plain text if we reformat it a bit (perhaps not easily doable - egg installations and such)
- point to the INSTALL file where this information is duplicated (probably same issue as above for the location of the file)
- point to t.e.o. http://trac.edgewall.org/wiki/0.11/TracEnvironment - but what about people installing Trac and not connected to the net? (well, if you want my opinion, they're in trouble anyway)
- add an installation guide (e.g. the TracGuide converted to PDF), as this was requested a few times already. But remark 1. applies here as well.
Thoughts?
comment:7 by , 17 years ago
Replying to cboos:
In general, I'd say that the command line is not the place for detailed documentation. For complex topics (like the format of a database descriptor), it should simply point to the appropriate wiki page describing it (TracEnvironment in this case).
When running interactively, there's a default listed. I think we should support those defaults on the commandline, and we should list those defaults in the help. That should address a large chunk of the issue.
Now of course here we have a special case, as this is the command for creating the Trac instance, so we can't tell the user to look for detailed documentation in Trac ;-)
I see several options:
- point to the raw trac/wiki/default-page/TracEnvironment file which is mostly readable as plain text if we reformat it a bit (perhaps not easily doable - egg installations and such)
- point to the INSTALL file where this information is duplicated (probably same issue as above for the location of the file)
- point to t.e.o. http://trac.edgewall.org/wiki/0.11/TracEnvironment - but what about people installing Trac and not connected to the net? (well, if you want my opinion, they're in trouble anyway)
- add an installation guide (e.g. the TracGuide converted to PDF), as this was requested a few times already. But remark 1. applies here as well.
Thoughts?
Other possibilities:
- add a man page for 'trac' (intro), 'trac-admin', and 'tracd' (though I don't know how that works with an egg.)
- add an option to trac-admin to output detailed info to a file? (pdf, html, or…)
I think that providing an html rendering of TracEnvironment would be preferable to the raw form.
As for egg installs; if we marked the egg as 'not zip safe' (IIRC) won't the files then be accessible after an install? At that point, we should be able to reference a supplied documentation file. I'm not sure what the tradeoffs would be for that.
follow-ups: 9 10 comment:8 by , 17 years ago
Hmmm…. I'm starting to think that the initenv command's help needs to provide a bit more functionality. I think that having trac-admin help give a very brief overview is nice, but trac-admin help <command>
should give more information.
So, the output of trac-admin help
should change to drop the blank lines and the lines starting with '—'. Then, trac-admin help permission
would give the full help text for all the permission sub-commands. Then, trac-admin help initenv
could be changed to list the supported version control types, with a help text for those, and the same for the supported database types.
We're going to be making a lot of first-impressions with trac-admin
, so I think that for this tool, the commandline is the place for detailed documentation.
Thoughts?
comment:9 by , 17 years ago
follow-up: 11 comment:10 by , 17 years ago
comment:11 by , 17 years ago
The correct non-interactive command line (as of today, anyway):
trac-admin <PATH TO NEW TRAC ENV> initenv <NAME> sqlite:db/trac.db svn <PATH TO SVN REPOSITORY>
This assumes, of course, that you want to use the initenv defaults (sqlite and svn) — if not, hunt through the docs and substitute your changes.
(I was anonymous/comment 10, FWIW)
comment:12 by , 17 years ago
wouldn't the small fix proposed by dave be sufficient for 0.11, maybe extended with "run it interactively for the first time" at the bottom of the help text?
comment:13 by , 17 years ago
Milestone: | 0.11 → 0.11.1 |
---|
nobody with appropriate rights seems to apply it, its not a bug, so it seems to block 0.11 unecessarily …
follow-up: 16 comment:15 by , 17 years ago
you have commit right, could you please apply the original fix then?
comment:16 by , 17 years ago
Replying to ThurnerRupert: Original fix is already applied in r5790 I suggest closing this bug report about "false advertisement" and opening a new one about "Need detailed help information about commands in trac-admin". It becomes harder to to figure out what the talk is about.
follow-up: 18 comment:17 by , 17 years ago
Milestone: | 0.11 → 0.12 |
---|
As eli said in comment:3, the false advertising part was fixed.
We can keep that ticket for the topic of improving the interactive help for the command line tool, but that's a 0.12 topic.
comment:18 by , 16 years ago
Milestone: | 0.13 |
---|---|
Resolution: | → duplicate |
Status: | reopened → closed |
Verified - I found that today as well when upgrading some of my code from 0.10 to 0.11.
It is there for 0.10, but the argument and supporting code has been removed from the 0.11
do_initenv()
method intrac.admin.console
.