pax_global_header00006660000000000000000000000064113404654330014515gustar00rootroot0000000000000052 comment=1333267644b625157856ef9a86ab6b9c3427680b cil-0.07.00/000077500000000000000000000000001134046543300124305ustar00rootroot00000000000000cil-0.07.00/.cil000066400000000000000000000022241134046543300132000ustar00rootroot00000000000000VCS: Git UseGit: 1 StatusStrict: 1 StatusOpenList: New StatusOpenList: InProgress StatusOpenList: Ongoing StatusClosedList: Fixed StatusClosedList: OnHold StatusClosedList: Duplicate StatusClosedList: Finished StatusClosedList: Cancelled LabelStrict: 1 LabelAllowedList: Release-v0.1.0 LabelAllowedList: Release-v0.2.0 LabelAllowedList: Release-v0.2.1 LabelAllowedList: Release-v0.3.0 LabelAllowedList: Release-v0.4.0 LabelAllowedList: Release-v0.4.1 LabelAllowedList: Release-v0.4.2 LabelAllowedList: Release-v0.5.0 LabelAllowedList: Release-v0.5.1 LabelAllowedList: Release-v0.06.00 LabelAllowedList: Type-Enhancement LabelAllowedList: Type-Defect LabelAllowedList: Type-Task LabelAllowedList: Type-Patch LabelAllowedList: Type-Refactoring LabelAllowedList: Type-Other LabelAllowedList: Milestone-v0.1 LabelAllowedList: Milestone-v0.2 LabelAllowedList: Milestone-v0.3 LabelAllowedList: Milestone-v0.4 LabelAllowedList: Milestone-v0.5 LabelAllowedList: Milestone-v0.06 LabelAllowedList: Milestone-v0.07 LabelAllowedList: Milestone-Future LabelAllowedList: Priority-Critical LabelAllowedList: Priority-High LabelAllowedList: Priority-Medium LabelAllowedList: Priority-Low cil-0.07.00/AUTHORS000066400000000000000000000002241134046543300134760ustar00rootroot00000000000000Andrew Chilton Andrew Ruthven Brenda Wallace Brian Smith Francois Marier Grant McLean Nigel McNie Pedro Melo Penny Leach Sam Vilain Yanick Champoux cil-0.07.00/Build.PL000066400000000000000000000016501134046543300137260ustar00rootroot00000000000000use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'CIL', license => 'perl', dist_author => 'Andrew Chilton ', dist_version_from => 'lib/CIL.pm', build_requires => { 'Class::Accessor' => 0, 'DateTime' => 0, 'Digest::MD5' => 0, 'Email::Date' => 0, 'Email::Find' => 0, 'Email::Simple' => 0, 'Fcntl' => 0, 'File::Basename' => 0, 'File::Glob' => 0, 'File::Slurp' => 0, 'File::Spec' => 0, 'File::Temp' => 0, 'File::Touch' => 0, 'Getopt::Mixed' => 0, 'MIME::Base64' => 0, 'Test::More' => 0, }, add_to_cleanup => [ 'CIL-*' ], create_makefile_pl => 'traditional', ); $builder->create_build_script(); cil-0.07.00/COPYING000066400000000000000000001045131134046543300134670ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . cil-0.07.00/Changes000066400000000000000000000021641134046543300137260ustar00rootroot000000000000000.6.0 (Unreleased) * New hook infrastructure, currently only 'issue_post_save' is allowed 0.5.1 (2008-07-05) * New release minus all the cruft 0.5.0 (2008-07-05) * 'steal' command added * 'track' command added 0.4.2 (2008-07-04) * Fix bug where new issues are assigned to the reporter * Fix bug where only one item in a config list breaks listings 0.4.1 (2008-07-03) * Fix dependency on libemail-date-perl 0.4.0 (2008-07-02) * Can now read a ~/.cilrc file for user defined options * 'am' added - which applies a mailbox * Can now use shortened hash names to the commands * Allows dependencies between issues * New filter called --is-mine 0.3.0 (2008-06-29) * Added filters for the listing commands * Added ability to read .cil config file * Can now set which Statuses are valid * Can set which Labels are valid * Added 'fsck' command * Added bash completion for options, commands and entities 0.2.1 (2008-06-24) * Bug fix 0.2.0 (2008-06-22) * Change to newer format for saving all issue * Addition of attachments * 'status' command added 0.1.0 (2008-05-05) * Initial release cil-0.07.00/INSTALLATION000066400000000000000000000036711134046543300142630ustar00rootroot00000000000000=============================================================================== Dependencies ------------ Perl Modules: * File::Touch * File::Glob * File::Basename * MIME::Base64 * Email::Find Some of these are distributed with perl itself but is left as an excercise to the reader to figure out what you need in your distribution (for Debian Etch, see below). =============================================================================== Debian Packaging ---------------- For Debian Etch, the following packages will need to be installed: * perl * libgetopt-mixed-perl * libdigest-perl * libfile-touch-perl * libfile-slurp-perl * libclass-accessor-perl * libdatetime-perl * libfile-homedir-perl Out of the box, cil provides two debian directories depending on which version of Debian you wish to use. Currently, there isn't much difference but choose which distro you want and link that to 'debian/'. e.g. for Etch, run: $ ln -s debian-etch debian Then inside the main cil directory, you can type the following to create a Debian paackage: $ dpkg-buildpackage -tc -us -uc -rfakeroot which can then be installed with: $ sudo dpkg -i ../cil_0.5.1_all.deb or added to a repository you are using for easier installation with apt-get or aptitude. Then, you can just run 'cil' from the command line. =============================================================================== Running 'cil' without installing -------------------------------- The quickest way to start is to 'cd' into the directory you untarred or cloned the repo into. $ cd /path/to/cil/lib $ export PERL5LIB=`pwd` Then you can either run by: * /path/to/cil/bin/cil init * export PATH=/path/to/cil/bin:$PATH * cd ~/bin && ln -s /path/to/cil/bin/cil =============================================================================== See http://www.chilts.org/projects/cil/ for further information. =============================================================================== cil-0.07.00/MANIFEST000066400000000000000000000003611134046543300135610ustar00rootroot00000000000000bin/cil Build.PL Changes COPYING etc/bash_completion.d/cil INSTALLATION lib/CIL.pm lib/CIL/Attachment.pm lib/CIL/Base.pm lib/CIL/Comment.pm lib/CIL/Issue.pm lib/CIL/Utils.pm MANIFEST This list of files README t/00_files.t t/i_cafebabe.cil cil-0.07.00/MANIFEST.SKIP000066400000000000000000000012631134046543300143300ustar00rootroot00000000000000# Avoid version control files. \bRCS\b \bCVS\b ,v$ \B\.svn\b \B\.cvsignore$ # Avoid Makemaker generated and utility files. \bMakefile$ \bblib \bMakeMaker-\d \bpm_to_blib$ \bblibdirs$ ^MANIFEST\.SKIP$ # Avoid Module::Build generated and utility files. \bBuild$ \bBuild.bat$ \b_build # Avoid Devel::Cover generated files \bcover_db # Avoid temp and backup files. ~$ \.tmp$ \.old$ \.bak$ \#$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid archives of this distribution \bCIL-[\d\.\_]+ # issues should not be part of the module issues/ .cil # exclude debian-* stuff debian-\w+/ # git stuff .git/ .gitignore cil-0.07.00/Makefile000066400000000000000000000003221134046543300140650ustar00rootroot00000000000000open: cil summary --is-open next-milestone: cil summary --is-open --label=Milestone-v0.07 closed: cil summary --is-closed clean: find . -name '*~' -exec rm {} ';' .PHONY: issue-summary issue-list clean cil-0.07.00/README000066400000000000000000000066601134046543300133200ustar00rootroot00000000000000=============================================================================== Overview -------- 'cil' allows easy command-line creation of an issue tracker. It saves each issue locally and in plain text. Commands are given such that these issues can be added, edited and listed easily. =============================================================================== Quick Start ----------- Once installed, you should be able to run 'cil': $ cil --help Now change directory to your current development project. To save the issues, 'cil' requires setting up, so issue the 'init' command: $ cil init This creates a '.cil' file and an 'issues/' directory. Then add an issue. An editor will pop-up and you fill in the details: $ cil add After you've added it, you can see a representation of the issue. Now you can list all the issues by using the 'list' command: $ cil list When listing the issues, they can also be filtered: $ cil list --status=New $ cil list --label=Type-Enhancement $ cil list --is-open $ cil list --label=Milestone-v0.3 --is-open $ cil list --is-mine You can see what the issue name is by looking at the 'Issue' title. Imagine it is 'cafebabe' (which by default is the time from epoch). To see your issue again, use the 'show' command: $ cil show cafebabe Another reporting command is 'summary' for which all the filter options also apply: $ cil summary $ cil summary --status=New $ cil summary --label=Type-Enhancement $ cil summary --is-open $ cil summary --label=Milestone-v0.3 --is-open The columns show 'Name', 'Status', 'CreatedBy' and 'Summary'. Shucks, we've noticed we got something wrong in the issue. Let's edit it: $ cil edit cafebabe Save your changes and exit your editor. The issue is now saved. Try showing it again to make sure your changed are correct. We have just found out more about the issue so let's add a comment to it: $ cil comment cafebabe When you show the issue again, you'll see the comment has been added and is now displayed. Adding an attachment is easy: $ cil attach cafebabe core ... added attachment 'decaf7ea' ... $ cil show cafebabe If someone else added the attachment and you wish to view it, you can extract it from the issue: $ cil extract decaf7ea --filename=mycore If someone sends you a bug report or a comment via email and you wish to import it into your issues list, you can use the 'am' command to do it's best to import it. It will try and figure out if an issue is already mentioned and if so, will try and import the email as a comment for that particular issue. In the case where an existing issue is not found, it will import the email as a new issue: $ cil am email.txt Finally, because the cil issue files reside on the filesystem in flat files, there needs to be a way to check the integrity of the issues, therefore you can run this to do checks regarding the whole issue list: $ cil fsck That's it for now. As you can see, if you've played with any kind of bug/issue tracker before, 'cil' is straightforward. Sometimes, you might add someone else repository from which you want to fetch both code and issues. If you merge a new issue and you want to assign it to yourself, instead of editing the issue and having to type in your name and email, just use 'cil steal'. This will assign the issue to yourself and save it back out: $ cil steal cafebabe Then just commit it to your VCS. =============================================================================== cil-0.07.00/bin/000077500000000000000000000000001134046543300132005ustar00rootroot00000000000000cil-0.07.00/bin/cil000077500000000000000000000324571134046543300137100ustar00rootroot00000000000000#!/usr/bin/perl ## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ## ---------------------------------------------------------------------------- use strict; use warnings; use Getopt::Mixed "nextOption"; use File::Touch; use File::Glob ':glob'; use File::Basename; use File::Slurp qw(read_file write_file); use Email::Simple; use Email::Date qw(find_date); use CIL; use CIL::Issue; use CIL::Comment; use CIL::Attachment; use CIL::Utils; ## ---------------------------------------------------------------------------- # constants my @IN_OPTS = ( # strings 'p=s', # p = path 'path>p', # for 'add' 'f=s', # f = filename 'filename>f', # for 'extract' 's=s', # s = status 'status>s', # for 'summary', 'list' 'l=s', # l = label 'label>l', # for 'summary, 'list' 'c=s', # c = created-by 'created-by>c', # for 'summary', 'list' 'a=s', # a = assigned_to 'assigned-to>a',# for 'summary', 'list' 'r=s', # r = revision 'revision>s', # for all query commands # booleans 'bare', # for 'init' 'is-open', # for 'summary', 'list' 'is-closed', # for 'summary', 'list' 'is-mine', # for 'summary', 'list' 'mine', # for 'add' 'add', # for 'add', 'comment' 'commit', # for 'add', 'comment' 'batch', # for 'am' 'remove', # for 'label' 'help', 'version', ); my %BOOLEAN_ARGS = ( 'help' => 1, 'version' => 1, 'bare' => 1, 'is-open' => 1, 'is-closed' => 1, 'is-mine' => 1, 'mine' => 1, 'add' => 1, 'commit' => 1, 'batch' => 1, 'remove' => 1, ); ## ---------------------------------------------------------------------------- # main program { my $args = get_options(\@IN_OPTS, \%BOOLEAN_ARGS); # do the version and help if ( exists $args->{version} ) { print "cil version " . $CIL::VERSION . "\n"; exit; } if ( exists $args->{help} ) { usage(); exit; } # make sure that the command given is valid Getopt::Mixed::abortMsg('specify a command') if @ARGV == 0; my $command_name = shift @ARGV; my( $command ) = grep { $command_name eq $_->name } CIL->commands or Getopt::Mixed::abortMsg("'$command_name' is not a valid cil command."); # make a new $cil object my $cil = CIL->new(); # for all commands (except init), we need to know we can see the proper paths # (ie. issues/) CIL::Utils->check_paths( $cil ) unless $command_name eq 'init'; $cil->read_config_user(); $cil->read_config_file(); # add any hooks we want # none yet $command->run($cil, $args, @ARGV); } ## ---------------------------------------------------------------------------- # hooks # none yet ## ---------------------------------------------------------------------------- # helper functions for this command line tool sub get_options { my ($in_opts, $booleans) = @_; my $args = {}; Getopt::Mixed::init( @$in_opts ); while( my($opt, $val) = nextOption() ) { # if boolean, keep a count of how many there is only if ( exists $booleans->{$opt} ) { $args->{$opt}++; next; } # normal 'string' value if ( defined $args->{$opt} ) { unless ( ref $args->{$opt} eq 'ARRAY' ) { $args->{$opt} = [ $args->{$opt} ]; } push @{$args->{$opt}}, $val; } else { $args->{$opt} = $val; } } Getopt::Mixed::cleanup(); return $args; } ## ---------------------------------------------------------------------------- # program info sub usage { print <<"END_USAGE"; Usage: $0 COMMAND [options] Commands: init [--path=PATH] add summary [FILTERS...] list [FILTERS...] show ISSUE status NEW_STATUS [ISSUES...] label NEW_LABEL [ISSUES...] steal ISSUE edit ISSUE comment ISSUE attach ISSUE FILENAME extract ATTACHMENT [--filename=FILENAME] am EMAIL.TXT [--batch] track ISSUE fsck Filters: --status=? --is-open --is-closed --label=? --assigned-to=? --is-mine See for further information. Report bugs to . END_USAGE } ## ---------------------------------------------------------------------------- =head1 NAME cil - the command-line issue list =head1 SYNOPSIS $ cil init $ cil summary $ cil list $ cil list --status=New $ cil list --label=Release-v0.1 $ cil list --is-open $ cil add ... added issue 'cafebabe' ... $ cil show cafebabe $ cil edit cafebabe $ cil status cafebabe InProgress $ cil comment cafebabe ... added comment 'deadbeef' ... $ cil attach cafebabe filename.txt ... added attachment 'decaf7ea' ... $ cil extract decaf7ea $ cil extract decaf7ea --filename=other_filename.txt $ cil am email.txt $ cil track $ cil fsck =head1 DESCRIPTION Cil is a small but useful command-line issue list. It saves issues, comments and attachments as local files which you can check in to your repository. =over =item init [--path=PATH] [--bare] Creates a local '.cil' file and an 'issues' directory. If PATH is specified, the config file and directory will be created in the destination directory. Usually, cil will write a small C<.cil> file such that you can use various filter commands immediately and can also serve as an example config file. Using C<--bare> just touches the C<.cil> config file ready for your own manipulation. =item summary [filters] Displays a one line summary for each issue. You may filter on both the Status and Label fields. =item list [filters] Shows each issue with more information. You may filter on both the Status and Label fields. =item add [--mine] [summary] Adds an issues after you have edited the input. Text passed after 'add' will be used as the bug summary line. If you use the --mine flag, the AssignedTo field is automatically set to you (saves having to copy and paste the CreatedBy field). =item show ISSUE Shows the issue name with more detail. =item status ISSUE NEW_STATUS Shortcut so that you can set a new status on an issue without having to edit it. =item depends-on ISSUE1 ISSUE2 Shortcut so that cil will add a 'DependsOn' from issue 1 to issue 2. Conversley, issue 2 will also then contain a 'Precedes' pointer to issue 1. =item precedes ISSUE1 ISSUE2 This is the exact opposite of C and is here for convenience and completeness. ie. issue 1 has to be completed before issue 2. =item status ISSUE NEW_STATUS Shortcut so that you can set a new status on an issue without having to edit it. =item steal ISSUE Shortcut to assign this issue to yourself. It reads your C<~/.cilrc> file for your UserName and UserEmail and uses this to populate the C field in the issue. =item edit ISSUE Edits the issue. If it changes, set the updates time to now. =item comment ISSUE Adds a comment to an issues after you have edited the input. =item attach ISSUE FILENAME Adds that particular filename to an existing issue. =item extract ATTACHMENT [--filename=FILENAME] Extracts the file from the attachment number. If filename if given uses that, otherwise it will use the original one saved along with the attachment. =item am Applies an email message to the issue list. It tries to figure out the type of email it is, whether it is a new issue or a comment on an already existing issue. For example, if it can find valid issue names in the subject or body of the message, it adds it as a comment to that issue. If it can't find any valid issue names, it presumes it's a new issue and adds that. Note: this command will deal with Mailbox format files later on. =item track ISSUE This command outputs one or more command which you should run so that your VCS knows about your issue. It makes sure all the comments and attachments are done too. =item fsck Tries to help you organise your issues if any aren't valid or have broken relationships. =back =head1 FILTERS Filters can be used on both the C and C commands. Most can be combined. See each individual filter for details. =over =item --status=STATUS You can choose any of the Statuses which might appear in your issues. This status does not have to be defined in your C<.cil> file, even if you have C turned on. =item --label=LABEL You can choose any of the Labels which might appear in your issues. This label does not have to be defined in your C<.cil> file, even if you have C turned on. =item --is-open, --is-closed These check both C and C from your C<.cil> file. If both are specified, you're likely to get no issues unless you explicitly defined a status as being in both lists (for whatever reason you have). =item --assigned-to=EMAIL_ADDRESS, --is-mine These items are mutually exclusive. The C<--assigned-to> just checks the email address in the AssignedTo field. It does not match anything else in that field, including any preceding name or any angle brackets. The C<--is-mine> filter is a shortcut to asking if AssignedTo is you. Cil knows your email address if you define it in your user's C<~/.cilrc> file as C. =back =head1 .cil The C<.cil> file is used to configure bits and pieces within cil for this particular issue list. The following options are available and where stated, may be declared multiple times: The C<.cil> file is fairly simple and an example can be seen here: UseGit: 1 StatusStrict: 1 StatusOpenList: New StatusOpenList: InProgress StatusClosedList: Finished LabelStrict: 1 LabelAllowedList: Type-Enhancement LabelAllowedList: Type-Defect LabelAllowedList: Priority-High LabelAllowedList: Priority-Medium LabelAllowedList: Priority-Low =over =item UseGit Default: 0, Type: Boolean (0/1) Determines whether to use Git or not. Some features require Git though Cil is perfectly usable without. =item StatusStrict Default: 0, Type: Boolean (0/1) If this is set to a true value then cil checks that the status you enter into an issue (after adding or editing) is also in the allowed list (see StatusAllowedList). =item StatusOpenList Default: empty, Type: List This list is checked against when filtering with --is-open. =item StatusClosedList Default: empty, Type: List This list is checked against when filtering with --is-closed. =item StatusAllowedList This list is automatically generated from the StatusOpenList and the StatusClosedList. It does not have to appear in the config file. =item LabelStrict Default: 0, Type: Boolean (0/1) This determines that labels you enter are checked against LabelAllowedList. Set to 1 if you require this feature. =item LabelAllowedList Default: empty, Type: List This determines which labels are allowed if you have turned on LabelStrict. =back =head1 ~/.cilrc The C<~/.cilrc> file is read to configure the user's preferences for all cil lists they're using. It is of the same format as the C<.cil> file and contains the following options: UserName: Andrew Chilton UserEmail: andychilton@gmail.com =over =item UserName Default: 'Name', Type: String This is used as a default in the C and C fields in any issues/comments/attachments you add. =item UserEmail Default: 'Email', Type: String This is used as a default in the C and C fields in any issues/comments/attachments you add. =back =head1 BUGS Probably. Let me know :-) =head1 TODO To get a ToDo list for cil, clone the repo, find the issues/ dir and type: $ cil --is-open This gives the current outstanding issues in cil. =head1 AUTHOR Andrew Chilton =head1 COPYRIGHT Copyright (C) 2008 by Andrew Chilton Cil is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. =cut ## ---------------------------------------------------------------------------- cil-0.07.00/debian-etch/000077500000000000000000000000001134046543300145735ustar00rootroot00000000000000cil-0.07.00/debian-etch/changelog000066400000000000000000000037071134046543300164540ustar00rootroot00000000000000cil (0.5.1) unstable; urgency=low * New release minus all the cruft -- Andrew Chilton Sat, 05 Jul 2008 18:28:22 +1200 cil (0.5.0) unstable; urgency=low * Fix bug when running certain commands (inc. init) * Added command 'steal' * Added command 'track' -- Andrew Chilton Sat, 05 Jul 2008 15:36:22 +1200 cil (0.4.2) unstable; urgency=low * Fix bug where new issues are assigned to the reporter * Fix bug where only one item in a config list breaks listings * Ready for 0.4.2 release -- Andrew Chilton Thu, 03 Jul 2008 22:22:22 +1200 cil (0.4.1) unstable; urgency=low * Fix dependency on libemail-date-perl * Ready for 0.4.1 release -- Andrew Chilton Thu, 03 Jul 2008 00:09:21 +1200 cil (0.4.0) unstable; urgency=low * Can now read a ~/.cilrc file for user defined options * Added command 'am' which applies a mailbox * Can now use shortened hash names to the commands * Allows dependencies between issues * New filter called --is-mine * Ready for 0.4.0 release -- Andrew Chilton Wed, 02 Jul 2008 23:12:20 +1200 cil (0.3.0) unstable; urgency=low * Added filters for the listing commands * Added ability to read .cil config file * Can now set which Statuses are valid * Can set which Labels are valid * Added 'fsck' command * Added bash completion for options, commands and entities * Ready for 0.3.0 release -- Andrew Chilton Sat, 28 Jun 2008 12:06:19 +1200 cil (0.2.1) unstable; urgency=low * Ready for 0.2.1 release -- Andrew Chilton Mon, 23 Jun 2008 22:32:18 +1200 cil (0.2.0) unstable; urgency=low * Ready for 0.2 release -- Andrew Chilton Sun, 22 Jun 2008 16:17:18 +1200 cil (0.1.0) unstable; urgency=low * Ready for 0.1 release -- Andrew Chilton Sun, 04 May 2008 16:17:17 +1200 cil-0.07.00/debian-etch/compat000066400000000000000000000000021134046543300157710ustar00rootroot000000000000005 cil-0.07.00/debian-etch/control000066400000000000000000000013101134046543300161710ustar00rootroot00000000000000Source: cil Section: perl Priority: extra Maintainer: Andrew Chilton Uploaders: Andrew Chilton Standards-Version: 3.6.1 Build-Depends: debhelper (>= 5) Build-Depends-Indep: perl Package: cil Section: perl Priority: extra Architecture: all Depends: ${perl:Depends}, libgetopt-mixed-perl, libfile-touch-perl, libfile-slurp-perl, libclass-accessor-perl, libdatetime-perl, libemail-find-perl, libemail-date-perl, libfile-homedir-perl Description: command line issue tracker 'cil' allows easy command-line creation of an issue tracker. It saves each issue locally and in plain text. Commands are given such that these issues can be added, edited and listed easily. cil-0.07.00/debian-etch/copyright000066400000000000000000000020551134046543300165300ustar00rootroot00000000000000This package was debianized by Andrew Chilton on Sun, 22 Jun 2008 17:48:00 +1200 Upstream Author: Andrew Chilton Copyright: (C) 2008 Andrew Chilton License: cil is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . You are free to distribute this software under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. cil-0.07.00/debian-etch/docs000066400000000000000000000000071134046543300154430ustar00rootroot00000000000000README cil-0.07.00/debian-etch/install000066400000000000000000000001601134046543300161610ustar00rootroot00000000000000lib/* usr/share/perl5 bin/cil usr/bin etc/bash_completion.d/cil etc/bash_completion.d cil-0.07.00/debian-etch/manpages000066400000000000000000000000061134046543300163050ustar00rootroot00000000000000cil.1 cil-0.07.00/debian-etch/rules000077500000000000000000000020161134046543300156520ustar00rootroot00000000000000#!/usr/bin/make -f ## ---------------------------------------------------------------------------- ## ---------------------------------------------------------------------------- ## uncomment this to turn on verbose mode # export DH_VERBOSE=1 ## ---------------------------------------------------------------------------- clean: dh_testdir dh_testroot rm -f build-stamp install-stamp [ ! -f Makefile ] || $(MAKE) clean rm -f $(CURDIR)/cil.1 dh_clean build: build-stamp build-stamp: dh_testdir [ ! -f Makefile ] || $(MAKE) echo Doing MAN... pod2man $(CURDIR)/bin/cil > $(CURDIR)/cil.1 touch build-stamp binary: dh_testdir dh_testroot dh_install dh_installdirs dh_installdocs dh_installdebconf dh_installman dh_installchangelogs Changes dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch .PHONY: clean install binary-indep binary-arch binary ## ---------------------------------------------------------------------------- cil-0.07.00/debian-lenny/000077500000000000000000000000001134046543300147755ustar00rootroot00000000000000cil-0.07.00/debian-lenny/changelog000066400000000000000000000037071134046543300166560ustar00rootroot00000000000000cil (0.5.1) unstable; urgency=low * New release minus all the cruft -- Andrew Chilton Sat, 05 Jul 2008 18:28:22 +1200 cil (0.5.0) unstable; urgency=low * Fix bug when running certain commands (inc. init) * Added command 'steal' * Added command 'track' -- Andrew Chilton Sat, 05 Jul 2008 15:36:22 +1200 cil (0.4.2) unstable; urgency=low * Fix bug where new issues are assigned to the reporter * Fix bug where only one item in a config list breaks listings * Ready for 0.4.2 release -- Andrew Chilton Thu, 03 Jul 2008 22:22:22 +1200 cil (0.4.1) unstable; urgency=low * Fix dependency on libemail-date-perl * Ready for 0.4.1 release -- Andrew Chilton Thu, 03 Jul 2008 00:09:21 +1200 cil (0.4.0) unstable; urgency=low * Can now read a ~/.cilrc file for user defined options * Added command 'am' which applies a mailbox * Can now use shortened hash names to the commands * Allows dependencies between issues * New filter called --is-mine * Ready for 0.4.0 release -- Andrew Chilton Wed, 02 Jul 2008 23:12:20 +1200 cil (0.3.0) unstable; urgency=low * Added filters for the listing commands * Added ability to read .cil config file * Can now set which Statuses are valid * Can set which Labels are valid * Added 'fsck' command * Added bash completion for options, commands and entities * Ready for 0.3.0 release -- Andrew Chilton Sat, 28 Jun 2008 12:06:19 +1200 cil (0.2.1) unstable; urgency=low * Ready for 0.2.1 release -- Andrew Chilton Mon, 23 Jun 2008 22:32:18 +1200 cil (0.2.0) unstable; urgency=low * Ready for 0.2 release -- Andrew Chilton Sun, 22 Jun 2008 16:17:18 +1200 cil (0.1.0) unstable; urgency=low * Ready for 0.1 release -- Andrew Chilton Sun, 04 May 2008 16:17:17 +1200 cil-0.07.00/debian-lenny/compat000066400000000000000000000000021134046543300161730ustar00rootroot000000000000007 cil-0.07.00/debian-lenny/control000066400000000000000000000013101134046543300163730ustar00rootroot00000000000000Source: cil Section: perl Priority: extra Maintainer: Andrew Chilton Uploaders: Andrew Chilton Standards-Version: 3.6.1 Build-Depends: debhelper (>= 5) Build-Depends-Indep: perl Package: cil Section: perl Priority: extra Architecture: all Depends: ${perl:Depends}, libgetopt-mixed-perl, libfile-touch-perl, libfile-slurp-perl, libclass-accessor-perl, libdatetime-perl, libemail-find-perl, libemail-date-perl, libfile-homedir-perl Description: command line issue tracker 'cil' allows easy command-line creation of an issue tracker. It saves each issue locally and in plain text. Commands are given such that these issues can be added, edited and listed easily. cil-0.07.00/debian-lenny/copyright000066400000000000000000000020551134046543300167320ustar00rootroot00000000000000This package was debianized by Andrew Chilton on Sun, 22 Jun 2008 17:48:00 +1200 Upstream Author: Andrew Chilton Copyright: (C) 2008 Andrew Chilton License: cil is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . You are free to distribute this software under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. cil-0.07.00/debian-lenny/docs000066400000000000000000000000071134046543300156450ustar00rootroot00000000000000README cil-0.07.00/debian-lenny/install000066400000000000000000000001601134046543300163630ustar00rootroot00000000000000lib/* usr/share/perl5 bin/cil usr/bin etc/bash_completion.d/cil etc/bash_completion.d cil-0.07.00/debian-lenny/manpages000066400000000000000000000000061134046543300165070ustar00rootroot00000000000000cil.1 cil-0.07.00/debian-lenny/rules000077500000000000000000000020161134046543300160540ustar00rootroot00000000000000#!/usr/bin/make -f ## ---------------------------------------------------------------------------- ## ---------------------------------------------------------------------------- ## uncomment this to turn on verbose mode # export DH_VERBOSE=1 ## ---------------------------------------------------------------------------- clean: dh_testdir dh_testroot rm -f build-stamp install-stamp [ ! -f Makefile ] || $(MAKE) clean rm -f $(CURDIR)/cil.1 dh_clean build: build-stamp build-stamp: dh_testdir [ ! -f Makefile ] || $(MAKE) echo Doing MAN... pod2man $(CURDIR)/bin/cil > $(CURDIR)/cil.1 touch build-stamp binary: dh_testdir dh_testroot dh_install dh_installdirs dh_installdocs dh_installdebconf dh_installman dh_installchangelogs Changes dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch .PHONY: clean install binary-indep binary-arch binary ## ---------------------------------------------------------------------------- cil-0.07.00/etc/000077500000000000000000000000001134046543300132035ustar00rootroot00000000000000cil-0.07.00/etc/bash_completion.d/000077500000000000000000000000001134046543300165735ustar00rootroot00000000000000cil-0.07.00/etc/bash_completion.d/cil000066400000000000000000000042741134046543300172740ustar00rootroot00000000000000# # Bash Completion support for cil. # # Copyright (c) 2008 Andrew Chilton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # __issues() { ls -1 issues/i_*.cil 2>/dev/null | sed -e 's/^issues\/i_//; s/\.cil$//' } __comments() { ls -1 issues/c_*.cil 2>/dev/null | sed -e 's/^issues\/c_//; s/\.cil$//' } __attachments() { ls -1 issues/a_*.cil 2>/dev/null | sed -e 's/^issues\/a_//; s/\.cil$//' } _cil() { local cur prev opts # constants opts="--help --version --path --status --label --filename --is-open --is-closed --assigned-to --created-by" commands="init add summary list show status depends-on precedes edit comment attach extract" COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} # easy options first if [[ ${cur} == -* ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi # check for a command first if [[ ${prev} == 'cil' ]] ; then COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) return 0 fi # check for the various commands case "${prev}" in show|status|edit|comment|attach) local issues=$( __issues ) COMPREPLY=( $(compgen -W "${issues}" -- ${cur}) ) return 0 ;; extract) local attachments=$( __attachments ) COMPREPLY=( $(compgen -W "${attachments}" -- ${cur}) ) return 0 ;; *) ;; esac # for debugging - comment in/out when necessary #COMPREPLY=( $(compgen -W "prev=${prev} cur=${cur}" -- ) ) #return 0 } complete -F _cil cil cil-0.07.00/issues/000077500000000000000000000000001134046543300137435ustar00rootroot00000000000000cil-0.07.00/issues/c_02a9bb68.cil000066400000000000000000000005661134046543300161020ustar00rootroot00000000000000Issue: 85eceee9 CreatedBy: Andrew Chilton Inserted: 2008-06-27T13:18:47 Updated: 2008-06-27T13:20:01 Added the --created-by and --assigned-to filters. These work just on the email address and not the whole field. E.g. $ cil list --created-by=andy@example.com $ cil list --assigned-to=andy@example.org The short options for these are -c and -a. cil-0.07.00/issues/c_043f8971.cil000066400000000000000000000002631134046543300157440ustar00rootroot00000000000000Issue: 5ec585b1 CreatedBy: Andrew Chilton Inserted: 2010-01-23T06:37:08 Updated: 2010-01-23T06:37:20 Now done. Should remove the correct label specified. cil-0.07.00/issues/c_06e0d28c.cil000066400000000000000000000006471134046543300161000ustar00rootroot00000000000000Issue: 574046f9 CreatedBy: Andrew Chilton Inserted: 2008-07-02T10:51:45 Updated: 2008-07-02T10:53:10 Added the ability to use --is-mine. Also, when adding the documnentation, I moved the filters to their own section. Basically, --is-mine takes the email defined in ~/.cilrc and applies it by just overwriting --assigned-by, internally. This is okay since these two options are mutually exclusive. cil-0.07.00/issues/c_0ecf17ae.cil000066400000000000000000000002601134046543300162270ustar00rootroot00000000000000Issue: d3ac4078 CreatedBy: Andrew Chilton Inserted: 2010-02-08T19:07:54 Updated: 2010-02-08T19:07:54 I'll make it an option for the project .cil file. cil-0.07.00/issues/c_146b6b88.cil000066400000000000000000000003541134046543300160240ustar00rootroot00000000000000Issue: 1a5fb257 CreatedBy: Andrew Chilton Inserted: 2010-01-24T11:14:08 Updated: 2010-01-24T11:14:40 Before even doing this issue, the 'depends-on' was being mapped to 'depends_on', so that has also been fixed. cil-0.07.00/issues/c_1d9e3911.cil000066400000000000000000000005401134046543300160150ustar00rootroot00000000000000Issue: f7ce705b CreatedBy: Andrew Chilton Inserted: 2010-01-25T01:31:35 Updated: 2010-01-25T01:31:35 Checks the DependsOn and Precedes so it checks first before adding the other issue. Also, since flag_as_updated() wasn't doing the Updated time, now calls set_updated_now(). Finally, set_no_update() changed to be more sane. cil-0.07.00/issues/c_2b92ef13.cil000066400000000000000000000003011134046543300160650ustar00rootroot00000000000000Issue: cbb43db9 CreatedBy: Andrew Chilton Inserted: 2008-06-22T03:54:13 Updated: 2008-06-22T03:54:13 This has been now been completed and will be released in cil v0.2. cil-0.07.00/issues/c_3da3fd2f.cil000066400000000000000000000002241134046543300162300ustar00rootroot00000000000000Issue: 6b087805 CreatedBy: Andrew Chilton Inserted: 2008-07-03T11:15:33 Updated: 2008-07-03T11:16:26 Done. Pretty easy eh! cil-0.07.00/issues/c_3f088351.cil000066400000000000000000000002361134046543300157400ustar00rootroot00000000000000Issue: 6baa8555 CreatedBy: Andrew Chilton Inserted: 2008-06-28T11:36:19 Updated: 2008-06-28T11:36:42 Work done as part of #85eceee9. cil-0.07.00/issues/c_45cd5e23.cil000066400000000000000000000013351134046543300160760ustar00rootroot00000000000000Issue: 48eaec49 CreatedBy: Francois Marier Inserted: 2008-06-29T00:20:11 Updated: 2008-06-29T12:05:50 On 2008-06-29 at 12:13:49, Andrew Chilton wrote: > Any other thoughts about how it would work? Maybe that enough for now > and we see what happens. Thinking about the use case where I'd want to add a comment on an issue (like what I am doing now about the cil-am command), I think it would be neat if cil-am could detect that. So for example, if you find a cil hash in the body of an email (or the subject line), then it could be added as a comment. The timestamp of the email determining the order. That would be a way to add a comment to an issue without depending on a web interface. [snip] Francois cil-0.07.00/issues/c_47223ac4.cil000066400000000000000000000002611134046543300160060ustar00rootroot00000000000000Issue: 1111d724 CreatedBy: Andrew Chilton Inserted: 2010-01-24T20:51:47 Updated: 2010-01-24T20:52:03 libfile-homedir-perl added to the relevant places. cil-0.07.00/issues/c_4b71d0c3.cil000066400000000000000000000002431134046543300160640ustar00rootroot00000000000000Issue: 85eceee9 CreatedBy: Andrew Chilton Inserted: 2008-06-27T12:40:51 Updated: 2008-06-27T12:40:51 Now added --is-open and --is-closed. cil-0.07.00/issues/c_4d6c02bb.cil000066400000000000000000000004431134046543300161450ustar00rootroot00000000000000Issue: ce8053b0 CreatedBy: Andrew Chilton Inserted: 2008-07-01T11:33:55 Updated: 2008-07-01T11:34:38 Added the ability to read the ~/.cilrc config file. The only things it can contain for now are: * UserName * UserEmail but we can easily add more as time goes on. cil-0.07.00/issues/c_4edba98c.cil000066400000000000000000000005011134046543300162350ustar00rootroot00000000000000Issue: 6baa8555 CreatedBy: Andrew Chilton Inserted: 2008-06-26T12:11:09 Updated: 2008-06-26T12:12:41 Added the following options: * StatusStrict * StatusAllowedList * StatusOpenList * StatusClosedList * LabelStrict * LabelAllowedList The lists are only checked if the strict variables are on. cil-0.07.00/issues/c_5fe9eaea.cil000066400000000000000000000002541134046543300163230ustar00rootroot00000000000000Issue: d0b8bc09 CreatedBy: Andrew Chilton Inserted: 2010-01-23T12:42:07 Updated: 2010-01-23T12:42:17 All tabs and whitespace formatting tidied-up. cil-0.07.00/issues/c_61aea66d.cil000066400000000000000000000003211134046543300161470ustar00rootroot00000000000000Issue: 02ee35bd CreatedBy: Andrew Chilton Inserted: 2008-06-28T11:28:46 Updated: 2008-06-28T11:29:03 This was added as part of Milestone-v0.3. See issue #85eceee9 for further details. cil-0.07.00/issues/c_6287dc43.cil000066400000000000000000000003071134046543300160220ustar00rootroot00000000000000Issue: a7e3b882 CreatedBy: Andrew Chilton Inserted: 2008-07-03T10:17:39 Updated: 2008-07-03T10:18:01 Made sure that nothing is put into the 'AssignedTo' field on new issues. cil-0.07.00/issues/c_6f5bc459.cil000066400000000000000000000012541134046543300161070ustar00rootroot00000000000000Issue: 48eaec49 CreatedBy: Andrew Chilton Inserted: 2008-06-29T12:08:32 Updated: 2008-06-29T12:11:14 Added ability to process an email message. It will either be added as a new issue or as a comment to an existing issue. The process for determining what happens is as follows: * a list of possible issue names is compiled from the subject and body of the email * of those, it checks if any are valid in the current list If any are valid, it will add the email as a comment to that one (if there is only one) or will ask you which to add it to if there are more than one). In the case where there is no valid issues, it will add the email as a new issue. cil-0.07.00/issues/c_70533ec8.cil000066400000000000000000000003421134046543300160160ustar00rootroot00000000000000Issue: 768d9434 CreatedBy: Andrew Chilton Inserted: 2008-07-05T03:08:49 Updated: 2008-07-05T03:09:11 Done. For now it just loops through the comments and attachments, though there is no checking done. cil-0.07.00/issues/c_792a4acf.cil000066400000000000000000000002271134046543300161570ustar00rootroot00000000000000Issue: fb79b2e8 CreatedBy: Andrew Chilton Inserted: 2008-06-22T04:02:46 Updated: 2008-06-22T04:02:46 This has been completed. cil-0.07.00/issues/c_7b75b82c.cil000066400000000000000000000004051134046543300161000ustar00rootroot00000000000000Issue: 41b351fc CreatedBy: Andrew Chilton Inserted: 2008-07-13T10:29:22 Updated: 2008-07-13T10:30:58 Added the initial go at the hook system. It seems to work but until we actually do some, it'll just be a framework for the time being. cil-0.07.00/issues/c_7eb313cd.cil000066400000000000000000000004521134046543300161520ustar00rootroot00000000000000Issue: 85eceee9 CreatedBy: Andrew Chilton Inserted: 2008-06-23T12:07:44 Updated: 2008-06-23T12:07:44 Added both --status and --label. In the case of Status, it tests for equality. In the case of Label, it tests that the issue has at least one label of the one specified. cil-0.07.00/issues/c_7f22c24e.cil000066400000000000000000000003241134046543300160730ustar00rootroot00000000000000Issue: c98515e2 CreatedBy: Andrew Chilton Inserted: 2008-07-02T10:02:11 Updated: 2008-07-02T10:02:38 Added checks in 'fsck' so that it looks at the 'Precedes' and the 'DependsOn' fields. cil-0.07.00/issues/c_81dc204c.cil000066400000000000000000000004271134046543300160710ustar00rootroot00000000000000Issue: c6a8d865 CreatedBy: Andrew Chilton Inserted: 2008-06-27T23:39:55 Updated: 2008-06-27T23:40:49 Added the command 'fsck'. Currently it works okay but it might need looking at in the future for functionality and possible refactoring. Closing issue. cil-0.07.00/issues/c_95e81a14.cil000066400000000000000000000006011134046543300160140ustar00rootroot00000000000000Issue: bf9badb4 CreatedBy: Andrew Chilton Inserted: 2008-07-01T10:59:42 Updated: 2008-07-01T11:00:46 Now allows you to put in issue names as shortened versions of their full names. Also attachment names too. Provisions have already been added in case we want to do comment names too. e.g. cil show cafe cil edit cafe cil extract dead and the like. cil-0.07.00/issues/c_961f2658.cil000066400000000000000000000003011134046543300157420ustar00rootroot00000000000000Issue: df9e14d6 CreatedBy: Andrew Chilton Inserted: 2010-01-23T06:44:34 Updated: 2010-01-23T06:44:49 This whole area is a bit of a mess and needs a little clearing up. cil-0.07.00/issues/c_a8edef8d.cil000066400000000000000000000003741134046543300163320ustar00rootroot00000000000000Issue: a90ad11f CreatedBy: Andrew Chilton Inserted: 2008-07-03T10:48:45 Updated: 2008-07-03T10:49:42 Added a default .cil file when creating a repo. Also allows the '--bare' option so that advanced users can do what they like. cil-0.07.00/issues/c_d49a551f.cil000066400000000000000000000003371134046543300161030ustar00rootroot00000000000000Issue: 52d702df CreatedBy: Andrew Chilton Inserted: 2010-01-24T10:55:41 Updated: 2010-01-24T10:56:09 Hopefully I got everything. Removed from a number of places and changed in the main cil manpage. cil-0.07.00/issues/c_d6ee2369.cil000066400000000000000000000012341134046543300161050ustar00rootroot00000000000000Issue: a90ad11f CreatedBy: Andrew Chilton Inserted: 2008-07-02T12:40:07 Updated: 2008-07-02T12:42:18 Nigel suggested on IRC of using the example .cil file in the manpage if wanting a default file: StatusStrict: 1 StatusAllowedList: New StatusAllowedList: InProgress StatusAllowedList: Finished StatusOpenList: New StatusOpenList: InProgress StatusClosedList: Finished LabelStrict: 1 LabelAllowedList: Type-Enhancement LabelAllowedList: Type-Defect LabelAllowedList: Priority-High LabelAllowedList: Priority-Medium LabelAllowedList: Priority-Low Maybe a 'DefaultAssignedTo' in the .cil file might help. cil-0.07.00/issues/c_d87e016d.cil000066400000000000000000000006261134046543300161040ustar00rootroot00000000000000Issue: c98515e2 CreatedBy: Andrew Chilton Inserted: 2008-07-01T12:16:51 Updated: 2008-07-01T12:29:32 Added the 'DependsOn' and 'Precedes' fields. These are automatically added when using the command line such as: cil depends-on cafebabe feedface cil precedes feedface cafebabe Both of these commands do the same thing. ToDo: add checks for this functionality into 'fsck'. cil-0.07.00/issues/c_d8dd779f.cil000066400000000000000000000004601134046543300161760ustar00rootroot00000000000000Issue: 5c88cb30 CreatedBy: Andrew Chilton Inserted: 2008-06-23T12:36:04 Updated: 2008-06-23T12:36:04 Closing this issue as WontFix since the current solution is good (ie. the 8 char hex number). Will reopen if demand says so and I'll try and get a patch off whoever wants it :-) cil-0.07.00/issues/c_d98c9a37.cil000066400000000000000000000002631134046543300161120ustar00rootroot00000000000000Issue: b5a4ef93 CreatedBy: Andrew Chilton Inserted: 2010-01-22T02:11:30 Updated: 2010-01-22T02:11:48 Added the code for --add and --commit for 'comment'. cil-0.07.00/issues/c_da74ee18.cil000066400000000000000000000002571134046543300161640ustar00rootroot00000000000000Issue: b5a4ef93 CreatedBy: Andrew Chilton Inserted: 2010-01-22T02:07:31 Updated: 2010-01-22T02:07:47 Added the code for --commit and --add for 'add'. cil-0.07.00/issues/c_e9cc10a9.cil000066400000000000000000000003771134046543300161630ustar00rootroot00000000000000Issue: 85eceee9 CreatedBy: Andrew Chilton Inserted: 2008-06-27T13:30:08 Updated: 2008-06-27T13:30:45 Not going to do --has-comments or --has-attachments until someone says that it's actually useful. Closing this but as finished. cil-0.07.00/issues/c_f09a77f4.cil000066400000000000000000000004321134046543300161040ustar00rootroot00000000000000Issue: a5b1eb37 CreatedBy: Andrew Chilton Inserted: 2008-07-02T12:51:27 Updated: 2008-07-02T12:52:08 This was happening because there was only one line for the StatusClosedList. This would happen with some of the other List items too. Should be fixed now. cil-0.07.00/issues/c_f8206d17.cil000066400000000000000000000003201134046543300160120ustar00rootroot00000000000000Issue: b18c21e8 CreatedBy: Andrew Chilton Inserted: 2010-01-23T12:36:20 Updated: 2010-01-23T12:36:40 This issue needs to be cancelled since it's just sitting there and doing nothing. cil-0.07.00/issues/c_feb65ae7.cil000066400000000000000000000006161134046543300162450ustar00rootroot00000000000000Issue: 5c88cb30 CreatedBy: Andrew Chilton Inserted: 2008-06-21T10:57:47 Updated: 2008-06-21T10:57:47 Currently I'm adding the ability for each issue name, comment etc to start with the first 8 hex chars of an MD5 string from the data itself. Therefore, the main problem with having the epoch and possible duplication goes away. This issue can then be given a low priority. cil-0.07.00/issues/i_02ee35bd.cil000066400000000000000000000007151134046543300161600ustar00rootroot00000000000000Summary: Labels should be allowed to have a 'required' set Status: Duplicate CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Priority-Medium Label: Release-v0.1.0 Label: Type-Enhancement Comment: 61aea66d Inserted: 2008-05-05T12:53:38 Updated: 2008-06-28T11:31:35 In the .cil config file, there should a field which determines a 'required' set of labels. e.g. required_labels=against type priority cil-0.07.00/issues/i_03c93e82.cil000066400000000000000000000006441134046543300160300ustar00rootroot00000000000000Summary: Remove the whole VCS.pm stuff, just have a Git.pm at the top level Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Inserted: 2010-01-24T10:17:18 Updated: 2010-01-25T09:55:05 No-one is going to use cil with anything other than Git (well, maybe not using Git at all) so remove all the abstract stuff that isn't needed. cil-0.07.00/issues/i_0e004cde.cil000066400000000000000000000015731134046543300161560ustar00rootroot00000000000000Summary: cil idea: poor man's cilweb Status: New CreatedBy: Francois Marier AssignedTo: Andrew Chilton Inserted: 2008-07-06T20:08:52 Updated: 2008-07-13T05:13:33 Hey Andy, I was gonna refer to one of my issues using Gitorious' gitweb-like interface and then I thought: wait, cil could easily generate an index.html! So how about this: in addition to a README.txt file, the issues directory could also have an index.html file which you'd update: 1- whenever you add/edit an issue using the cil command 2- whenever you ask for it explicitely (kinda like git-update-server-info) or a hook does it before pushing the underlying git repo The index file would contain the output of "cil summary", with relative links to the issues themselves. That way, you can link to that file in your gitweb install and call it your issue tracker! Francois cil-0.07.00/issues/i_1111d724.cil000066400000000000000000000005201134046543300157250ustar00rootroot00000000000000Summary: Make sure libfile-homedir-perl is in Debian packaging Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Comment: 47223ac4 Inserted: 2010-01-23T13:17:50 Updated: 2010-01-24T20:52:13 This also needs to be added to the INSTALLATION file. cil-0.07.00/issues/i_1a5fb257.cil000066400000000000000000000007521134046543300161040ustar00rootroot00000000000000Summary: Make sure depends-on and precedes can --add and --commit Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Comment: 146b6b88 Inserted: 2010-01-24T10:36:07 Updated: 2010-01-24T11:14:40 We need to support the following: $ cil depends-on --add cafebab1 cafebab2 $ cil depends-on --commit cafebab1 cafebab2 $ cil precedes --add cafebab1 cafebab2 $ cil precedes --commit cafebab1 cafebab2 cil-0.07.00/issues/i_1bb8c18d.cil000066400000000000000000000005451134046543300161640ustar00rootroot00000000000000Summary: 'cil init' uses 'git' instead of 'Git' Status: Fixed CreatedBy: Yanick Champoux AssignedTo: Yanick Champoux Inserted: 2008-10-06T23:27:34 Updated: 2008-10-06T23:32:32 When 'cil init' detects that Git is present, it set the VCS to 'git' in the .cil file, while it should be set to 'Git' instead. cil-0.07.00/issues/i_41b351fc.cil000066400000000000000000000012341134046543300160740ustar00rootroot00000000000000Summary: Add some sort of hook system Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.5 Label: Type-Enhancement Comment: 7b75b82c Inserted: 2008-07-13T05:08:27 Updated: 2008-07-13T10:34:43 For example, when you add an issue, you might want to do the following things: * reindex all the issues (for faster search - #98203ce8) * generate an issues/index.html file (for poor man's cilweb - #0e004cde) * make sure Git is tracking things This could be used for all kinds of events, such as: * new issue * change of status * status -> closed * new comment * new attachments * etc cil-0.07.00/issues/i_48eaec49.cil000066400000000000000000000017121134046543300161730ustar00rootroot00000000000000Summary: Add command 'am' Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.4 Label: Type-Enhancement Comment: 45cd5e23 Comment: 6f5bc459 Inserted: 2008-06-28T23:57:56 Updated: 2008-06-29T12:11:14 This command would take a mailbox and apply it as a new bug. It would take the first subject as the summary and the body as the issue decription. Then, each subsequent email would be added as a comment. The Status would be set to 'New' pending another way of doing it. I guess attachments throughout the email thread could also be imported. Depending on how hard this is, we might syphon it off to another issue for another release. There may be other smart things we can do further down the line. For example, maybe we could try and read the Status from the subject line somehow but I think we just implement it straightforward for now and see what suggestions other people have. cil-0.07.00/issues/i_52d702df.cil000066400000000000000000000006701134046543300161040ustar00rootroot00000000000000Summary: The StatusOpenList and StatusClosedList should fully describe what is allowed Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Comment: d49a551f Inserted: 2010-01-23T13:14:45 Updated: 2010-01-24T10:56:40 If we make those two lists fully describe what status can be had, then we can remove the StatusAllowedList from the .cil config file. cil-0.07.00/issues/i_574046f9.cil000066400000000000000000000007131134046543300157550ustar00rootroot00000000000000Summary: Have a filter called '--is-mine' Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.4 Label: Type-Enhancement Comment: 06e0d28c Inserted: 2008-07-02T10:16:59 Updated: 2008-07-02T11:11:44 By having a filter '--is-mine', means it's much easier to type than '--assigned-to=andychilton-at-gmail-dot-com'. cil list --is-open --is-mine That would be pretty nice. cil-0.07.00/issues/i_5c88cb30.cil000066400000000000000000000016571134046543300161140ustar00rootroot00000000000000Summary: Options for issues names needs to be added Status: OnHold CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-Future Label: Priority-Low Label: Type-Enhancement Comment: d8dd779f Comment: feb65ae7 Inserted: 2008-05-05T12:33:19 Updated: 2008-06-26T12:10:32 When issues are created, they are given the epoch as it's name. Instead of just using the epoch, the user should be able to configure the .cil file to use the format of their choice. e.g. issue_name_format=[ epoch | inc | iso-8601 ] Possible name formats include: * an incrementing number * but if cil goes distributed (which was originally planned), will this work? * ISO 8601 - YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00) * do we need to have TZD on the end (though obviously this wouldn't then be ISO 8601) * GUID/UUID like 9e28b50a-cba1-4b20-9276-d30ee727b14a (and maybe others) cil-0.07.00/issues/i_5ec585b1.cil000066400000000000000000000006171134046543300161110ustar00rootroot00000000000000Summary: Add a cil label --remove command Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Comment: 043f8971 Inserted: 2010-01-22T01:41:59 Updated: 2010-01-23T06:37:44 Currently you can 'cil label MyLabel cafebabe' but you can't remove it. Add the following option: $ cil label --remove MyLabel cafebabe cil-0.07.00/issues/i_6b087805.cil000066400000000000000000000007171134046543300157540ustar00rootroot00000000000000Summary: Add a 'steal' command Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.5 Label: Type-Enhancement Comment: 3da3fd2f Inserted: 2008-07-03T10:10:50 Updated: 2008-07-03T11:23:03 A 'cil steal ' command would be helpful to assign issues to yourself. This is just shorthabe for editing an issue and putting your "UserName " into the 'AssignedTo' field. cil-0.07.00/issues/i_6baa8555.cil000066400000000000000000000010261134046543300161030ustar00rootroot00000000000000Summary: Do checking on input fields after adding or editing issue Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Priority-Medium Label: Release-v0.1.0 Label: Type-Enhancement Comment: 3f088351 Comment: 4edba98c Inserted: 2008-05-05T12:46:58 Updated: 2008-06-28T11:36:42 For example, if there is a config item in .cil called 'allowed_statuses', all input values in the 'Status' field should be checked against it. This could also be done for Labels too. cil-0.07.00/issues/i_768d9434.cil000066400000000000000000000015371134046543300157660ustar00rootroot00000000000000Summary: Add a command 'track' Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.5 Label: Type-Enhancement Comment: 70533ec8 Inserted: 2008-07-05T02:58:20 Updated: 2008-07-05T03:09:11 A new command called 'track' would be good so that you can tell 'cil' to tell your CVS which files to track. This means you don't have to keep adding all those issues and/or comments to your repo manually and all the dependecies are done. e.g. $ cil track cafebabe git add issues/i_cafebabe.cil git add issues/c_decaf7ea.cil git add issues/a_deadbeaf.cil Maybe for now it should just print those lines out, but in the future a command line option means to actually do it. In the this state, you could always do: $ cil track cafebabe | sh which would then do it for you. cil-0.07.00/issues/i_85eceee9.cil000066400000000000000000000021751134046543300162650ustar00rootroot00000000000000Summary: Ability to filter the issues lists (summary and list) Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.3 Label: Release-v0.2.0 Label: Type-Enhancement Comment: 02a9bb68 Comment: 4b71d0c3 Comment: 7eb313cd Comment: e9cc10a9 Inserted: 2008-06-23T12:05:33 Updated: 2008-06-27T13:32:59 The ability to filter on various things would be nice. For example using these list commands, though summary should work the same way: $ cil list --status=New $ cil list --status=Assigned $ cil list --status=Finished $ cil list --label=Release-v0.1 $ cil list --label=Type-Enhancement And combining them should be easy: $ cil list --status=Assigned --label=Type-Defect Other options include: $ cil list --assigned-to=andychilton@gmail.com $ cil list --has-attachments --has-comments $ cil list --is-open/closed There may be other options so this issue will be closed when we think we've had enough. Note: whilst filtering on lists is good, actual searching is still better for a lot of things you'd like to do. This will be added as a separate issue. cil-0.07.00/issues/i_98203ce8.cil000066400000000000000000000017141134046543300160340ustar00rootroot00000000000000Summary: Search and indexing should be added to help aid finding issues Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-Future Label: Release-v0.2.1 Label: Type-Enhancement Inserted: 2008-06-23T12:20:45 Updated: 2008-06-26T11:54:39 Some sort of indexing and search should be added to cil so that it is easier to find issues in amongst a long list of them. There have been some suggestions in the past but we want something that is local, doesn't have to be set up and will just create a file right there. Using it should be a matter of just searching (and the re-indexing will happen automatically). Here are some example commands which might be good: # shouldn't be necessary but there should be a way to do it $ cil reindex $ cil search 'Project Blah refactoring' $ cil search 'screenshot table formatting' The search should list results in either the 'summary' or 'list' view. cil-0.07.00/issues/i_9890cf04.cil000066400000000000000000000010471134046543300160340ustar00rootroot00000000000000Summary: Add a field for 'Interested' other users Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Inserted: 2010-02-11T02:50:13 Updated: 2010-02-11T02:50:13 We'll keep it so that there is only ever one assignee (AssignedTo) but other people can become interested in a bug by adding themselfes to that list. Some useful commands would be: $ cil interested cafebabe... $ cil interested --remove cafebabe... Also some filters such as: $ cil summary --is-interested ... and so on. cil-0.07.00/issues/i_99d9dd74.cil000066400000000000000000000015641134046543300161330ustar00rootroot00000000000000Summary: Add a filter '--grep=regex' Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-Future Label: Release-v0.2.1 Label: Type-Enhancement Inserted: 2008-06-24T12:16:57 Updated: 2008-06-27T23:59:48 Having a 'grep' filter would be quite powerful. It could be used in the 'list' and 'summary' commands. It would be good if it accepts Perl regexes and might work a little something like this: Find all issues with 'screenshot' in them: $ cil list --grep=screenshot Find any issue that mentions one of the following: $ cil list --grep=css|html|javascript This one would be directed at the 'CreatedBy' and 'AssignedTo' fields: $ cil list --grep=andychilton@ This one would probably be targeted at the 'Label' field: $ cil list --grep=^Release-v0.2 So accepting Perl regexes would be excellent. cil-0.07.00/issues/i_9b0d3687.cil000066400000000000000000000006411134046543300160330ustar00rootroot00000000000000Summary: Add ability to run some Git commands from some hooks Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Inserted: 2008-07-13T10:35:52 Updated: 2008-07-13T10:39:37 When we add/edit an issue, a comment or an attachment it would be good to be able to run some Git commands to make sure those files are tracked by Git (or the VCS of your choosing). cil-0.07.00/issues/i_9b7f9096.cil000066400000000000000000000006361134046543300160500ustar00rootroot00000000000000Summary: When doing 'cil add', should read ~/.cilrc for AutoAssignSelf option Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Inserted: 2010-01-23T11:48:21 Updated: 2010-01-23T12:11:43 Now that cil reads ~/.cilrc, you can now add 'AutoAssignSelf' to the config and it'll automatically assign any new issues to yourself. cil-0.07.00/issues/i_a5b1eb37.cil000066400000000000000000000014231134046543300161550ustar00rootroot00000000000000Summary: Can't use string ("Finished") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/CIL.pm line 227. Status: Finished CreatedBy: Nigel McNie AssignedTo: Nigel McNie Comment: f09a77f4 Inserted: 2008-07-02T12:27:39 Updated: 2008-07-02T12:52:26 I get this error when running 'cil list --is-open' on my repo. My .cil: StatusStrict: 1 StatusAllowedList: New StatusAllowedList: InProgress StatusAllowedList: Finished StatusOpenList: New StatusOpenList: InProgress StatusClosedList: Finished LabelStrict: 1 LabelAllowedList: Type-Enhancement LabelAllowedList: Type-Defect LabelAllowedList: Priority-High LabelAllowedList: Priority-Medium LabelAllowedList: Priority-Low Do you need more info? How does more info work in cil anyways :) cil-0.07.00/issues/i_a7e3b882.cil000066400000000000000000000006241134046543300161110ustar00rootroot00000000000000Summary: New issues shouldn't be assigned to anyone Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Release-v0.4.0 Label: Type-Defect Comment: 6287dc43 Inserted: 2008-07-03T09:59:59 Updated: 2008-07-03T10:18:36 This came about because a bug submitted by Nigel was AssignedTo him. I think it should be blank to start off with. cil-0.07.00/issues/i_a90ad11f.cil000066400000000000000000000012331134046543300161510ustar00rootroot00000000000000Summary: Write a default .cil file so --commands work Status: Finished CreatedBy: Nigel McNie AssignedTo: Andrew Chilton Comment: a8edef8d Comment: d6ee2369 Inserted: 2008-07-02T12:22:45 Updated: 2008-07-03T10:52:32 When I tried to use cil for the first time, I did: cil init [fix debian packaging :)] cil init cil add cil list --is-open And got no results. Because cil didn't know at that point what statuses counted as 'open'. It would be nice if a default .cil was written out, with just enough statuses etc. in it to make those common --command flags work. You could also add cil init --bare to not write this out. cil-0.07.00/issues/i_b18c21e8.cil000066400000000000000000000006501134046543300161020ustar00rootroot00000000000000Summary: Ongoing maintenance and refactorings Status: Cancelled CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Type-Refactoring Comment: f8206d17 Inserted: 2008-06-29T10:16:39 Updated: 2010-01-23T12:36:49 This issue is so that refactorings can be checked in against a particular issue. This makes it easier to track and see a high level change of what was done. cil-0.07.00/issues/i_b19d5ada.cil000066400000000000000000000016621134046543300162430ustar00rootroot00000000000000Summary: Add a 'cil check-in-git' command Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-Future Label: Release-v0.2.1 Label: Type-Enhancement Inserted: 2008-06-24T03:24:14 Updated: 2008-06-27T13:29:00 The ability to check whether issues/comments/attachments are tracked by Git is important. Or indeed any VCS system. My thoughts are that this command would do something like the following: * internally, it runs "git ls-files issues/" and makes a list of files in that directory * makes a list of issues that are currently contained in the directory * complains if it finds something Git doesn't know about Also, when it runs through each issue, it should do the same for all comments and attachments. It could either output something which tells you you have untracked files or it could give you example git commands which add them to those being tracked. cil-0.07.00/issues/i_b5a4ef93.cil000066400000000000000000000016141134046543300161700ustar00rootroot00000000000000Summary: Add a '--commit' to 'cil add' (plus some others) Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Comment: d98c9a37 Comment: da74ee18 Inserted: 2009-12-23T06:27:27 Updated: 2010-01-22T02:15:23 When adding a new issue, I usually do: $ cil add ... $ git add issues/i_cafebabe.cil $ git commit -m 'cil-cafebabe: New Issue' issues/i_cafebabe.cil To shortcut this, having the following would be nice: $ cil add --commit Also, having the following would also be nice: $ cil comment --add cafebabe to do: $ cil comment cafebabe ... $ cil add issues/i_cafebabe.cil issues/c_deadbeef.cil Maybe review some other commands. e.g: $ cil status --commit InProgress cafebabe $ cil status --add InProgress cafebabe $ cil label --add/commit Milestone-v0.3 cafebabe baadf00d effic0de Should be nice :) cil-0.07.00/issues/i_b6033e30.cil000066400000000000000000000010571134046543300160140ustar00rootroot00000000000000Summary: can't find issues folder Status: Cancelled CreatedBy: Name AssignedTo: Label: Milestone-v0.06 Inserted: 2009-06-06T09:39:09 Updated: 2010-01-21T23:12:50 Description ... I created an issue, while in the issues folder.. it doesn't write it would be nice if it echoed the issue just entered to allow the user to copypaste it it once they were in the right folder agin. brenda@Toshi:~/projects/birdcage/issues$ cil add write_file 'issues/i_1659e495.cil' - sysopen: No such file or directory at /usr/share/perl5/CIL/Utils.pm line 124 cil-0.07.00/issues/i_b8061619.cil000066400000000000000000000006731134046543300157520ustar00rootroot00000000000000Summary: cil add should detect early on if cil init hasn't been run Status: Finished CreatedBy: Andrew Ruthven AssignedTo: Label: Milestone-v0.06 Inserted: 2008-09-22T03:26:21 Updated: 2010-01-21T23:11:51 Currently if you run cil add you can start to create a bug report, hit save and then cil bombs out not being able to create a file inside issues. cil add should detect if issues doesn't exist and complain early on. cil-0.07.00/issues/i_bf35f2c7.cil000066400000000000000000000006471134046543300161740ustar00rootroot00000000000000Summary: Adding a label twice actually does it Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Inserted: 2009-12-05T00:38:49 Updated: 2010-01-22T01:39:51 Take an issue with no labels: $ cil label cafebabe Milestone-v0.1 $ cil label cafebabe Milestone-v0.1 $ cil show cafebabe The label appears twice. This shouldn't happen. cil-0.07.00/issues/i_bf9badb4.cil000066400000000000000000000010401134046543300163140ustar00rootroot00000000000000Summary: Allow shortened hash names Status: Finished CreatedBy: Francois Marier AssignedTo: Andrew Chilton Label: Milestone-v0.4 Label: Type-Enhancement Comment: 95e81a14 Inserted: 2008-06-29T13:20:11 Updated: 2008-07-01T11:15:35 How about doing the same thing that git is doing for commit hashes: if you only type the first few characters of the hash, then as long as it's not ambiguous, git will accept that. So instead of typing cil show 28fb3258 I could just do cil show 28f Francois cil-0.07.00/issues/i_c6a8d865.cil000066400000000000000000000013051134046543300161130ustar00rootroot00000000000000Summary: Add a 'fsck' command Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.3 Label: Type-Enhancement Comment: 81dc204c Inserted: 2008-06-27T13:39:48 Updated: 2008-06-27T23:40:49 When we add issues and their comments and attachments, there is the possibility that you don't actually check in the correct files at the same time. This command will help to figure out whether you have all the files around. This command will also check each command for validity. For example, if you change the 'StatusAllowedList' in your '.cil' file, then this will help determine if there are any issues set to now invalid statuses. cil-0.07.00/issues/i_c77fae7c.cil000066400000000000000000000011671134046543300162570ustar00rootroot00000000000000Summary: Make commit messages nicer when multiple issues are updated Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Inserted: 2010-01-27T23:59:52 Updated: 2010-01-29T05:40:37 When updating the status, label, depends on or precedes (and other things which can happen to multiple issues at any one time), the commit message doesn't say which issues were affected. Since we don't want them all on the same line, we could have a commit message much like the following: Added label 'Milestone-v0.07' * cafebabe * blahblah * issue102 etc cil-0.07.00/issues/i_c98515e2.cil000066400000000000000000000020241134046543300160270ustar00rootroot00000000000000Summary: Allow dependencies between issues Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.4 Label: Type-Enhancement Comment: 7f22c24e Comment: d87e016d Inserted: 2008-07-01T03:23:39 Updated: 2008-07-02T10:03:09 Francois suggested that allowing dependencies between issues would be good. ie. this one here is dependent on that one over there (ie. the other needs to be fixed first). I'd prefer to keep it generic, ie. you set the status to 'DependsOn' and then you refer to the other issue in the description or a comment. If that were the case, then no code changes would be required. But... It sounds like people would want this as a separate field though, so maybe we add it as follows. The top section of each issue would have a new field (if applicable), called "DependsOn" and would refer to the other issue number: DependsOn: cafebabe If we do this, do we need to add a 'Precedes' field to the other issue? I'll ask the others for input. cil-0.07.00/issues/i_cbb43db9.cil000066400000000000000000000006631134046543300162450ustar00rootroot00000000000000Summary: Addition of a 'attach' command Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Priority-Medium Label: Release-v0.1.0 Label: Type-Enhancement Comment: 2b92ef13 Inserted: 2008-05-05T12:20:28 Updated: 2008-06-26T11:55:42 'cil' currently has no way of adding attachments to issues. This should be added so that the actual data cil stores is complete. cil-0.07.00/issues/i_ce8053b0.cil000066400000000000000000000007471134046543300161050ustar00rootroot00000000000000Summary: Ability to have a ~/.cilrc file Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.4 Label: Type-Enhancement Comment: 4d6c02bb Inserted: 2008-06-28T23:44:50 Updated: 2008-07-01T11:34:38 The ability to have a ~/.cilrc file can help with the following: * UserName: An Other * UserEmail me@example.com There are probably other uses too but for now, just getting it used is what's important. cil-0.07.00/issues/i_d05969b6.cil000066400000000000000000000007611134046543300160400ustar00rootroot00000000000000Summary: Make cil read from a ~/.cilrc file for local settings Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Inserted: 2010-01-23T11:22:40 Updated: 2010-01-23T11:46:20 To do things like auto-assigning to yourself, and to override CreatedBy fields, cil should read from a ~/.cilrc file, rather than trying to figure it out from all kinds of places. Doing this would make a lot of other things easier. cil-0.07.00/issues/i_d0b8bc09.cil000066400000000000000000000006201134046543300161550ustar00rootroot00000000000000Summary: Tidy up CIL.pm (and others) of formatting Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Comment: 5fe9eaea Inserted: 2010-01-23T11:40:50 Updated: 2010-01-23T12:42:28 This includes: * whitespace at end of lines * comment separator lines * stupid tabs -> spaces * and other questionable practices cil-0.07.00/issues/i_d3ac4078.cil000066400000000000000000000010721134046543300161010ustar00rootroot00000000000000Summary: Obfuscating (a little bit) email in issues Status: New CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Comment: 0ecf17ae Inserted: 2010-02-08T19:07:02 Updated: 2010-02-08T19:08:07 Issue #1 on GitHub ... Hi, First of all, thanks for this nice piece of code :) My idea, is to mess with email addreses a bit. Presenting them in a form like "user at domain dot com" or just "user at domain.com" isn't really less readable than the standard form, yet it might save our spamfilters some work. Kind regards, Ted cil-0.07.00/issues/i_d4cd6efd.cil000066400000000000000000000010161134046543300163250ustar00rootroot00000000000000Summary: Add some personal config options Status: Cancelled CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Inserted: 2009-12-02T04:11:04 Updated: 2010-01-23T13:08:20 Add the following options: * DefaultAssignedTo * AssignToMe In the first case, if set, this shows who this bug should be assigned to. If this isn't set, it isn't set to anything. If the second is set, AssignedTo is set to the current user. Each of these options may be added to ./.cil or to ~/.cilrc. cil-0.07.00/issues/i_df9e14d6.cil000066400000000000000000000006301134046543300161710ustar00rootroot00000000000000Summary: The CreatedBy field should be autopopulated Status: Finished CreatedBy: Andrew Ruthven AssignedTo: Andrew Chilton Label: Milestone-v0.06 Comment: 961f2658 Inserted: 2008-09-22T03:28:32 Updated: 2010-01-23T12:29:50 The users fullname and username@hostname is probably a reasonable first guess. (DEBNAME and DEBEMAIL environment variables are also good.) cil-0.07.00/issues/i_f7ce705b.cil000066400000000000000000000006531134046543300161720ustar00rootroot00000000000000Summary: Check for duplicate DependsOn and Precedes Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.07 Comment: 1d9e3911 Inserted: 2010-01-24T11:08:48 Updated: 2010-01-25T01:33:36 Cil allows the addition of duplicate precedes. This shouldn't be allowed. It should automatically just not do anything if this combination already exists. cil-0.07.00/issues/i_f8b44370.cil000066400000000000000000000006441134046543300160310ustar00rootroot00000000000000Summary: When adding new issues, the Git comment is 'New Comment' Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.06 Inserted: 2010-01-23T11:52:10 Updated: 2010-01-23T11:56:58 Instead, the message should say 'New '. For this, we'll need the entities to return a user readable string of what it is. cil-0.07.00/issues/i_fb79b2e8.cil000066400000000000000000000006721134046543300162010ustar00rootroot00000000000000Summary: Ability to set Issue Status' from the command line Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Milestone-v0.2 Label: Release-v0.1.0 Label: Type-Enhancement Comment: 792a4acf Inserted: 2008-06-22T04:00:20 Updated: 2008-06-26T11:56:03 The ability to do something like the following would be good. $ cil status cafebabe Finished would be rather cool. cil-0.07.00/lib/000077500000000000000000000000001134046543300131765ustar00rootroot00000000000000cil-0.07.00/lib/CIL.pm000066400000000000000000000216601134046543300141500ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL; use strict; use warnings; use Carp qw(croak confess); use File::Glob qw(:glob); use File::HomeDir; use CIL::Git; use vars qw( $VERSION ); $VERSION = '0.07.00'; use Module::Pluggable sub_name => 'commands', search_path => [ 'CIL::Command' ], require => 1; use base qw(Class::Accessor); __PACKAGE__->mk_accessors(qw( IssueDir StatusStrict StatusAllowed StatusOpen StatusClosed LabelStrict LabelAllowed DefaultNewStatus UseGit UserName UserEmail AutoAssignSelf git hook )); my $defaults = { IssueDir => 'issues', # the dir to save the issues in StatusStrict => 0, # whether to complain if a status is invalid LabelStrict => 0, # whether to complain if a label is invalid DefaultNewStatus => 'New', # What Status to use for new issues by default UseGit => 0, # don't do anything with Git }; my @config_hashes = qw(StatusOpen StatusClosed LabelAllowed); my $defaults_user = { UserName => eval { Git->repository->config( 'user.name' ) } || 'UserName', UserEmail => eval { Git->repository->config( 'user.email' ) } || 'username@example.org', AutoAssignSelf => 0, }; my $allowed = { hook => { 'issue_post_save' => 1, }, }; ## ---------------------------------------------------------------------------- sub new { my ($proto, $cfg) = @_; $cfg ||= {}; my $class = ref $proto || $proto; my $self = bless {}, $class; # save the settings for various bits of info foreach my $key ( keys %$defaults ) { # if we have been passed it in, use it, else use the default $self->$key( $cfg->{$key} || $defaults->{$key} ); } return $self; } sub command_names { return map { $_->name } $_[0]->commands; } sub list_entities { my ($self, $prefix, $base) = @_; $base = '' unless defined $base; my $globpath = $self->IssueDir . "/${prefix}_${base}*.cil"; my @filenames = bsd_glob($globpath); my @entities; foreach my $filename ( sort @filenames ) { my ($name) = $filename =~ m{/${prefix}_(.*)\.cil$}xms; push @entities, { name => $name, filename => $filename, }; } return \@entities; } sub list_issues { my ($self) = @_; return $self->list_entities('i'); } sub list_comments { my ($self) = @_; return $self->list_entities('c'); } sub list_attachments { my ($self) = @_; return $self->list_entities('a'); } sub list_issues_fuzzy { my ($self, $partial_name) = @_; return $self->list_entities('i', $partial_name); } sub list_comments_fuzzy { my ($self, $partial_name) = @_; return $self->list_entities('c', $partial_name); } sub list_attachments_fuzzy { my ($self, $partial_name) = @_; return $self->list_entities('a', $partial_name); } sub get_issues { my ($self) = @_; my $issue_list = $self->list_issues(); my @issues; foreach my $issue ( @$issue_list ) { push @issues, CIL::Issue->new_from_name( $self, $issue->{name} ); } return \@issues; } sub get_comments { my ($self) = @_; my $comment_list = $self->list_comments(); my @comments; foreach my $comment ( @$comment_list ) { push @comments, CIL::Comment->new_from_name( $self, $comment->{name} ); } return \@comments; } sub get_attachments { my ($self) = @_; my $attachment_list = $self->list_attachments(); my @attachments; foreach my $attachment ( @$attachment_list ) { push @attachments, CIL::Attachment->new_from_name( $self, $attachment->{name} ); } return \@attachments; } sub get_comments_for { my ($self, $issue) = @_; my @comments; foreach my $comment_name ( @{$issue->CommentList} ) { my $comment = CIL::Comment->new_from_name( $self, $comment_name ); push @comments, $comment; } # sort them in cronological order @comments = sort { $a->Inserted cmp $b->Inserted } @comments; return \@comments; } sub get_attachments_for { my ($self, $issue) = @_; my @attachments; foreach my $attachment_name ( @{$issue->AttachmentList} ) { my $attachment = CIL::Attachment->new_from_name( $self, $attachment_name ); push @attachments, $attachment; } # sort them in cronological order @attachments = sort { $a->Inserted cmp $b->Inserted } @attachments; return \@attachments; } sub read_config_user { my ($self) = @_; my $filename = File::HomeDir->my_home() . '/.cilrc'; # firstly, set the default config my $cfg; %$cfg = %$defaults_user; # then read the ~/.cilrc file if ( -f $filename ) { $cfg = CIL::Utils->parse_cil_file( $filename ); } # for some settings, see if we can get it from Git $cfg->{UserName} = eval { Git->repository->config( 'user.name' ) } || $cfg->{UserName}; $cfg->{UserEmail} = eval { Git->repository->config( 'user.email' ) } || $cfg->{UserEmail}; # save them all internally foreach ( qw(UserName UserEmail AutoAssignSelf) ) { $self->$_( $cfg->{$_} || $defaults_user->{$_} ); } } sub read_config_file { my ( $self ) = @_; my $filename = '.cil'; # since we might not have a '.cil' file yet (in the case where we're calling 'init', # then we should just return whatever the defaults are my $cfg; if ( -f $filename ) { $cfg = CIL::Utils->parse_cil_file( $filename ); %$cfg = (%$defaults, %$cfg); } else { # set some defaults if we don't have a .cil file $cfg = $defaults; } # for some things, make a hash out of them foreach my $hash_name ( @config_hashes ) { # if we have nothing in the cfg hash already, set it to empty and move on unless ( exists $cfg->{"${hash_name}List"} ) { $cfg->{$hash_name} = {}; next; } # if we only have a single item, turn it into an array first my $key = "${hash_name}List"; $cfg->{$key} = [ $cfg->{$key} ] unless ref $cfg->{$key} eq 'ARRAY'; # loop through all the items making up the hash my $h = {}; $h->{$_} = 1 for @{ $cfg->{$key} }; $cfg->{$hash_name} = $h; undef $cfg->{$key}; } # set each config item $self->IssueDir( $cfg->{IssueDir} ); $self->UseGit( $cfg->{UseGit} ); # Status info $self->StatusStrict( $cfg->{StatusStrict} ); $self->StatusOpen( $cfg->{StatusOpen} ); $self->StatusClosed( $cfg->{StatusClosed} ); # make the StatusAllowed list the sum of StatusOpen and StatusClosed $self->StatusAllowed( { %{$cfg->{StatusOpen}}, %{$cfg->{StatusClosed}} } ); # Label Info $self->LabelStrict( $cfg->{LabelStrict} ); $self->LabelAllowed( $cfg->{LabelAllowed} ); $self->DefaultNewStatus( $cfg->{DefaultNewStatus} ); # create the git instance if we want it $self->UseGit( $cfg->{UseGit} || 0 ); if ( $self->UseGit ) { $self->git( CIL::Git->new() ); } } sub register_hook { my ($self, $hook_name, $code) = @_; unless ( defined $allowed->{hook}{$hook_name} ) { croak "hook '$hook_name' not allowed"; } push @{$self->{hook}{$hook_name}}, $code; } sub run_hook { my ($self, $hook_name, @rest) = @_; unless ( defined $allowed->{hook}{$hook_name} ) { croak "hook '$hook_name' not allowed"; } # call all the hooks with all the args if ( ref $self->hook eq 'HASH' ) { foreach my $code ( @{$self->hook->{$hook_name}} ) { &$code( $self, @rest ); } } } sub file_exists { my ($self, $filename) = @_; return -f $filename; } sub dir_exists { my ($self, $dir) = @_; return -d $dir; } sub parse_cil_file { my ($self, $filename, $last_field) = @_; return CIL::Utils->parse_cil_file($filename, $last_field); } sub save { my ($self, $filename, $data, @fields) = @_; return CIL::Utils->write_cil_file( $filename, $data, @fields ); } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/000077500000000000000000000000001134046543300136055ustar00rootroot00000000000000cil-0.07.00/lib/CIL/Attachment.pm000066400000000000000000000045021134046543300162340ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Attachment; use strict; use warnings; use Carp; use MIME::Base64; use base qw(CIL::Base); # fields specific to Attachment __PACKAGE__->mk_accessors(qw(Issue Filename Size File)); # all fields my @FIELDS = ( qw(Issue Filename Size CreatedBy Inserted Updated File) ); ## ---------------------------------------------------------------------------- sub new { my ($proto, $name) = @_; croak 'please provide an attachment name' unless defined $name; my $class = ref $proto || $proto; my $self = {}; bless $self, $class; $self->set_name( $name ); $self->{data} = { Issue => '', Filename => '', Size => '', CreatedBy => '', Inserted => '', Updated => '', File => '', }; $self->{Changed} = 0; $self->set_inserted_now; return $self; } sub set_file_contents { my ($self, $contents) = @_; # $contents will be binary $self->{data}{File} = encode_base64( $contents ); } sub as_binary { my ($self) = @_; return decode_base64( $self->{data}{File} ); } sub prefix { return 'a'; } sub type { return 'Attachment'; } sub fields { return \@FIELDS; } sub array_fields { return {}; } sub last_field { return 'File'; } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Base.pm000066400000000000000000000131501134046543300150150ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Base; use strict; use warnings; use Carp; use DateTime; use CIL::Utils; use base qw(Class::Accessor); __PACKAGE__->mk_accessors(qw(CreatedBy Inserted Updated)); ## ---------------------------------------------------------------------------- sub new_from_name { my ($class, $cil, $name) = @_; croak 'provide a name' unless defined $name; my $filename = $class->filename($cil, $name); croak "filename '$filename' does no exist" unless $cil->file_exists($filename); my $data = $cil->parse_cil_file($filename, $class->last_field); my $issue = $class->new_from_data( $name, $data ); return $issue; } sub new_from_data { my ($class, $name, $data) = @_; croak 'please provide an issue name' unless defined $name; # ToDo: check we have all the other correct fields # create the issue my $self = $class->new( $name ); my $fields = $class->fields(); my $array_fields = $class->array_fields(); # save each field foreach my $field ( @$fields ) { next unless defined $data->{$field}; # make it an array if it should be one if ( exists $array_fields->{$field} and ref $data->{$field} ne 'ARRAY' ) { $data->{$field} = [ $data->{$field} ]; } # modify the data directly, otherwise Updated will kick in $self->set_no_update($field, $data->{$field}); } $self->set_no_update('Changed', 0); $self->set_no_update('Updated', $data->{Updated}); return $self; } sub new_from_fh { my ($class, $name, $fh) = @_; croak 'please provide name' unless defined $name; my $data = CIL::Utils->parse_from_fh( $fh, $class->last_field ); return $class->new_from_data( $name, $data ); } sub set_data { my ($self, $data) = @_; # loop through all the allowed fields my $fields = $self->fields(); my $array_fields = $self->array_fields(); # save each field foreach my $field ( @$fields ) { next unless defined $data->{$field}; # make it an array if it should be one if ( exists $array_fields->{$field} and ref $data->{$field} ne 'ARRAY' ) { $data->{$field} = [ $data->{$field} ]; } # modify the data directly, otherwise Updated will kick in $self->set_no_update($field, $data->{$field}); } $self->set_no_update('Changed', 1); $self->{data} = $data; } sub save { my ($self, $cil) = @_; my $filename = $self->filename($cil, $self->name); my $fields = $self->fields(); $cil->save( $filename, $self->{data}, @$fields ); } sub as_output { my ($self) = @_; my $fields = $self->fields(); return CIL::Utils->format_data_as_output( $self->{data}, @$fields ); } sub filename { my ($class, $cil, $name) = @_; # create the filename from it's parts my $prefix = $class->prefix(); my $issue_dir = $cil->IssueDir; my $filename = "${issue_dir}/${prefix}_${name}.cil"; return $filename; } # override Class::Accessor's get sub get { my ($self, $field) = @_; croak "provide a field name" unless defined $field; $self->{data}{$field}; } # override Class::Accessor's set sub set { my ($self, $field, $value) = @_; croak "provide a field name" unless defined $field; my $orig = $self->get($field); # finish if both are defined and they're the same if ( defined $orig and defined $value ) { return if $orig eq $value; } # finish if neither are defined return unless ( defined $orig or defined $value ); # since we're actually changing the field, say we updated something $self->{data}{$field} = $value; $self->set_updated_now; } # so that we can update fields without 'Updated' being changed sub set_no_update { my ($self, $field, $value) = @_; $self->{data}{$field} = $value; } sub set_inserted_now { my ($self) = @_; my $time = DateTime->now->iso8601; $self->{data}{Inserted} = $time; $self->{data}{Updated} = $time; $self->{Changed} = 1; } sub set_updated_now { my ($self) = @_; my $time = DateTime->now->iso8601; $self->{data}{Updated} = $time; $self->{Changed} = 1; } sub flag_as_updated { my ($self) = @_; $self->{Changed} = 1; } sub changed { my ($self) = @_; return $self->{Changed}; } sub set_name { my ($self, $name) = @_; croak 'provide a name' unless defined $name; $self->{name} = $name; } sub name { my ($self) = @_; return $self->{name}; } sub errors { my $self = shift; if( @_ ) { $self->{errors} = $_[0]; } return $self->{errors}; } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command.pm000066400000000000000000000003271134046543300155230ustar00rootroot00000000000000package CIL::Command; use strict; use warnings; sub name { my $self = shift; my $name = lc( ref $self || $self ); $name =~ s/^CIL::Command:://i; return $name; } 'end of package CIL::Command'; cil-0.07.00/lib/CIL/Command/000077500000000000000000000000001134046543300151635ustar00rootroot00000000000000cil-0.07.00/lib/CIL/Command/Add.pm000066400000000000000000000036731134046543300162220ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Add; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'add' } sub run { my ($self, $cil, $args, @argv) = @_; CIL::Utils->ensure_interactive(); my $user = CIL::Utils->user($cil); my $issue = CIL::Issue->new('tmpname'); $issue->Summary( join ' ', @argv ); $issue->Status($cil->DefaultNewStatus); $issue->CreatedBy( $user ); $issue->AssignedTo( $user ) if ( $args->{mine} or $cil->AutoAssignSelf ); $issue->Description("Description ..."); $issue = CIL::Utils->add_issue_loop($cil, undef, $issue); if ( $cil->UseGit ) { # if we want to add or commit this issue if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); } # if we want to commit this issue if ( $args->{commit} ) { $cil->git->commit( $cil, 'New Issue', $issue ); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Am.pm000066400000000000000000000112021134046543300160520ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Am; use strict; use warnings; use File::Slurp qw(read_file write_file); use Email::Date qw(find_date); use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'am' } sub run { my ($self, $cil, $args, $email_filename) = @_; unless ( -r $email_filename ) { CIL::Utils::fatal("couldn't load email '$email_filename'"); } my $msg_text = read_file($email_filename); my $email = Email::Simple->new($msg_text); unless ( defined $email ) { CIL::Utils::fatal("email file '$email_filename' didn't look like an email"); } # extract some fields my $subject = $email->header('Subject'); my $from = $email->header('From'); my $date = find_date($email)->datetime; my $body = $email->body; # see if we can find any issue names in either the subject or the body my @issue_names; foreach my $text ( $subject, $body ) { my @new = ( $text =~ /\b\#?([0-9a-f]{8})\b/gxms ); push @issue_names, @new; } CIL::Utils->msg("Found possible issue names in email: ", ( join(' ', @issue_names) || '[none]' )); my %issue; foreach ( @issue_names ) { my $i = eval { CIL::Issue->new_from_name($cil, $_) }; next unless defined $i; $issue{$i->name} = $i; } if ( keys %issue ) { CIL::Utils->msg( "Found actual issues: " . (join(' ', keys %issue)) ); # create the new comment my $comment = CIL::Comment->new('tmpname'); $comment->Issue( '...' ); $comment->CreatedBy( $from ); $comment->Inserted( $date ); # $comment->Updated( $date ); $comment->Description( $body ); # display CIL::Utils->display_comment($cil, $comment); # found at least one issue, so this might be a comment my $issue; if ( keys %issue == 1 ) { $issue = (values %issue)[0]; } else { if ( $args->{batch} ) { CIL::Utils->fatal('Cannot add to an existing message (in batch mode) when there are multiple matched messages!'); } my $ans = CIL::Utils::ans('To which issue would you like to add this comment: '); # ToDo: decide whether we let them choose an arbitrary issue, for # now quit unless they choose one from the list return unless exists $issue{$ans}; # got a valid issue_name, so set the parent name $issue = $issue{$ans}; } # set the parent issue $comment->Issue( $issue->name ); CIL::Utils->add_comment_loop($cil, undef, $issue, $comment); } else { CIL::Utils->msg("Couldn't find reference to any issues in the email."); # no issue found so make up the issue first my $issue = CIL::Issue->new('tmpname'); $issue->Summary( $subject ); $issue->Status($cil->DefaultNewStatus); $issue->CreatedBy( $from ); $issue->AssignedTo( CIL::Utils->user($cil) ); $issue->Inserted( $date ); $issue->Updated( $date ); $issue->Description( $body ); # display CIL::Utils->display_issue_full($cil, $issue); # then ask if the user would like to add it CIL::Utils->msg("Couldn't find any likely issues, so this might be a new one."); if ( $args->{batch} ) { CIL::Utils->msg('Running in batch mode, so just adding mail as a new issue'); } else { my $ans = CIL::Utils::ans('Would you like to add this message as an issue shown above (y/n): '); return unless $ans eq 'y'; } CIL::Utils->add_issue_loop($cil, undef, $issue); } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Attach.pm000066400000000000000000000052521134046543300167310ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Attach; use strict; use warnings; use base qw(CIL::Command); use File::Basename; use File::Slurp; use Digest::MD5 qw(md5_hex); ## ---------------------------------------------------------------------------- sub name { 'attach' } sub run { my ($self, $cil, undef, $issue_name, $filename) = @_; my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); # check to see if the file exists unless ( -r $filename ) { $cil->fatal("couldn't read file '$filename'"); } my $basename = basename( $filename ); my $user = CIL::Utils->user($cil); my $add_attachment_text = <<"EOF"; Filename : $basename CreatedBy : $user File goes here ... this will be overwritten. EOF # read in the new issue text CIL::Utils->ensure_interactive(); my $fh = CIL::Utils->solicit( $add_attachment_text ); my $attachment = CIL::Attachment->new_from_fh( 'tmp', $fh ); unless ( defined $attachment ) { $cil->fatal("could not create new attachment"); } # now add the file itself my $contents = read_file( $filename ); $attachment->set_file_contents( $contents ); # set the size my ($size) = (stat($filename))[7]; $attachment->Size( $size ); # we've got the attachment, so let's name it my $unique_str = time . $attachment->Inserted . $attachment->File; $attachment->set_name( substr(md5_hex($unique_str), 0, 8) ); # finally, tell it who it's parent is and then save $attachment->Issue( $issue->name ); $attachment->save($cil); # add the comment to the issue, update it's timestamp and save it out $issue->add_attachment( $attachment ); $issue->save($cil); CIL::Utils->display_issue_full($cil, $issue); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Comment.pm000066400000000000000000000037411134046543300171300ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Comment; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'comment' } sub run { my ($self, $cil, $args, $issue_name) = @_; my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); CIL::Utils->ensure_interactive(); # create the new comment my $comment = CIL::Comment->new('tmpname'); $comment->Issue( $issue->name ); $comment->CreatedBy( CIL::Utils->user($cil) ); $comment->Description("Description ..."); $comment = CIL::Utils->add_comment_loop($cil, undef, $issue, $comment); if ( $cil->UseGit ) { # if we want to add or commit this comment if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); $cil->git->add( $cil, $comment ); } # if we want to commit this comment if ( $args->{commit} ) { $cil->git->commit( $cil, 'New Comment', $issue, $comment ); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/DependsOn.pm000066400000000000000000000037361134046543300174110ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::DependsOn; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'depends-on' } sub run { my ($self, $cil, $args, $issue_name, $depends_name) = @_; my $issue = CIL::Utils->load_issue_fuzzy($cil, $issue_name); my $depends = CIL::Utils->load_issue_fuzzy($cil, $depends_name); $issue->add_depends_on( $depends->name ); $depends->add_precedes( $issue->name ); $issue->save($cil); $depends->save($cil); if ( $cil->UseGit ) { # if we want to add or commit this change if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); $cil->git->add( $cil, $depends ); } # if we want to commit this change if ( $args->{commit} ) { my $message = 'Issue ' . $issue->name . ' has a new dependent ' . $depends->name; $cil->git->commit_multiple( $cil, $message, $issue, $depends ); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Edit.pm000066400000000000000000000047141134046543300164140ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Edit; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- my $y = 'y'; ## ---------------------------------------------------------------------------- sub name { 'edit' } sub run { my ($self, $cil, $args, $issue_name) = @_; my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); CIL::Utils->ensure_interactive(); my $edit = $y; # keep going until we get a valid issue or we want to quit while ( $edit eq $y ) { # read in the new issue text my $fh = CIL::Utils->solicit( $issue->as_output ); $issue = CIL::Issue->new_from_fh( $issue->name, $fh ); # check if the issue is valid if ( $issue->is_valid($cil) ) { $edit = 'n'; } else { CIL::Utils->msg($_) foreach @{ $issue->errors }; $edit = CIL::Utils::ans('Would you like to re-edit (y/n): '); } } # if the issue is still invalid, they quit without correcting it return unless $issue->is_valid( $cil ); # save it $issue->save($cil); if ( $cil->UseGit ) { # if we want to add or commit this issue if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); } # if we want to commit this issue if ( $args->{commit} ) { $cil->git->commit( $cil, 'Issue Edited', $issue ); } } CIL::Utils->display_issue($cil, $issue); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Extract.pm000066400000000000000000000026631134046543300171420ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Extract; use strict; use warnings; use base qw(CIL::Command); use File::Slurp qw(write_file); ## ---------------------------------------------------------------------------- sub name { 'extract' } sub run { my ($self, $cil, $args, $attachment_name) = @_; my $attachment = CIL::Utils->load_attachment_fuzzy($cil, $attachment_name); my $filename = $args->{f} || $attachment->Filename(); write_file( $filename, $attachment->as_binary ); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Fsck.pm000066400000000000000000000153631134046543300164170ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Fsck; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'fsck' } sub run { my ($self, $cil, $args) = @_; # this looks at all the issues it can find and checks for: # * validity # * all the comments are there # * all the attachments are there # then it checks each individual comment/attachment for: # * ToDo: validity # * it's parent exists # find all the issues, comments and attachments my $issues = $cil->get_issues(); my $issue = {}; foreach my $i ( @$issues ) { $issue->{$i->name} = $i; } my $comments = $cil->get_comments(); my $comment = {}; foreach my $c ( @$comments ) { $comment->{$c->name} = $c; } my $attachments = $cil->get_attachments(); my $attachment = {}; foreach my $a ( @$attachments ) { $attachment->{$a->name} = $a; } # ------ # issues my $errors = {}; if ( @$issues ) { foreach my $i ( sort { $a->Inserted cmp $b->Inserted } @$issues ) { my $name = $i->name; unless ( $i->is_valid($cil) ) { foreach ( @{ $i->errors } ) { push @{$errors->{$name}}, $_; } } # check that all it's comments are there and that they have this parent my $comments = $i->CommentList; foreach my $c ( @$comments ) { # see if this comment exists at all if ( exists $comment->{$c} ) { # check the parent is this issue push @{$errors->{$name}}, "comment '$c' is listed under issue '" . $i->name . "' but does not reciprocate" unless $comment->{$c}->Issue eq $i->name; } else { push @{$errors->{$name}}, "comment '$c' listed in issue '" . $i->name . "' does not exist"; } } # check that all it's attachments are there and that they have this parent my $attachments = $i->AttachmentList; foreach my $a ( @$attachments ) { # see if this attachment exists at all if ( exists $attachment->{$a} ) { # check the parent is this issue push @{$errors->{$name}}, "attachment '$a' is listed under issue '" . $i->name . "' but does not reciprocate" unless $attachment->{$a}->Issue eq $i->name; } else { push @{$errors->{$name}}, "attachment '$a' listed in issue '" . $i->name . "' does not exist"; } } # check that all it's 'DependsOn' are there and that they have this under 'Precedes' my $depends_on = $i->DependsOnList; foreach my $d ( @$depends_on ) { # see if this issue exists at all if ( exists $issue->{$d} ) { # check the 'Precedes' is this issue my %precedes = map { $_ => 1 } @{$issue->{$d}->PrecedesList}; push @{$errors->{$name}}, "issue '$d' should precede '" . $i->name . "' but doesn't" unless exists $precedes{$i->name}; } else { push @{$errors->{$name}}, "issue '$d' listed as a dependency of issue '" . $i->name . "' does not exist"; } } # check that all it's 'Precedes' are there and that they have this under 'DependsOn' my $precedes = $i->PrecedesList; foreach my $p ( @$precedes ) { # see if this issue exists at all if ( exists $issue->{$p} ) { # check the 'DependsOn' is this issue my %depends_on = map { $_ => 1 } @{$issue->{$p}->DependsOnList}; push @{$errors->{$name}}, "issue '$p' should depend on '" . $i->name . "' but doesn't" unless exists $depends_on{$i->name}; } else { push @{$errors->{$name}}, "issue '$p' listed as preceding issue '" . $i->name . "' does not exist"; } } } } print_fsck_errors('Issue', $errors); # -------- # comments $errors = {}; # loop through all the comments if ( @$comments ) { # check that their parent issues exist foreach my $c ( sort { $a->Inserted cmp $b->Inserted } @$comments ) { # check that the parent of each comment exists unless ( exists $issue->{$c->Issue} ) { push @{$errors->{$c->name}}, "comment '" . $c->name . "' refers to issue '" . $c->Issue . "' but issue does not exist"; } } } print_fsck_errors('Comment', $errors); # ----------- # attachments $errors = {}; # loop through all the attachments if ( @$attachments ) { # check that their parent issues exist foreach my $a ( sort { $a->Inserted cmp $b->Inserted } @$attachments ) { # check that the parent of each attachment exists unless ( exists $issue->{$a->Issue} ) { push @{$errors->{$a->name}}, "attachment '" . $a->name . "' refers to issue '" . $a->Issue . "' but issue does not exist"; } } } print_fsck_errors('Attachment', $errors); # ------------ # nothing left CIL::Utils->separator(); } sub print_fsck_errors { my ($entity, $errors) = @_; return unless keys %$errors; CIL::Utils->separator(); foreach my $issue_name ( keys %$errors ) { CIL::Utils->title( "$entity $issue_name "); foreach my $error ( @{$errors->{$issue_name}} ) { CIL::Utils->msg("* $error"); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Init.pm000066400000000000000000000062251134046543300164310ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Init; use strict; use warnings; use File::Slurp qw(read_file write_file); use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'init' } sub run { my ($self, $cil, $args) = @_; my $path = $args->{p} || '.'; # default path is right here # error if $path doesn't exist unless ( -d $path ) { CIL::Utils->fatal("path '$path' doesn't exist"); } # error if issues/ already exists my $issues_dir = "$path/issues"; if ( -d $issues_dir ) { CIL::Utils->fatal("issues directory '$issues_dir' already exists, not initialising issues"); } # error if .cil already exists my $config = "$path/.cil"; if ( -f $config ) { CIL::Utils->fatal("config file '$config' already exists, not initialising issues"); } # try to create the issues/ dir unless ( mkdir $issues_dir ) { CIL::Utils->fatal("Couldn't create '$issues_dir' directory: $!"); } # are we in a Git repository? my $use_git = 0; if ( -d '.git' ) { CIL::Utils->msg( 'git repository detected, setting to use it' ); $use_git = 1; } # create a .cil file here also if ( $args->{bare} ) { unless ( touch $config ) { rmdir $issues_dir; CIL::Utils->fatal("couldn't create a '$config' file"); } } else { # write a default .cil file write_file($config, <<"CONFIG"); UseGit: $use_git StatusStrict: 1 StatusOpenList: New StatusOpenList: InProgress StatusClosedList: Finished DefaultNewStatus: New LabelStrict: 1 LabelAllowedList: Type-Enhancement LabelAllowedList: Type-Defect LabelAllowedList: Priority-High LabelAllowedList: Priority-Medium LabelAllowedList: Priority-Low CONFIG } # add a README.txt so people know what this is about unless ( -f "$issues_dir/README.txt" ) { write_file("$issues_dir/README.txt", <<'README'); This directory is used by CIL to track issues and feature requests. The home page for CIL is at http://www.chilts.org/projects/cil/ README } # $path/issues/ and $path/.cil create correctly CIL::Utils->msg("initialised empty issue list inside '$path/'"); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Label.pm000066400000000000000000000045651134046543300165520ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Label; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'label' } sub run { my ($self, $cil, $args, $label, @issue_names) = @_; unless ( defined $label ) { CIL::Utils->fatal("provide a valid label to add to this issue"); } my @issues; # for every issue foreach my $issue_name ( @issue_names ) { # firstly, read the issue in my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); # decide whether we are adding or removing this label if ( $args->{remove} ) { $issue->remove_label( $label ); } else { $issue->add_label( $label ); } # save $issue->save($cil); if ( $cil->UseGit ) { # if we want to add or commit this issue if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); } } push @issues, $issue; } if ( $cil->UseGit ) { # if we want to commit these issues if ( $args->{commit} ) { if ( $args->{remove} ) { $cil->git->commit_multiple( $cil, "Removed label '$label'", @issues ); } else { $cil->git->commit_multiple( $cil, "Added label '$label'", @issues ); } } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/List.pm000066400000000000000000000032171134046543300164370ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::List; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'list' } sub run { my ($self, $cil, $args) = @_; CIL::Utils->check_paths($cil); # find all the issues my $issues = $cil->get_issues(); $issues = CIL::Utils->filter_issues( $cil, $issues, $args ); if ( @$issues ) { foreach my $issue ( sort { $a->Inserted cmp $b->Inserted } @$issues ) { CIL::Utils->separator(); CIL::Utils->display_issue_headers($issue); } CIL::Utils->separator(); } else { CIL::Utils->msg('no issues found'); } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Precedes.pm000066400000000000000000000037321134046543300172600ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Precedes; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'precedes' } sub run { my ($self, $cil, $args, $issue_name, $precedes_name) = @_; my $issue = CIL::Utils->load_issue_fuzzy($cil, $issue_name); my $precedes = CIL::Utils->load_issue_fuzzy($cil, $precedes_name); $issue->add_precedes( $precedes->name ); $precedes->add_depends_on( $issue->name ); $issue->save($cil); $precedes->save($cil); if ( $cil->UseGit ) { # if we want to add or commit this change if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); $cil->git->add( $cil, $precedes ); } # if we want to commit this change if ( $args->{commit} ) { my $message = 'Issue ' . $issue->name . ' precedes ' . $precedes->name; $cil->git->commit_multiple( $cil, $message, $issue, $precedes ); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Show.pm000066400000000000000000000025351134046543300164460ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Show; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'show' } sub run { my ($self, $cil, undef, $issue_name) = @_; # firstly, read the issue in my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); CIL::Utils->display_issue_full($cil, $issue); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Status.pm000066400000000000000000000041641134046543300170110ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Status; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'status' } sub run { my ($self, $cil, $args, $status, @issue_names) = @_; unless ( defined $status ) { CIL::Utils->fatal("provide a valid status to set this issue to"); } my @issues; # for every issue, read it it and set the Status foreach my $issue_name ( @issue_names ) { # firstly, read the issue in my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); # set the label for this issue $issue->Status( $status ); $issue->save($cil); # if we want to add or commit this issue if ( $cil->UseGit ) { if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); } } push @issues, $issue; } if ( $cil->UseGit ) { # if we want to commit these issues if ( $args->{commit} ) { my $message = "Status changed to '$status'"; $cil->git->commit_multiple( $cil, $message, @issues ); } } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Steal.pm000066400000000000000000000035051134046543300165740ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Steal; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'steal' } sub run { my ($self, $cil, $args, $issue_name) = @_; # firstly, read the issue in my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); # set the AssignedTo for this issue to you (because you're stealing it) $issue->AssignedTo( CIL::Utils->user($cil) ); $issue->save($cil); if ( $cil->UseGit ) { # if we want to add or commit this issue if ( $args->{add} or $args->{commit} ) { $cil->git->add( $cil, $issue ); } # if we want to commit this issue if ( $args->{commit} ) { $cil->git->commit( $cil, 'Issue Stolen', $issue ); } } CIL::Utils->display_issue_full($cil, $issue); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Summary.pm000066400000000000000000000031521134046543300171570ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Summary; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'summary' } sub run { my ($self, $cil, $args) = @_; CIL::Utils->check_paths($cil); # find all the issues my $issues = $cil->get_issues(); $issues = CIL::Utils->filter_issues( $cil, $issues, $args ); if ( @$issues ) { CIL::Utils->separator(); foreach my $issue ( @$issues ) { CIL::Utils->display_issue_summary($issue); } CIL::Utils->separator(); } else { CIL::Utils->msg('no issues found'); } } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Track.pm000066400000000000000000000033241134046543300165670ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Track; use strict; use warnings; use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'track' } sub run { my ($self, $cil, undef, $issue_name) = @_; CIL::Utils->fatal("to use this feature the 'UseGit' option in your .cil file should be set") unless $cil->UseGit; my $issue = CIL::Utils->load_issue_fuzzy($cil, $issue_name); # add the issue to Git my $issue_dir = $cil->IssueDir(); my @files; push @files, "$issue_dir/i_" . $issue->name . '.cil'; push @files, map { "$issue_dir/c_${_}.cil" } @{ $issue->CommentList }; push @files, map { "$issue_dir/a_${_}.cil" } @{ $issue->AttachmentList }; CIL::Utils->msg("git add @files"); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Command/Work.pm000066400000000000000000000040241134046543300164430ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Command::Work; use strict; use warnings; use File::Slurp qw(read_file write_file); use base qw(CIL::Command); ## ---------------------------------------------------------------------------- sub name { 'work' } sub run { my ($self, $cil, $args, $issue_name) = @_; CIL::Utils->fatal("to use this feature the 'UseGit' option in your .cil file should be set") unless $cil->UseGit; # firstly, read the issue in my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); # right, got it's name, let's see if there is a branch for it my @branches = $cil->git->branches(); my $branch = {}; foreach ( @branches ) { $branch->{substr $_, 2} = 1; } if ( exists $branch->{$issue->name} ) { $cil->git->switch_to_branch( $issue->name ); } else { $cil->git->create_branch( $issue->name ); } # now that we've switched branches, load the issue in again (just in case) $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name ); $issue->Status( 'InProgress' ); $issue->save($cil); } 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Comment.pm000066400000000000000000000042161134046543300155500ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Comment; use strict; use warnings; use Carp; use base qw(CIL::Base); # fields specific to Comment __PACKAGE__->mk_accessors(qw(Issue Description)); my @FIELDS = ( qw(Issue CreatedBy Inserted Updated Description) ); ## ---------------------------------------------------------------------------- sub new { my ($proto, $name) = @_; croak 'please provide a comment name' unless defined $name; my $class = ref $proto || $proto; my $self = {}; bless $self, $class; $self->set_name( $name ); $self->{data} = { Issue => '', CreatedBy => '', Inserted => '', Updated => '', Description => '', }; $self->{Changed} = 0; $self->set_inserted_now; return $self; } sub prefix { return 'c'; } sub type { return 'Comment'; } sub fields { return \@FIELDS; } sub array_fields { return {}; } sub last_field { return 'Description'; } sub is_valid { # ToDo: # * check that the issue is valid # * Inserted and Updated are valid # * Description has something in it return 1; } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Git.pm000066400000000000000000000072761134046543300147020ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Git; use strict; use warnings; use Carp; use List::Util qw(reduce); use Git; use base qw(Class::Accessor); sub git { my $self = shift; $self->{git} ||= Git->repository; } sub glob_rev { my ($self, $rev, $path) = @_; # only support globbing the last element my ($dir, $pattern) = $path =~ m{^([^\*]*/)([^/]*)$} or croak "unsupported pattern '$path'"; $pattern =~ s{([\\\.])}{\\$1}g; $pattern =~ s{\*}{.*}g; my @match; $DB::single = 1; for ( $self->git->command("ls-tree", $rev, $dir) ) { chomp; my ($blobid, $path) = m{([0-9a-f]{40})\s+(.*)} or die; if ( $path =~ m{^\Q$dir\E$pattern$} ) { push @match, $path; } } @match; } sub file_exists { my ($self, $rev, $path) = @_; my $output = eval { $self->git->command("cat-file", "-t", "$rev:$path") }; return ( $output && $output =~ /blob/ ); } sub dir_exists { my ($self, $rev, $path) = @_; my $output = eval { $self->git->command("cat-file", "-t", "$rev:$path") }; return ( $output && $output =~ /tree/ ); } sub get_fh { my ($self, $rev, $path) = @_; $self->git->command_output_pipe("cat-file", "blob", "$rev:$path"); } sub UserName { return $_[0]->git->config( 'user.name' ); } sub UserEmail { return $_[0]->git->config( 'user.email' ); } sub branches { my ($self) = @_; return $self->git->command('branch'); } sub switch_to_branch { my ($self, $branch_name) = @_; $self->git->command('checkout', $branch_name); } sub create_branch { my ($self, $branch_name) = @_; $self->git->command('checkout', '-b', $branch_name); } sub add { my ($self, $cil, @entities) = @_; my @filenames; foreach my $entity ( @entities ) { my $filename = $entity->filename($cil, $entity->name()); push @filenames, $filename; } return $self->git->command('add', @filenames); } sub commit { my ($self, $cil, $message, @entities) = @_; my @filenames; foreach my $entity ( @entities ) { my $filename = $entity->filename($cil, $entity->name()); push @filenames, $filename; } $message = 'cil-' . $entities[0]->name . ": $message"; return $self->git->command('commit', '-m', $message, @filenames); } sub commit_multiple { my ($self, $cil, $message, @entities) = @_; my @filenames; foreach my $entity ( @entities ) { my $filename = $entity->filename($cil, $entity->name()); push @filenames, $filename; } my $commit_list_string = reduce { $a . $b } map { "* cil-" . $_->name . "\n" } @entities; return $self->git->command('commit', '-m', "$message\n\n$commit_list_string", @filenames); } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Issue.pm000066400000000000000000000143531134046543300152410ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Issue; use strict; use warnings; use Carp; use CIL; use CIL::Utils; use base qw(CIL::Base); # fields specific to Issue __PACKAGE__->mk_accessors(qw(Summary Status AssignedTo DependsOn Precedes Label Comment Attachment Description)); my @FIELDS = ( qw(Summary Status CreatedBy AssignedTo DependsOn Precedes Label Comment Attachment Inserted Updated Description) ); my $cfg = { array => { Label => 1, Comment => 1, Attachment => 1, DependsOn => 1, Precedes => 1, }, }; ## ---------------------------------------------------------------------------- sub new { my ($proto, $name) = @_; croak 'please provide an issue name' unless defined $name; my $class = ref $proto || $proto; my $self = {}; bless $self, $class; $self->set_name( $name ); $self->{data} = { Summary => '', Status => '', CreatedBy => '', AssignedTo => '', Inserted => '', Updated => '', Label => [], Comment => [], Attachment => [], DependsOn => [], Precedes => [], Description => '', }; $self->{Changed} = 0; $self->set_inserted_now; return $self; } sub prefix { return 'i'; } sub type { return 'Issue'; } sub fields { return \@FIELDS; } sub array_fields { return $cfg->{array}; } sub last_field { return 'Description'; } sub is_valid { my ($self, $cil) = @_; my @errors; # issues should have a Summary unless ( defined defined $self->Summary and length $self->Summary ) { push @errors, 'Issue does not have a summary'; } # see if we only allow certain Statuses if ( $cil->StatusStrict ) { unless ( exists $cil->StatusAllowed()->{$self->Status} ) { push @errors, "StatusStrict is turned on but this issue has an invalid status '" . $self->Status . "'"; } } # see if we only allow certain Labels if ( $cil->LabelStrict ) { my @labels = @{$self->LabelList}; foreach my $label ( @labels ) { unless ( exists $cil->LabelAllowed()->{$label} ) { push @errors, "LabelStrict is turned on but this issue has an invalid label '$label'"; } } } $self->errors( \@errors ); return @errors ? 0 : 1; } sub add_label { my ($self, $label) = @_; croak 'provide a label when adding one' unless defined $label; # return if we already have this label return if grep { $_ eq $label } @{$self->{data}{Label}}; push @{$self->{data}{Label}}, $label; $self->set_updated_now(); } sub remove_label { my ($self, $label) = @_; croak 'provide a label when removing one' unless defined $label; # remove this label @{$self->{data}{Label}} = grep { $_ ne $label } @{$self->{data}{Label}}; $self->set_updated_now(); } sub add_comment { my ($self, $comment) = @_; croak "can only add comments of type CIL::Comment" unless $comment->isa( 'CIL::Comment' ); # add the comment name and set this issue's updated time push @{$self->{data}{Comment}}, $comment->name; $self->Updated( $comment->Updated ); $self->flag_as_updated(); } sub add_attachment { my ($self, $attachment) = @_; croak "can only add attachments of type CIL::Attachment" unless $attachment->isa( 'CIL::Attachment' ); # add the attachment name and set this issue's updated time push @{$self->{data}{Attachment}}, $attachment->name; $self->Updated( $attachment->Updated ); $self->flag_as_updated(); } sub add_depends_on { my ($self, $depends) = @_; croak 'provide an issue name when adding a depends' unless defined $depends; # return if we already have this depends return if grep { $_ eq $depends } @{$self->{data}{DependsOn}}; push @{$self->{data}{DependsOn}}, $depends; $self->set_updated_now(); } sub add_precedes { my ($self, $precedes) = @_; croak 'provide an issue name when adding a precedes' unless defined $precedes; # return if we already have this precedes return if grep { $_ eq $precedes } @{$self->{data}{Precedes}}; push @{$self->{data}{Precedes}}, $precedes; $self->set_updated_now(); } sub LabelList { my ($self) = @_; return $self->{data}{Label}; } sub CommentList { my ($self) = @_; return $self->{data}{Comment}; } sub AttachmentList { my ($self) = @_; return $self->{data}{Attachment}; } sub DependsOnList { my ($self) = @_; return $self->{data}{DependsOn}; } sub PrecedesList { my ($self) = @_; return $self->{data}{Precedes}; } sub is_open { my ($self, $cil) = @_; # check against the list of Open Statuses my $open = $cil->StatusOpen(); return exists $open->{$self->Status}; } sub is_closed { my ($self, $cil) = @_; # check against the list of Closed Statuses my $closed = $cil->StatusClosed(); return exists $closed->{$self->Status}; } sub assigned_to_email { my ($self) = @_; return CIL::Utils->extract_email_address( $self->AssignedTo ); } sub created_by_email { my ($self) = @_; return CIL::Utils->extract_email_address( $self->CreatedBy ); } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/lib/CIL/Utils.pm000066400000000000000000000404451134046543300152520ustar00rootroot00000000000000## ---------------------------------------------------------------------------- # cil is a Command line Issue List # Copyright (C) 2008 Andrew Chilton # # This file is part of 'cil'. # # cil is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see . # ## ---------------------------------------------------------------------------- package CIL::Utils; use strict; use warnings; use Carp; use File::Slurp; use File::Temp qw(tempfile); use Email::Find; use POSIX qw(getpgrp tcgetpgrp); use Fcntl qw(:DEFAULT :flock); use Digest::MD5 qw(md5_hex); ## ---------------------------------------------------------------------------- # setup some globals my $editor = $ENV{EDITOR} || 'vi'; my $y = 'y'; ## ---------------------------------------------------------------------------- sub parse_cil_file { my ($class, $filename, $last_field) = @_; my @lines = read_file($filename); return {} unless @lines; return $class->parse_from_lines( $last_field, @lines ); } sub parse_from_fh { my ($class, $fh, $last_field) = @_; my @lines = <$fh>; return unless @lines; return $class->parse_from_lines( $last_field, @lines ); } sub parse_from_lines { my ($class, $last_field, @lines) = @_; return unless @lines; chomp @lines; my $data = {}; # read all the initial fields while ( my $line = shift @lines ) { my ($key, $value) = split(/\s*:\s*/, $line, 2); if ( defined $data->{$key} ) { unless ( ref $data->{$key} eq 'ARRAY' ) { $data->{$key} = [ $data->{$key} ]; }; push @{$data->{$key}}, $value; } else { $data->{$key} = $value; } } # now read everything that's left into the $last_field field (if there is one) $data->{$last_field} = join("\n", @lines) if defined $last_field; return $data; } sub format_data_as_output { my ($class, $data, @fields) = @_; # we format the last field differently, so pop it off now my $last_field = pop @fields; my @lines; foreach my $field ( @fields ) { next if $field eq $last_field; if ( ref $data->{$field} eq 'ARRAY' ) { # don't output this field if there is nothing in it next unless @{$data->{$field}}; foreach ( sort @{$data->{$field}} ) { push @lines, "$field: $_\n"; } } else { push @lines, "$field: $data->{$field}\n"; } } # finally, output the last field on it's own push @lines, "\n"; push @lines, $data->{$last_field}, "\n"; return \@lines; } sub write_cil_file { my ($class, $filename, $data, @fields) = @_; # get the output format my $lines = $class->format_data_as_output($data, @fields); # ... and save write_file($filename, $lines); } ## ---------------------------------------------------------------------------- # input # this method based on Term::CallEditor(v0.11)'s solicit method # original: Copyright 2004 by Jeremy Mates # copied under the terms of the GPL sub solicit { my ($class, $message) = @_; $message = join('', @$message) if ref $message eq 'ARRAY'; # when calling this, assume we're already interactive File::Temp->safe_level(File::Temp::HIGH); my ( $fh, $filename ) = tempfile( UNLINK => 1 ); # since File::Temp returns both, check both unless ( $fh and $filename ) { croak "couldn't create temporary file"; } select( ( select($fh), $|++ )[0] ); print $fh $message; # need to unlock for external editor flock $fh, LOCK_UN; # run the editor my @editor_args = split(/\s+/, $editor); my $status = system(@editor_args, $filename); # check its return value if ( $status != 0 ) { croak $status != -1 ? "external editor ($editor) failed: $?" : "could not launch ($editor) program: $!"; } unless ( seek $fh, 0, 0 ) { croak "could not seek on temp file: errno=$!"; } return $fh; } # this method based on Recipe 15.2 sub ensure_interactive { my $tty; open($tty, "/dev/tty") or croak "program not running interactively (can't open /dev/tty): $!"; my $tpgrp = tcgetpgrp( fileno($tty) ); my $pgrp = getpgrp(); close $tty; unless ( $tpgrp == $pgrp ) { croak "can't get exclusive control of tty: tpgrp=$tpgrp, pgrp=$pgrp"; } # if we are here, then we have ensured what we wanted return; } sub add_issue_loop { my ($class, $cil, undef, $issue) = @_; my $edit = $y; # keep going until we get a valid issue or we want to quit while ( $edit eq $y ) { # read in the new issue text my $fh = $class->solicit( $issue->as_output ); $issue = CIL::Issue->new_from_fh( 'tmp', $fh ); # check if the issue is valid if ( $issue->is_valid($cil) ) { $edit = 'n'; } else { $class->msg($_) foreach @{ $issue->errors }; $edit = ans('Would you like to re-edit (y/n): '); } } # if the issue is still invalid, they quit without correcting it return unless $issue->is_valid( $cil ); # we've got the issue, so let's name it my $unique_str = time . $issue->Inserted . $issue->Summary . $issue->Description; $issue->set_name( substr(md5_hex($unique_str), 0, 8) ); $issue->save($cil); # should probably be run from with $cil $cil->run_hook('issue_post_save', $issue); $class->display_issue($cil, $issue); return $issue; } sub add_comment_loop { my ($class, $cil, undef, $issue, $comment) = @_; my $edit = $y; # keep going until we get a valid issue or we want to quit while ( $edit eq $y ) { # read in the new comment text my $fh = CIL::Utils->solicit( $comment->as_output ); $comment = CIL::Comment->new_from_fh( 'tmp', $fh ); # check if the comment is valid if ( $comment->is_valid($cil) ) { $edit = 'n'; } else { $class->msg($_) foreach @{ $issue->errors }; $edit = $class->ans('Would you like to re-edit (y/n): '); } } # if the comment is still invalid, they quit without correcting it return unless $comment->is_valid( $cil ); # we've got the comment, so let's name it my $unique_str = time . $comment->Inserted . $issue->Description; $comment->set_name( substr(md5_hex($unique_str), 0, 8) ); # finally, save it $comment->save($cil); # add the comment to the issue, update it's timestamp and save it out $issue->add_comment( $comment ); $issue->save($cil); $class->display_issue_full($cil, $issue); return $comment; } ## ---------------------------------------------------------------------------- # loading sub load_issue_fuzzy { my ($class, $cil, $partial_name) = @_; my $issues = $cil->list_issues_fuzzy( $partial_name ); unless ( defined $issues ) { $class->fatal("Couldn't find any issues using '$partial_name'"); } if ( @$issues > 1 ) { $class->fatal('found multiple issues which match that name: ' . join(' ', map { $_->{name} } @$issues)); } my $issue_name = $issues->[0]->{name}; my $issue = CIL::Issue->new_from_name($cil, $issue_name); unless ( defined $issue ) { $class->fatal("Couldn't load issue '$issue_name'"); } return $issue; } sub load_comment_fuzzy { my ($class, $cil, $partial_name) = @_; my $comments = $cil->list_comments_fuzzy( $partial_name ); unless ( defined $comments ) { $class->fatal("Couldn't find any comments using '$partial_name'"); } if ( @$comments > 1 ) { $class->fatal('found multiple comments which match that name: ' . join(' ', map { $_->{name} } @$comments)); } my $comment_name = $comments->[0]->{name}; my $comment = CIL::comment->new_from_name($cil, $comment_name); unless ( defined $comment ) { $class->fatal("Couldn't load comment '$comment_name'"); } return $comment; } sub load_attachment_fuzzy { my ($class, $cil, $partial_name) = @_; my $attachments = $cil->list_attachments_fuzzy( $partial_name ); unless ( defined $attachments ) { $class->fatal("Couldn't find any attachments using '$partial_name'"); } if ( @$attachments > 1 ) { $class->fatal('found multiple attachments which match that name: ' . join(' ', map { $_->{name} } @$attachments)); } my $attachment_name = $attachments->[0]->{name}; my $attachment = CIL::Attachment->new_from_name($cil, $attachment_name); unless ( defined $attachment ) { $class->fatal("Couldn't load attachment '$partial_name'"); } return $attachment; } ## ---------------------------------------------------------------------------- # display sub display_issue { my ($class, $cil, $issue) = @_; $class->separator(); $class->title( 'Issue ' . $issue->name() ); $class->field( 'Summary', $issue->Summary() ); $class->field( 'Status', $issue->Status() ); $class->field( 'CreatedBy', $issue->CreatedBy() ); $class->field( 'AssignedTo', $issue->AssignedTo() ); $class->field( 'Label', $_ ) foreach sort @{$issue->LabelList()}; $class->field( 'Comment', $_ ) foreach sort @{$issue->CommentList()}; $class->field( 'Attachment', $_ ) foreach sort @{$issue->AttachmentList()}; $class->field( 'DependsOn', $_ ) foreach sort @{$issue->DependsOnList()}; $class->field( 'Precedes', $_ ) foreach sort @{$issue->PrecedesList()}; $class->field( 'Inserted', $issue->Inserted() ); $class->field( 'Updated', $issue->Inserted() ); $class->text('Description', $issue->Description()); $class->separator(); } sub display_issue_full { my ($class, $cil, $issue) = @_; $class->separator(); $class->title( 'Issue ' . $issue->name() ); $class->field( 'Summary', $issue->Summary() ); $class->field( 'Status', $issue->Status() ); $class->field( 'CreatedBy', $issue->CreatedBy() ); $class->field( 'AssignedTo', $issue->AssignedTo() ); $class->field( 'Label', $_ ) foreach sort @{$issue->Label()}; $class->field( 'DependsOn', $_ ) foreach sort @{$issue->DependsOnList()}; $class->field( 'Precedes', $_ ) foreach sort @{$issue->PrecedesList()}; $class->field( 'Inserted', $issue->Inserted() ); $class->field( 'Updated', $issue->Updated() ); $class->text('Description', $issue->Description()); my $comments = $cil->get_comments_for( $issue ); foreach my $comment ( @$comments ) { $class->display_comment( $cil, $comment ); } my $attachments = $cil->get_attachments_for( $issue ); foreach my $attachment ( @$attachments ) { $class->display_attachment( $cil, $attachment ); $class->msg(); } $class->separator(); } sub display_comment { my ($class, $cil, $comment) = @_; $class->title( 'Comment ' . $comment->name() ); $class->field( 'CreatedBy', $comment->CreatedBy() ); $class->field( 'Inserted', $comment->Inserted() ); $class->field( 'Updated', $comment->Inserted() ); $class->text('Description', $comment->Description()); } sub display_attachment { my ($class, $cil, $attachment) = @_; $class->title( 'Attachment ' . $attachment->name() ); $class->field( 'Filename', $attachment->Filename() ); $class->field( 'CreatedBy', $attachment->CreatedBy() ); $class->field( 'Inserted', $attachment->Inserted() ); $class->field( 'Updated', $attachment->Inserted() ); } sub filter_issues { my ($class, $cil, $issues, $args) = @_; # don't filter if we haven't been given anything return $issues unless defined $args; return $issues unless %$args; # check that they aren't filtering on both --assigned-to and --is-mine if ( defined $args->{a} and defined $args->{'is-mine'} ) { $class->fatal("the --assigned-to and --is-mine filters are mutually exclusive"); } # take a copy of the whole lot first (so we don't destroy the input list) my @new_issues = @$issues; # firstly, get out the Statuses we want if ( defined $args->{s} ) { @new_issues = grep { $_->Status eq $args->{s} } @new_issues; } # then see if we want a particular label (could be a bit nicer) if ( defined $args->{l} ) { my @tmp; foreach my $issue ( @new_issues ) { push @tmp, $issue if grep { $_ eq $args->{l} } @{$issue->LabelList}; } @new_issues = @tmp; } # filter out dependent on open/closed if ( defined $args->{'is-open'} ) { # just get the open issues @new_issues = grep { $_->is_open($cil) } @new_issues; } if ( defined $args->{'is-closed'} ) { # just get the closed issues @new_issues = grep { $_->is_closed($cil) } @new_issues; } # filter out 'created by' if ( defined $args->{c} ) { @new_issues = grep { $args->{c} eq $_->created_by_email } @new_issues; } # filter out 'assigned to' $args->{a} = $cil->UserEmail if defined $args->{'is-mine'}; if ( defined $args->{a} ) { @new_issues = grep { $args->{a} eq $_->assigned_to_email } @new_issues; } return \@new_issues; } sub separator { my ($class) = @_; $class->msg('=' x 79); } sub msg { my ($class, $msg) = @_; print ( defined $msg ? $msg : '' ); print "\n"; } sub display_issue_summary { my ($class, $issue) = @_; my $msg = $issue->name(); $msg .= " "; $msg .= $issue->Status(); $msg .= (' ' x ( 13 - length $issue->Status() )); $msg .= $issue->Summary(); $class->msg($msg); } sub display_issue_headers { my ($class, $issue) = @_; $class->title( 'Issue ' . $issue->name() ); $class->field( 'Summary', $issue->Summary() ); $class->field( 'CreatedBy', $issue->CreatedBy() ); $class->field( 'AssignedTo', $issue->AssignedTo() ); $class->field( 'Inserted', $issue->Inserted() ); $class->field( 'Status', $issue->Status() ); $class->field( 'Labels', join(' ', @{$issue->LabelList()}) ); $class->field( 'DependsOn', join(' ', @{$issue->DependsOnList()}) ); $class->field( 'Precedes', join(' ', @{$issue->PrecedesList()}) ); } sub title { my ($class, $title) = @_; my $msg = "--- $title "; $msg .= '-' x (74 - length($title)); $class->msg($msg); } sub field { my ($class, $field, $value) = @_; my $msg = "$field"; $msg .= " " x (12 - length($field)); $class->msg("$msg: " . (defined $value ? $value : '') ); } sub text { my ($class, $field, $value) = @_; $class->msg(); $class->msg($value); $class->msg(); } ## ---------------------------------------------------------------------------- # system sub check_paths { my ($class, $cil) = @_; # make sure an issue directory is available unless ( $cil->dir_exists($cil->IssueDir) ) { $class->fatal("couldn't find '" . $cil->IssueDir . "' directory"); } } sub ans { my ($msg) = @_; print $msg; my $ans = ; chomp $ans; print "\n"; return $ans; } sub err { my ($class, $msg) = @_; print STDERR ( defined $msg ? $msg : '' ); print STDERR "\n"; } sub fatal { my ($class, $msg) = @_; chomp $msg; print STDERR $msg, "\n"; exit 2; } ## ---------------------------------------------------------------------------- # helpers sub extract_email_address { my ($class, $text) = @_; my $email_address; my $num_found = find_emails( $text, sub { my ($mail_address, $text_email) = @_; $email_address = $text_email; } ); return $email_address; } sub user { my ($class, $cil) = @_; return $cil->UserName . ' <' . $cil->UserEmail . '>'; } ## ---------------------------------------------------------------------------- 1; ## ---------------------------------------------------------------------------- cil-0.07.00/t/000077500000000000000000000000001134046543300126735ustar00rootroot00000000000000cil-0.07.00/t/00_files.t000066400000000000000000000022241134046543300144610ustar00rootroot00000000000000#!/usr/bin/perl use strict; use warnings; use Test::More qw(no_plan); use Data::Dumper; use CIL::Utils; my $parsed_fields = CIL::Utils->parse_cil_file( 't/i_cafebabe.cil', 'Description' ); my $correct_fields = { 'Summary' => 'Addition of a \'attach\' command', 'Status' => 'New', 'CreatedBy' => 'A N Other ', 'AssignedTo' => 'A Name ', 'Label' => [ 'against-v0.1', 'priority-medium', 'type-enhancement', ], 'Inserted' => '2008-06-15 18:22:01', 'Updated' => '2008-06-15 23:15:27', 'Description' => '\'cil\' currently has no way of adding attachments to issues. This should be added so that the actual data cil stores is complete.' }; is_deeply($parsed_fields, $correct_fields, 'Check parsing of file'); CIL::Utils->write_cil_file( '/tmp/i_deadbeef.cil', $correct_fields, qw(Summary Status CreatedBy AssignedTo Label Inserted Updated Description) ); CIL::Utils->write_cil_file( '/tmp/i_decaf7ea.cil', $parsed_fields, qw(Summary Status CreatedBy AssignedTo Label Inserted Updated Description) ); # is($parsed_fields, $correct_fields, 'Check parsing of file'); cil-0.07.00/t/i_cafebabe.cil000066400000000000000000000006131134046543300154040ustar00rootroot00000000000000Summary: Addition of a 'attach' command Status: New CreatedBy: A N Other AssignedTo: A Name Label: against-v0.1 Label: priority-medium Label: type-enhancement Inserted: 2008-06-15 18:22:01 Updated: 2008-06-15 23:15:27 'cil' currently has no way of adding attachments to issues. This should be added so that the actual data cil stores is complete. cil-0.07.00/ubuntu-jaunty/000077500000000000000000000000001134046543300152625ustar00rootroot00000000000000cil-0.07.00/ubuntu-jaunty/changelog000066400000000000000000000037071134046543300171430ustar00rootroot00000000000000cil (0.5.1) unstable; urgency=low * New release minus all the cruft -- Andrew Chilton Sat, 05 Jul 2008 18:28:22 +1200 cil (0.5.0) unstable; urgency=low * Fix bug when running certain commands (inc. init) * Added command 'steal' * Added command 'track' -- Andrew Chilton Sat, 05 Jul 2008 15:36:22 +1200 cil (0.4.2) unstable; urgency=low * Fix bug where new issues are assigned to the reporter * Fix bug where only one item in a config list breaks listings * Ready for 0.4.2 release -- Andrew Chilton Thu, 03 Jul 2008 22:22:22 +1200 cil (0.4.1) unstable; urgency=low * Fix dependency on libemail-date-perl * Ready for 0.4.1 release -- Andrew Chilton Thu, 03 Jul 2008 00:09:21 +1200 cil (0.4.0) unstable; urgency=low * Can now read a ~/.cilrc file for user defined options * Added command 'am' which applies a mailbox * Can now use shortened hash names to the commands * Allows dependencies between issues * New filter called --is-mine * Ready for 0.4.0 release -- Andrew Chilton Wed, 02 Jul 2008 23:12:20 +1200 cil (0.3.0) unstable; urgency=low * Added filters for the listing commands * Added ability to read .cil config file * Can now set which Statuses are valid * Can set which Labels are valid * Added 'fsck' command * Added bash completion for options, commands and entities * Ready for 0.3.0 release -- Andrew Chilton Sat, 28 Jun 2008 12:06:19 +1200 cil (0.2.1) unstable; urgency=low * Ready for 0.2.1 release -- Andrew Chilton Mon, 23 Jun 2008 22:32:18 +1200 cil (0.2.0) unstable; urgency=low * Ready for 0.2 release -- Andrew Chilton Sun, 22 Jun 2008 16:17:18 +1200 cil (0.1.0) unstable; urgency=low * Ready for 0.1 release -- Andrew Chilton Sun, 04 May 2008 16:17:17 +1200 cil-0.07.00/ubuntu-jaunty/compat000066400000000000000000000000021134046543300164600ustar00rootroot000000000000007 cil-0.07.00/ubuntu-jaunty/control000066400000000000000000000013101134046543300166600ustar00rootroot00000000000000Source: cil Section: perl Priority: extra Maintainer: Andrew Chilton Uploaders: Andrew Chilton Standards-Version: 3.6.1 Build-Depends: debhelper (>= 5) Build-Depends-Indep: perl Package: cil Section: perl Priority: extra Architecture: all Depends: ${perl:Depends}, libgetopt-mixed-perl, libfile-touch-perl, libfile-slurp-perl, libclass-accessor-perl, libdatetime-perl, libemail-find-perl, libemail-date-perl, libfile-homedir-perl Description: command line issue tracker 'cil' allows easy command-line creation of an issue tracker. It saves each issue locally and in plain text. Commands are given such that these issues can be added, edited and listed easily. cil-0.07.00/ubuntu-jaunty/copyright000066400000000000000000000020551134046543300172170ustar00rootroot00000000000000This package was debianized by Andrew Chilton on Sun, 22 Jun 2008 17:48:00 +1200 Upstream Author: Andrew Chilton Copyright: (C) 2008 Andrew Chilton License: cil is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . You are free to distribute this software under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. cil-0.07.00/ubuntu-jaunty/docs000066400000000000000000000000071134046543300161320ustar00rootroot00000000000000README cil-0.07.00/ubuntu-jaunty/install000066400000000000000000000001601134046543300166500ustar00rootroot00000000000000lib/* usr/share/perl5 bin/cil usr/bin etc/bash_completion.d/cil etc/bash_completion.d cil-0.07.00/ubuntu-jaunty/manpages000066400000000000000000000000061134046543300167740ustar00rootroot00000000000000cil.1 cil-0.07.00/ubuntu-jaunty/rules000077500000000000000000000020161134046543300163410ustar00rootroot00000000000000#!/usr/bin/make -f ## ---------------------------------------------------------------------------- ## ---------------------------------------------------------------------------- ## uncomment this to turn on verbose mode # export DH_VERBOSE=1 ## ---------------------------------------------------------------------------- clean: dh_testdir dh_testroot rm -f build-stamp install-stamp [ ! -f Makefile ] || $(MAKE) clean rm -f $(CURDIR)/cil.1 dh_clean build: build-stamp build-stamp: dh_testdir [ ! -f Makefile ] || $(MAKE) echo Doing MAN... pod2man $(CURDIR)/bin/cil > $(CURDIR)/cil.1 touch build-stamp binary: dh_testdir dh_testroot dh_install dh_installdirs dh_installdocs dh_installdebconf dh_installman dh_installchangelogs Changes dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch .PHONY: clean install binary-indep binary-arch binary ## ----------------------------------------------------------------------------