Changes between Version 4 and Version 5 of WikiStart

Show
Ignore:
Timestamp:
04/17/09 21:22:13 (6 years ago)
Author:
anonymous (IP: 77.128.108.222)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v4 v5  
    1 This is the developer wiki of [http://haskell.org/haskellwiki/Patchwork Patchwork]... 
     1This is the developer wiki of [http://haskell.org/haskellwiki/Patchwork Patchwork] 
    22 
    3 The code documentation is coming soon! 
     3= Patchwork = 
     4 
     5== Module design == 
     6=== Separation of GUI & program logic === 
     7One of the fundamental goals of Patchwork was to separate the logic of the repository communication from the GUI components. In this connection it is possible to develop the GUI independently from the interface and additionally the Patchwork GUI components could be used to manage other open source code management systems. In the moment the separation can only be used in a limited way (look at "known problems" section). 
     8 
     9=== Patchwork source === 
     10In the following you can find the description which modules are included, where they are stored in the Patchwork source and which functions they execute: 
     11==== Root ==== 
     12===== Patchwork.hs ===== 
     13This is a standalone application with its own main function. Dependant on the parameters of the commando shell (changes, push, pull) a main GUI will be created. If there is no parameter provided then a GUI window will be displayed where you can select from these options. In the current release there exists the following parameters for command shell:[[BR]] 
     14help: Displays an overview of all provided parameters. This would also be called if the parameter can not be identified.[[BR]] 
     15changes: Prints an overview of the repository patch history.[[BR]] 
     16pull: Copies patches from another repository to a repository in which you are.[[BR]] 
     17push: Copies patches from a repository in which you are to another repository. 
     18 
     19==== Patchwork.DIL ==== 
     20This directory contains the !DarcsInterfaceLayer (DIL). DIL builds the interface to darcs. Parts of the implementation were extracted or refactored from darcs. So the code is used redundant in the darcs code and in the Patchwork code. For the moment there were no other possibilities, because the darcs API is not totally opened and is also not primarily thought to be an API (see "known problems and possible future work"). DIL is divided into the following modules: 
     21===== Data.hs ===== 
     22This module contains the types and access functions. As types there are !PatchInfo and !PatchInfoWithDeps.[[BR]] 
     23!PatchInfo: Patch data structure for the GUI[[BR]] 
     24!PatchInfoWithDeps: Patch with lists of dependencies 
     25===== DarcsAPI.hs ===== 
     26This module provides functions to work with the repositories for example getting placed patches.  Also it provides functions to convert darcs patches to GUI data structures. 
     27 
     28==== Patchwork.GUI ==== 
     29Here you will find [http://haskell.org/haskellwiki/Grapefruit Grapefruit] based darcs frontends. Following modules are available: 
     30===== !PatchView.hs ===== 
     31Circuit with a !SetView, which shows the patch infos. This is not a discrete command of Patchwork and it will be used by other GUI-commands (changes, push, pull) to show patch infos. 
     32===== Changes.hs ===== 
     33Shows a list of patches from the local repositories in a !PatchView. This view is accessible under the command line via 'darcs changes'. 
     34===== !PushPull.hs ===== 
     35Provides the functions 'darcs push' and 'darcs pull' . The circuit is for both commands the same. Dependent on the mode (push or pull) only the input and output is different. There are two !PatchViews included (local and remote repository). In the push mode there are the placing patches in 'local repository'-!PatchView and in the pull mode they are in 'remote repository'-!PatchView. Using the arrow buttons („<<<“. „>>>“) the single patches can be selected and deselected. With the command buttons ('Push','Pull') die action can be executed. 
     36===== Main.hs ===== 
     37This module is the main window from which all commands can be reached. This GUI window is called every time if no command parameter was passed. 
     38 
     39== Known problems and possible future work == 
     40Currently there exists a bug in push/pull functionality. The selection and takeover from patches works only correct for the first selection, for example in the case when you use the push mode from the local repository to remote repository. This malfunction is a known bug in Grapefruit and his developer works currently with all his passion to solve this problem. Is this problem solved a bug fix will be provided.[[BR]] 
     41For developing Patchwork in a useful and fast way the communication between us and the darcs developers must be forced. The goal of the darcs developers should be to develop a better (native) API for eliminating the code redundancy (see Patchwork.DIL).[[BR]] 
     42It seems wise for us to integrate Patchwork GUI directly into darcs. Currently the functionality was copied, splatted up and the input and output was processed directly in th GUI. The file !PushPull.hs provides useful information and steps how to integrate Patchwork GUI into darcs.[[BR]] 
     43The analysis of the darcs source code was difficult because many signifiers were not chosen meaningful enough and they were not defined well (for example us, us'). Also a rich use of comments in the code would be useful to us in the beginning. In this connection all these reasons are responsible for analyzing the code in a non easy way and new developers could be scared to start with it.[[BR]] 
     44For shifting the code we use tabulators, which is known as a standard for formatting code. In contrast the darcs code is formatted with whitespaces which made it not so easy to adapt it.