{"thread":{"id":"6942","subject":"[PATCH] Add a Documentation directory inspired by the git one.","startedAt":"2007-02-25T00:05:25Z","lastAt":"2007-02-25T00:05:25Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"35406","messageId":"20070225000313.22850.50329.stgit@gandelf.nowhere.earth","threadId":"6942","inReplyTo":null,"subject":"[PATCH] Add a Documentation directory inspired by the git one.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-02-25T00:05:25Z","receivedAt":"2007-02-25T00:05:25Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"\nThe html and manpages are generated from asciidoc source.  Short\ndescription strings are extracted from the python modules.\n\nOnly the stg(7) frontpage and the stg-new(1) command page are already\nwritten.  A template is provided for new command pages.\n\nThis also reworks a couple of help strings and command classification.\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n\nHere is a more complete starting point for writing StGIT\ndocumentation.  Looks like I hit an asciidoc bug (look at generated\nNAME sections), but appart from that I'm quite pleased with the\nresult.  But any constructive criticism is still happily accepted ;)\n\n Documentation/COMMAND-TEMPLATE.txt |   41 +++++++\n Documentation/Makefile             |   62 +++++++++++\n Documentation/asciidoc.conf        |   59 ++++++++++\n Documentation/build-docdep.perl    |   50 +++++++++\n Documentation/callouts.xsl         |   30 +++++\n Documentation/stg-new.txt          |  115 ++++++++++++++++++++\n Documentation/stg.txt              |  210 ++++++++++++++++++++++++++++++++++++\n stgit/commands/branch.py           |    2 \n stgit/commands/clone.py            |    2 \n stgit/commands/export.py           |    2 \n stgit/commands/id.py               |    2 \n stgit/commands/patches.py          |    2 \n stgit/main.py                      |   12 +-\n 13 files changed, 578 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/COMMAND-TEMPLATE.txt b/Documentation/COMMAND-TEMPLATE.txt\nnew file mode 100644\nindex 0000000..5d8a1a9\n--- /dev/null\n+++ b/Documentation/COMMAND-TEMPLATE.txt\n@@ -0,0 +1,41 @@\n+stg-NAME(1)\n+==========\n+XXX <xxx@xxx.xx>\n+v0.12.1, Xxxx 2007\n+\n+NAME\n+----\n+stg-NAME - stgdesc:NAME[]\n+\n+SYNOPSIS\n+--------\n+stg NAME [OPTIONS] XXX\n+\n+DESCRIPTION\n+-----------\n+\n+XXX\n+\n+OPTIONS\n+-------\n+\n+XXX\n+\n+FILES\n+-----\n+\n+\t<templates>/XXX\n+\n+ENVIRONMENT VARIABLES\n+---------------------\n+\n+\tXXX\n+\n+GIT CONFIGURATION VARIABLES\n+---------------------------\n+\n+\tstgit.XXX\n+\n+StGIT\n+-----\n+Part of the StGIT suite - see gitlink:stg[7].\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nnew file mode 100644\nindex 0000000..7f5520c\n--- /dev/null\n+++ b/Documentation/Makefile\n@@ -0,0 +1,62 @@\n+MAN1_TXT=$(wildcard stg-*.txt)\n+MAN7_TXT=stg.txt\n+\n+DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))\n+\n+DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))\n+DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))\n+\n+prefix?=$(HOME)\n+mandir?=$(prefix)/man\n+man1dir=$(mandir)/man1\n+man7dir=$(mandir)/man7\n+# DESTDIR=\n+\n+ASCIIDOC=asciidoc --unsafe\n+ASCIIDOC_EXTRA =\n+INSTALL?=install\n+\n+#\n+# Please note that there is a minor bug in asciidoc.\n+# The version after 6.0.3 _will_ include the patch found here:\n+#   http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2\n+#\n+# Until that version is released you may have to apply the patch\n+# yourself - yes, all 6 characters of it!\n+#\n+\n+all: html man\n+\n+html: $(DOC_HTML)\n+\n+$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf\n+\n+man: man1 man7\n+man1: $(DOC_MAN1)\n+man7: $(DOC_MAN7)\n+\n+install: man\n+\t$(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)\n+\t$(INSTALL) -m644 $(DOC_MAN1) $(DESTDIR)$(man1dir)\n+\t$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)\n+#\n+# Determine \"include::\" file references in asciidoc files.\n+#\n+doc.dep : $(wildcard *.txt) build-docdep.perl\n+\trm -f $@+ $@\n+\tperl ./build-docdep.perl >$@+\n+\tmv $@+ $@\n+\n+-include doc.dep\n+\n+clean:\n+\trm -f *.xml *.html *.1 *.7 doc.dep\n+\n+%.html : %.txt\n+\t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<\n+\n+%.1 %.7 : %.xml\n+\txmlto -m callouts.xsl man $<\n+\n+%.xml : %.txt\n+\t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nnew file mode 100644\nindex 0000000..3df8814\n--- /dev/null\n+++ b/Documentation/asciidoc.conf\n@@ -0,0 +1,59 @@\n+## gitlink: macro\n+#\n+# Usage: gitlink:command[manpage-section]\n+#\n+# Note, {0} is the manpage section, while {target} is the command.\n+#\n+# Show GIT link as: <command>(<section>); if section is defined, else just show\n+# the command.\n+\n+[attributes]\n+caret=^\n+startsb=&#91;\n+endsb=&#93;\n+tilde=&#126;\n+\n+ifdef::backend-docbook[]\n+[gitlink-inlinemacro]\n+{0%{target}}\n+{0#<citerefentry>}\n+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}\n+{0#</citerefentry>}\n+endif::backend-docbook[]\n+\n+ifdef::backend-docbook[]\n+# \"unbreak\" docbook-xsl v1.68 for manpages. v1.69 works with or without this.\n+[listingblock]\n+<example><title>{title}</title>\n+<literallayout>\n+|\n+</literallayout>\n+{title#}</example>\n+endif::backend-docbook[]\n+\n+ifdef::backend-xhtml11[]\n+[gitlink-inlinemacro]\n+<a href=\"{target}.html\">{target}{0?({0})}</a>\n+endif::backend-xhtml11[]\n+\n+# stglink\n+\n+ifdef::backend-docbook[]\n+[stglink-inlinemacro]\n+<citerefentry>\n+<refentrytitle>stg {target}</refentrytitle><manvolnum>1</manvolnum>\n+</citerefentry>\n+endif::backend-docbook[]\n+\n+ifdef::backend-xhtml11[]\n+[stglink-inlinemacro]\n+<a href=\"stg-{target}.html\">stg {target}(1)</a>\n+endif::backend-xhtml11[]\n+\n+# stgdesc\n+[stgdesc-inlinemacro]\n+{sys:../stg help|grep \"  {target}\" | tr -s ' '| cut -d' ' -f3-}\n+\n+[stgdesc-blockmacro]\n+stglink:{target}[]::\n+\tstgdesc:{target}[]\ndiff --git a/Documentation/build-docdep.perl b/Documentation/build-docdep.perl\nnew file mode 100755\nindex 0000000..489389c\n--- /dev/null\n+++ b/Documentation/build-docdep.perl\n@@ -0,0 +1,50 @@\n+#!/usr/bin/perl\n+\n+my %include = ();\n+my %included = ();\n+\n+for my $text (<*.txt>) {\n+    open I, '<', $text || die \"cannot read: $text\";\n+    while (<I>) {\n+\tif (/^include::/) {\n+\t    chomp;\n+\t    s/^include::\\s*//;\n+\t    s/\\[\\]//;\n+\t    $include{$text}{$_} = 1;\n+\t    $included{$_} = 1;\n+\t}\n+    }\n+    close I;\n+}\n+\n+# Do we care about chained includes???\n+my $changed = 1;\n+while ($changed) {\n+    $changed = 0;\n+    while (my ($text, $included) = each %include) {\n+\tfor my $i (keys %$included) {\n+\t    # $text has include::$i; if $i includes $j\n+\t    # $text indirectly includes $j.\n+\t    if (exists $include{$i}) {\n+\t\tfor my $j (keys %{$include{$i}}) {\n+\t\t    if (!exists $include{$text}{$j}) {\n+\t\t\t$include{$text}{$j} = 1;\n+\t\t\t$included{$j} = 1;\n+\t\t\t$changed = 1;\n+\t\t    }\n+\t\t}\n+\t    }\n+\t}\n+    }\n+}\n+\n+while (my ($text, $included) = each %include) {\n+    if (! exists $included{$text} &&\n+\t(my $base = $text) =~ s/\\.txt$//) {\n+\tmy ($suffix) = '1';\n+\tif ($base eq 'git') {\n+\t    $suffix = '7'; # yuck...\n+\t}\n+\tprint \"$base.html $base.$suffix : \", join(\" \", keys %$included), \"\\n\";\n+    }\n+}\ndiff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl\nnew file mode 100644\nindex 0000000..6a361a2\n--- /dev/null\n+++ b/Documentation/callouts.xsl\n@@ -0,0 +1,30 @@\n+<!-- callout.xsl: converts asciidoc callouts to man page format -->\n+<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n+<xsl:template match=\"co\">\n+\t<xsl:value-of select=\"concat('\\fB(',substring-after(@id,'-'),')\\fR')\"/>\n+</xsl:template>\n+<xsl:template match=\"calloutlist\">\n+\t<xsl:text>.sp&#10;</xsl:text>\n+\t<xsl:apply-templates/>\n+\t<xsl:text>&#10;</xsl:text>\n+</xsl:template>\n+<xsl:template match=\"callout\">\n+\t<xsl:value-of select=\"concat('\\fB',substring-after(@arearefs,'-'),'. \\fR')\"/>\n+\t<xsl:apply-templates/>\n+\t<xsl:text>.br&#10;</xsl:text>\n+</xsl:template>\n+\n+<!-- sorry, this is not about callouts, but attempts to work around\n+ spurious .sp at the tail of the line docbook stylesheets seem to add -->\n+<xsl:template match=\"simpara\">\n+  <xsl:variable name=\"content\">\n+    <xsl:apply-templates/>\n+  </xsl:variable>\n+  <xsl:value-of select=\"normalize-space($content)\"/>\n+  <xsl:if test=\"not(ancestor::authorblurb) and\n+                not(ancestor::personblurb)\">\n+    <xsl:text>&#10;&#10;</xsl:text>\n+  </xsl:if>\n+</xsl:template>\n+\n+</xsl:stylesheet>\ndiff --git a/Documentation/stg-new.txt b/Documentation/stg-new.txt\nnew file mode 100644\nindex 0000000..698816b\n--- /dev/null\n+++ b/Documentation/stg-new.txt\n@@ -0,0 +1,115 @@\n+stg-new(1)\n+==========\n+Yann Dirson <ydirson@altern.org>\n+v0.12.1, February 2007\n+\n+NAME\n+----\n+stg-new - stgdesc:new[]\n+\n+SYNOPSIS\n+--------\n+stg new [OPTIONS] <name>\n+\n+DESCRIPTION\n+-----------\n+\n+Create a new, empty patch with the given <name> on the current stack.\n+The new patch is created on top of the currently applied patches, and\n+is made the new top of the stack.  The local changes in the working\n+tree are not included in the patch. A stglink:refresh[] command is\n+needed for this.\n+\n+An editor will be launched to edit the commit message to be used for\n+the patch, unless the '--message' flag already specified one.  The\n+'patchdescr.tmpl' template file is used if available to pre-fill the\n+editor.  The editor to use is taken from the first of the following\n+sources of information, and defaults to 'vi':\n+\n+. the 'stgit.editor' GIT configuration variable\n+. the 'EDITOR' environment variable\n+\n+The message and other GIT commit attributes can be modified later\n+using stglink:refresh[].\n+\n+AUTHOR AND COMMITTER INFORMATION\n+--------------------------------\n+\n+The author name (resp. email) to record in the StGIT patch is taken\n+from the first of the following sources for the information:\n+\n+. the '--authname' (resp. '--authemail') or '--author' flag on command-line\n+. the 'GIT_AUTHOR_NAME' (resp. 'GIT_AUTHOR_EMAIL') environment variable\n+. the 'user.name' (resp. 'user.email') GIT configuration variable\n+\n+Similarly, the committer name (resp. email) is taken from the first of\n+the following sources:\n+\n+. the '--commname' (resp. '--commemail') flag on command-line\n+. the 'GIT_COMMITTER_NAME' (resp. 'GIT_COMMITTER_EMAIL') environment variable\n+. the 'user.name' (resp. 'user.email') GIT configuration variable\n+\n+The GIT commit generated by stglink:refresh[] will use these\n+informations when available.  If one of them is not available, GIT\n+will pick the value from your machine's configuration at that time, as\n+described in gitlink:git-commit-tree[1].\n+\n+OPTIONS\n+-------\n+\n+<name>::\n+\tThe short name that will be used as to identify the patch in\n+\tother StGIT commands.  Must be unique in the stack.  May only\n+\tcontain alphanumeric characters, dashes and underscores.\n+\n+--message=<message>::\n+-m <message>::\n+\tUse <message> as the patch description.\n+\n+--showpatch::\n+-s::\n+\tShow the patch content in the editor buffer.  This flag does\n+\tnothing if '-m' is also specified.\n+\n+--author=\"Name <email@company>\"::\n+-a \"Name <email@company>\"::\n+\tUse \"Name <email@company>\" as the author details.  This form\n+\tsets both 'authname' and 'authemail'.\n+\n+--authname=<name>::\n+\tUse <name> as the author name\n+--authemail=<email>::\n+\tUse <email> as the author e-mail\n+--authdate=<date>::\n+\tUse <date> as the author date\n+\n+--commname=<name>::\n+\tUse <name> as the committer name\n+--commemail=<email>::\n+\tUse <email> as the committer e-mail\n+\n+FILES\n+-----\n+\n+\t<templates>/patchdescr.tmpl\n+\n+ENVIRONMENT VARIABLES\n+---------------------\n+\n+\tGIT_AUTHOR_NAME\n+\tGIT_AUTHOR_EMAIL\n+\tGIT_AUTHOR_DATE\n+\tGIT_COMMITTER_NAME\n+\tGIT_COMMITTER_EMAIL\n+\tEDITOR\n+\n+GIT CONFIGURATION VARIABLES\n+---------------------------\n+\n+\tuser.name\n+\tuser.email\n+\tstgit.editor\n+\n+StGIT\n+-----\n+Part of the StGIT suite - see gitlink:stg[7].\ndiff --git a/Documentation/stg.txt b/Documentation/stg.txt\nnew file mode 100644\nindex 0000000..571e53a\n--- /dev/null\n+++ b/Documentation/stg.txt\n@@ -0,0 +1,210 @@\n+stg(7)\n+======\n+Yann Dirson <ydirson@altern.org>\n+v0.12.1, February 2007\n+\n+NAME\n+----\n+stg - manage stacks of patches using the GIT content tracker\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'stg' [--version] [--help] <command> [OPTIONS] [ARGS]\n+\n+DESCRIPTION\n+-----------\n+\n+StGIT (Stacked GIT) is an application providing similar functionality\n+to Quilt (i.e. pushing/popping patches to/from a stack), on top of\n+GIT. These operations are performed using GIT commands and the patches\n+are stored as GIT commit objects, allowing easy merging of the StGIT\n+patches into other repositories using standard GIT functionality.\n+\n+Typical uses of StGIT include:\n+\n+Tracking branch::\n+\tMaintaining modifications against a remote branch, possibly\n+\twith the intent of sending some patches upstream.  StGIT\n+\tassists in preparing and cleaning up patches until they are\n+\tacceptable upstream, as well as maintaining local patches not\n+\tmeant to be sent upstream.\n+\n+Development branch::\n+\tPreparing and testing your commits before publishing them,\n+\tseparating your features from unrelated bugfixes collected\n+\twhile developping.\n+\n+OPTIONS\n+-------\n+\n+--version::\n+\tPrints the StGIT suite version that the 'stg' program came\n+\tfrom, as well as version of other components used, such as GIT\n+\tand Python.\n+\n+--help::\n+\tPrints the synopsis and a list of all commands.  If a git\n+\tcommand is given this option will display the specific help\n+\tfor that command.\n+\n+STGIT COMMANDS\n+--------------\n+\n+We divide StGIT commands in thematic groups, according to the primary\n+type of object they create or change.\n+\n+ifdef::backend-docbook[]\n+Here is a short description of each command. A more detailed\n+description is available in individual command manpages.  Those\n+manpages are named 'stg-<command>(1)'.\n+endif::backend-docbook[]\n+\n+Generic commands\n+~~~~~~~~~~~~~~~~\n+\n+User-support commands not touching the repository.\n+\n+stglink:help[]::\n+\tstgdesc:help[]\n+stglink:version[]::\n+\tstgdesc:version[]\n+stglink:copyright[]::\n+\tstgdesc:copyright[]\n+\n+Repository commands\n+~~~~~~~~~~~~~~~~~~~\n+\n+stglink:clone[]::\n+\tstgdesc:clone[]\n+stglink:id[]::\n+\tstgdesc:id[]\n+\n+Stack commands\n+~~~~~~~~~~~~~~\n+\n+Stack management\n+^^^^^^^^^^^^^^^^\n+\n+stglink:branch[]::\n+\tstgdesc:branch[]\n+stglink:init[]::\n+\tstgdesc:init[]\n+stglink:clean[]::\n+\tstgdesc:clean[]\n+stglink:pull[]::\n+\tstgdesc:pull[]\n+stglink:rebase[]::\n+\tstgdesc:rebase[]\n+\n+stglink:commit[]::\n+\tstgdesc:commit[]\n+stglink:uncommit[]::\n+\tstgdesc:uncommit[]\n+stglink:assimilate[]::\n+\tstgdesc:assimilate[]\n+\n+Controlling what patches are applied\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+stglink:series[]::\n+\tstgdesc:series[]\n+stglink:push[]::\n+\tstgdesc:push[]\n+stglink:pop[]::\n+\tstgdesc:pop[]\n+stglink:goto[]::\n+\tstgdesc:goto[]\n+stglink:float[]::\n+\tstgdesc:float[]\n+stglink:applied[]::\n+\tstgdesc:applied[]\n+stglink:unapplied[]::\n+\tstgdesc:unapplied[]\n+stglink:top[]::\n+\tstgdesc:top[]\n+\n+stglink:hide[]::\n+\tstgdesc:hide[]\n+stglink:unhide[]::\n+\tstgdesc:unhide[]\n+\n+Miscellaneous stack commands\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+stglink:patches[]::\n+\tstgdesc:patches[]\n+\n+\n+Patch commands\n+~~~~~~~~~~~~~~\n+\n+Patch management\n+^^^^^^^^^^^^^^^^\n+\n+stglink:new[]::\n+\tstgdesc:new[]\n+stglink:delete[]::\n+\tstgdesc:delete[]\n+stglink:rename[]::\n+\tstgdesc:rename[]\n+stglink:log[]::\n+\tstgdesc:log[]\n+\n+Controlling patch contents\n+^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+stglink:files[]::\n+\tstgdesc:files[]\n+stglink:show[]::\n+\tstgdesc:show[]\n+stglink:refresh[]::\n+\tstgdesc:refresh[]\n+stglink:fold[]::\n+\tstgdesc:fold[]\n+stglink:pick[]::\n+\tstgdesc:pick[]\n+stglink:sync[]::\n+\tstgdesc:sync[]\n+\n+Interaction with the rest of the world\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+stglink:export[]::\n+\tstgdesc:export[]\n+stglink:import[]::\n+\tstgdesc:import[]\n+stglink:mail[]::\n+\tstgdesc:mail[]\n+\n+\n+Working-copy commands\n+~~~~~~~~~~~~~~~~~~~~~\n+\n+stglink:add[]::\n+\tstgdesc:add[]\n+stglink:rm[]::\n+\tstgdesc:rm[]\n+stglink:status[]::\n+\tstgdesc:status[]\n+stglink:diff[]::\n+\tstgdesc:diff[]\n+stglink:resolved[]::\n+\tstgdesc:resolved[]\n+\n+CONFIGURATION MECHANISM\n+-----------------------\n+\n+Starting with 0.12, StGIT uses the same configuration mechanism as\n+GIT.  See gitlink:git[7] for more details.\n+\n+TEMPLATES\n+---------\n+\n+A number of StGIT commands make use of template files to provide\n+useful default texts to be edited by the user.  These '<name>.tmpl'\n+template files are searched in the following directories:\n+\n+\t$GITDIR/\n+\t$HOME/.stgit/templates/\n+\t/usr/share/stgit/templates/\ndiff --git a/stgit/commands/branch.py b/stgit/commands/branch.py\nindex 032218a..eff0121 100644\n--- a/stgit/commands/branch.py\n+++ b/stgit/commands/branch.py\n@@ -26,7 +26,7 @@ from stgit.utils import *\n from stgit import stack, git, basedir\n \n \n-help = 'manage development branches'\n+help = 'manage patch stacks'\n usage = \"\"\"%prog [options] branch-name [commit-id]\n \n Create, clone, switch between, rename, or delete development branches\ndiff --git a/stgit/commands/clone.py b/stgit/commands/clone.py\nindex 455dd6e..15139c8 100644\n--- a/stgit/commands/clone.py\n+++ b/stgit/commands/clone.py\n@@ -23,7 +23,7 @@ from stgit.utils import *\n from stgit import stack, git\n \n \n-help = 'clone a remote repository into local storage'\n+help = 'make a local clone of a remote repository'\n usage = \"\"\"%prog [options] <repository> <dir>\n \n Clone a GIT <repository> into the local <dir> and initialise the\ndiff --git a/stgit/commands/export.py b/stgit/commands/export.py\nindex 35a25ba..79b8630 100644\n--- a/stgit/commands/export.py\n+++ b/stgit/commands/export.py\n@@ -26,7 +26,7 @@ from stgit.utils import *\n from stgit import stack, git, templates\n \n \n-help = 'exports a series of patches to <dir> (or patches)'\n+help = 'exports patches to a directory'\n usage = \"\"\"%prog [options] [<patch1>] [<patch2>] [<patch3>..<patch4>]\n \n Export a range of applied patches to a given directory (defaults to\ndiff --git a/stgit/commands/id.py b/stgit/commands/id.py\nindex 284589a..4226adf 100644\n--- a/stgit/commands/id.py\n+++ b/stgit/commands/id.py\n@@ -23,7 +23,7 @@ from stgit.utils import *\n from stgit import stack, git\n \n \n-help = 'print the hash value of a GIT id'\n+help = 'print the GIT hash value of a StGIT reference'\n usage = \"\"\"%prog [options] [id]\n \n Print the hash value of a GIT id (defaulting to HEAD). In addition to\ndiff --git a/stgit/commands/patches.py b/stgit/commands/patches.py\nindex 7da74ba..01708b0 100644\n--- a/stgit/commands/patches.py\n+++ b/stgit/commands/patches.py\n@@ -24,7 +24,7 @@ from stgit.utils import *\n from stgit import stack, git\n \n \n-help = 'show the patches modifying a file'\n+help = 'show the applied patches modifying a file'\n usage = \"\"\"%prog [options] <file> [<file>...]\n \n Show the applied patches modifying the given files. The '--diff'\ndiff --git a/stgit/main.py b/stgit/main.py\nindex 933f127..f77fba8 100644\n--- a/stgit/main.py\n+++ b/stgit/main.py\n@@ -102,28 +102,29 @@ commands = Commands({\n \n # classification: repository, stack, patch, working copy\n repocommands = (\n-    'branch',\n     'clone',\n     'id',\n-    'pull'\n     )\n stackcommands = (\n     'applied',\n     'assimilate',\n+    'branch',\n     'clean',\n     'commit',\n     'float',\n     'goto',\n     'hide',\n     'init',\n+    'patches',\n     'pop',\n+    'pull',\n     'push',\n     'rebase',\n     'series',\n     'top',\n     'unapplied',\n     'uncommit',\n-    'unhide'\n+    'unhide',\n     )\n patchcommands = (\n     'delete',\n@@ -138,15 +139,14 @@ patchcommands = (\n     'refresh',\n     'rename',\n     'show',\n-    'sync'\n+    'sync',\n     )\n wccommands = (\n     'add',\n     'diff',\n-    'patches',\n     'resolved',\n     'rm',\n-    'status'\n+    'status',\n     )\n \n def _print_helpstring(cmd):\n"}]}