1 % Copyright (C) 2007 Eric Kow 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 \darcsCommand{show bug} 19 \begin{code} 20 {-# OPTIONS_GHC -cpp #-} 21 {-# LANGUAGE CPP #-} 22 23 module Darcs.Commands.ShowBug ( show_bug ) where 24 25 import Darcs.Commands ( DarcsCommand(..), nodefaults ) 26 import Darcs.Arguments ( DarcsFlag, working_repo_dir ) 27 import Darcs.Repository ( findRepository ) 28 #include "impossible.h" 29 30 show_bug_description :: String 31 show_bug_description = "Simulate a run-time failure." 32 33 show_bug_help :: String 34 show_bug_help = 35 "Show bug can be used to see what darcs would show you if you encountered.\n" 36 ++"a bug in darcs.\n" 37 38 show_bug :: DarcsCommand 39 show_bug = DarcsCommand {command_name = "bug", 40 command_help = show_bug_help, 41 command_description = show_bug_description, 42 command_extra_args = 0, 43 command_extra_arg_help = [], 44 command_command = show_bug_cmd, 45 command_prereq = findRepository, 46 command_get_arg_possibilities = return [], 47 command_argdefaults = nodefaults, 48 command_advanced_options = [], 49 command_basic_options = [working_repo_dir]} 50 51 show_bug_cmd :: [DarcsFlag] -> [String] -> IO () 52 show_bug_cmd _ _ = bug "This is actually a fake bug in darcs." 53 \end{code}