1 % Copyright (C) 2002-2004 David Roundy 2 % 3 % This program is free software; you can redistribute it and/or modify 4 % it under the terms of the GNU General Public License as published by 5 % the Free Software Foundation; either version 2, or (at your option) 6 % any later version. 7 % 8 % This program is distributed in the hope that it will be useful, 9 % but WITHOUT ANY WARRANTY; without even the implied warranty of 10 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 % GNU General Public License for more details. 12 % 13 % You should have received a copy of the GNU General Public License 14 % along with this program; see the file COPYING. If not, write to 15 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 % Boston, MA 02110-1301, USA. 17 18 \begin{code} 19 module Darcs.Commands.Show ( show_command, list, query ) where 20 21 import Darcs.Commands ( DarcsCommand(..), 22 CommandControl(Command_data, Hidden_command), 23 command_alias, 24 ) 25 import Darcs.Commands.ShowAuthors ( show_authors ) 26 import Darcs.Commands.ShowBug ( show_bug ) 27 import Darcs.Commands.ShowContents ( show_contents ) 28 import Darcs.Commands.ShowFiles ( show_files, show_manifest ) 29 import Darcs.Commands.ShowTags ( show_tags ) 30 import Darcs.Commands.ShowRepo ( show_repo ) 31 import Darcs.Commands.ShowIndex ( show_index, show_pristine ) 32 import Darcs.Repository ( amInRepository ) 33 34 show_description :: String 35 show_description = "Show information which is stored by darcs." 36 37 show_help :: String 38 show_help = 39 "Use the --help option with the subcommands to obtain help for\n"++ 40 "subcommands (for example, \"darcs show files --help\").\n" ++ 41 "\n" ++ 42 "In previous releases, this command was called `darcs query'.\n" ++ 43 "Currently this is a deprecated alias.\n" 44 45 show_command :: DarcsCommand 46 show_command = SuperCommand {command_name = "show", 47 command_help = show_help, 48 command_description = show_description, 49 command_prereq = amInRepository, 50 command_sub_commands = [Hidden_command show_bug, 51 Command_data show_contents, 52 Command_data show_files, Hidden_command show_manifest, 53 Command_data show_index, 54 Command_data show_pristine, 55 Command_data show_repo, 56 Command_data show_authors, 57 Command_data show_tags] 58 } 59 60 query :: DarcsCommand 61 query = command_alias "query" show_command 62 63 list :: DarcsCommand 64 list = command_alias "list" show_command 65 \end{code} 66 67 \subsection{darcs show} 68 69 The show command provides access to several subcommands which can be 70 used to investigate the state of a repository. 71 72 \input{Darcs/Commands/ShowAuthors.lhs} 73 \input{Darcs/Commands/ShowContents.lhs} 74 \input{Darcs/Commands/ShowFiles.lhs} 75 \input{Darcs/Commands/ShowTags.lhs} 76 \input{Darcs/Commands/ShowRepo.lhs} 77