VCS Gui-Interface "Design"

Andreas Pakulat apaku at gmx.de
Wed Sep 5 17:47:52 UTC 2007


On 05.09.07 19:33:14, Andreas Pakulat wrote:
> On 04.09.07 18:53:59, Andreas Pakulat wrote:
> > Hi,
> > 
> > I'd like to discuss how the Vcs support should surface in the KDevelop
> > GUI. The main question here is: Do we want to "hide" the actual Vcs
> > System used for a file/folder from the user and provide something like a
> > "Version Control" entry in context menu and such?
> > 
> > That would mean we limit KDevelop to 1 Vcs System per project, which
> > isn't extremely unreasonable though there might be cases where people
> > have CVS and .svn in the same project (been there, done that). Of course
> > this would happen _only_ for the actions in IBasicVersionControl+ any
> > actions from the other vcs-ifaces that the plugin provides. A Vcs Plugin
> > may still provide an additional entry for any special actions it wants
> > to provide.
> > 
> > The main reason for this approach would be consistency, i.e. no matter
> > what Vcs you're using, you'd get the same GUI items. But it also would
> > mean we don't have to provide tons of API on the plugin class itself,
> > because this would simply use the IBasicVersionControl API that the
> > plugin has already - the svn plugin currently has I think 3 or 4 methods
> > for each action, 2 from the iface and 2 other which is a lot of
> > duplication.
> 
> As I promised Matt I had a closer look at the interfaces and the
> attached diff against current trunk is the result.  I found there are
> not that many showXXX methods that need to be removed, but in fact two
> should be added.
> 
> My decision was simply based on wether a given action returns more than
> just a "finished/error" result or not, so any action that returns actual
> data (like file content, file listing, log, changeset and so on) has now
> a showXXX method.

Yeah, once again forgot the file.

Andreas

-- 
Try to have as good a life as you can under the circumstances.
-------------- next part --------------
Index: ibranchingversioncontrol.h
===================================================================
--- ibranchingversioncontrol.h	(Revision 708668)
+++ ibranchingversioncontrol.h	(Arbeitskopie)
@@ -51,23 +51,6 @@
                             const VcsRevision& rev,
                             const QString& branchName ) = 0;
 
-    /**
-     * Show a dialog to create a branch, intialized with the given mapping
-     * information
-     *
-     * @param mapping List of source/destination pairs of repository paths
-     * specifying what should end up where. Some VCS's may not support
-     * destination paths and will ignore them. The source paths always specify
-     * what is to be branched.
-     * @param rev What revision of the requested items should be branched.
-     * @param branchName Short, descriptive name for the branch used for VCS's
-     * that take branch names instead of destination paths, or store metadata
-     * about the branch. Not all VCS's will use this parameter.
-     */
-    virtual VcsJob* showBranch( const QString& commitMessage,
-                                const VcsMapping& mapping,
-                                const VcsRevision& rev,
-                                const QString& branchName ) = 0;
 
     /**
      * Creates a new tag from the given mapping information
@@ -86,23 +69,6 @@
                          const VcsRevision& rev,
                          const QString& tagName ) = 0;
 
-    /**
-     * Show a dialog to create a new tag, intialized with the given mapping
-     * information
-     *
-     * @param mapping List of source/destination pairs of repository paths
-     * specifying what should end up where. Some VCS's may not support
-     * destination paths and will ignore them. The source paths always specify
-     * what is to be tagged.
-     * @param rev What revision of the requested items should be tagged.
-     * @param tagName Short, descriptive name for the tag used for VCS's that
-     * take tag names instead of destination paths, or store metadata about the
-     * tag. Not all VCS's will use this parameter.
-     */
-    virtual VcsJob* showTag( const QString& commitMessage,
-                             const VcsMapping& mapping,
-                             const VcsRevision& rev,
-                             const QString& tagName ) = 0;
 };
 
 }
Index: irepositoryversioncontrol.h
===================================================================
--- irepositoryversioncontrol.h	(Revision 708668)
+++ irepositoryversioncontrol.h	(Arbeitskopie)
@@ -42,15 +42,6 @@
                           const VcsRevision& srcRev ) = 0;
 
     /**
-     * Shows a dialog asking for a commit message that will copy the source
-     * location in the repository to the destination
-     */
-    virtual VcsJob* showCopy( const QString& commitMessage,
-                              const QString& repoSrc,
-                              const QString& repoDst,
-                              const VcsRevision& srcRev ) = 0;
-
-    /**
      * Moves the source location in the repository to the destination
      */
     virtual VcsJob* move( const QString& commitMessage,
@@ -58,27 +49,12 @@
                           const QString& repoDst,
                           const VcsRevision& srcRev ) = 0;
 
-    /**
-     * Shows a dialog asking for a commit message that will move the source
-     * location in the repository to the destination
-     */
-    virtual VcsJob* showMove( const QString& commitMessage,
-                              const QString& repoSrc,
-                              const QString& repoDst,
-                              const VcsRevision& srcRev ) = 0;
 
     /**
      * Removes the source locations in the repository
      */
     virtual VcsJob* remove( const QString& commitMessage,
                             const QStringList& repoLocations ) = 0;
-
-    /**
-     * Shows a dialog asking for a commit message that will remove the source
-     * locations in the repository
-     */
-    virtual VcsJob* showRemove( const QString& commitMessage,
-                                const QStringList& repoLocations ) = 0;
 };
 
 }
Index: ibrowsableversioncontrol.h
===================================================================
--- ibrowsableversioncontrol.h	(Revision 708668)
+++ ibrowsableversioncontrol.h	(Arbeitskopie)
@@ -108,6 +108,17 @@
      * Retrieve a file from the repository without checking it out
      */
     virtual VcsJob* cat( const QString& repoLocation, const VcsRevision& rev ) = 0;
+
+
+    /**
+     * Retrieve a list of entries in the given repository location
+     */
+    virtual VcsJob* showLs( const QString& repoLocation, const VcsRevision& rev ) = 0;
+
+    /**
+     * Retrieve a file from the repository without checking it out
+     */
+    virtual VcsJob* showCat( const QString& repoLocation, const VcsRevision& rev ) = 0;
 };
 
 }
Index: ibasicversioncontrol.h
===================================================================
--- ibasicversioncontrol.h	(Revision 708668)
+++ ibasicversioncontrol.h	(Arbeitskopie)
@@ -43,6 +43,10 @@
  * offer functionality that works solely on the server see the
  * IRepositoryVersionControl interface
  *
+ * Note: The showXXX methods <b>always</b> create a GUI element for the result,
+ * while the non-show versions allow to retrieve the result of the action
+ * via the VcsJob class
+ *
  */
 
 class IBasicVersionControl
@@ -155,13 +159,6 @@
                             RecursionMode recursion ) = 0;
 
     /**
-     * Shows a dialog asking for a commit message that will check in the changes
-     * of the given file(s)/dir(s) into the repository
-     */
-    virtual VcsJob* showCommit( const QString& message,
-                                const KUrl::List& localLocations,
-                                RecursionMode recursion ) = 0;
-    /**
      * Retrieves a diff between the two locations at the given revisions
      *
      * The QVariant should either be a KUrl, which is assumed to be a local file
@@ -239,6 +236,8 @@
      *
      * The QVariant should either be a KUrl, which is assumed to be a local file
      * or a QString which is assumed to define a repository path
+     *
+     * Note: This might create conflicts in the file(s) that are changed
      */
     virtual VcsJob* merge( const QVariant& localOrRepoLocationSrc,
                            const QVariant& localOrRepoLocationDst,
@@ -250,7 +249,7 @@
      * check for conflicts in the given file and eventually present a
      * conflict solving dialog to the user
      */
-    virtual VcsJob* resolve( const KUrl::List& localLocations,
+    virtual VcsJob* showResolve( const KUrl::List& localLocations,
                              RecursionMode recursion ) = 0;
 
     /**


More information about the KDevelop-devel mailing list