[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    IBasicVersionControl (first try)
From:       "Robert Gruber" <R.Gruber () gmx ! net>
Date:       2007-05-30 19:48:40
Message-ID: 20070530194840.296610 () gmx ! net
[Download RAW message or body]

Hi!

I just started to port the CVS plugin to the new IBasicVersionControl interface.

Here's what I had to do in order to make it compile:

*) Replaced KDEVVCS_EXPORT in IBasicVersionControl with KDEVPLATFORMVCS_EXPORT as in IVersionControl

*) "Modified" is defined twice in KDevelop namespace, so I renamed the second one to FileModified


As already discussed I also changed the return type of all functions to VcsJob*


Please take a look at the attached patchfile and tell me if it's ok for you.

Robert





-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

["vcsdiff.patch" (text/x-patch)]

Index: vcshelpers.h
===================================================================
--- vcshelpers.h	(Revision 669909)
+++ vcshelpers.h	(Arbeitskopie)
@@ -50,7 +50,7 @@
     ContentsModified     /**<Directory was not changed (only contents changed).*/,
     Add                  /**<File was added.*/,
     Delete               /**<File was deleted.*/,
-    Modified             /**<File was modified, for example by editing.*/,
+    FileModified             /**<File was modified, for example by editing.*/,
     Copy                 /**<File was copied.*/,
     Merge                /**<File had changes merged into it.*/,
 };
@@ -327,7 +327,7 @@
 
 }
 
-Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::MappingFlags )
+Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsMapping::MappingFlags )
 Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsActions )
 
 #endif
Index: ibasicversioncontrol.h
===================================================================
--- ibasicversioncontrol.h	(Revision 669909)
+++ ibasicversioncontrol.h	(Arbeitskopie)
@@ -22,6 +22,7 @@
 #ifndef IBASICVERSIONCONTROL_H
 #define IBASICVERSIONCONTROL_H
 
+#include "kdevexport.h"
 #include "vcshelpers.h"
 
 namespace KDevelop
@@ -37,7 +38,7 @@
  *
  * @TODO implement VcsJob!
  */
-class KDEVVCS_EXPORT IBasicVersionControl
+class KDEVPLATFORMVCS_EXPORT IBasicVersionControl
 {
 public:
 
@@ -64,57 +65,57 @@
     /**
      * Get the repository location of a local file
      */
-    virtual VcsJob repositoryLocation( const KUrl& localLocation ) = 0;
+    virtual VcsJob* repositoryLocation( const KUrl& localLocation ) = 0;
 
     /**
      * adds a local file/dir to the list of versioned files recursive is
      * only active for directories
      */
-    virtual VcsJob add( const KUrl::List& localLocations,
+    virtual VcsJob* add( const KUrl::List& localLocations,
                         RecursionMode recursion ) = 0;
 
     /**
      * removes a local file/dir from the list of versioned files
      */
-    virtual VcsJob remove( const KUrl::List& localLocations ) = 0;
+    virtual VcsJob* remove( const KUrl::List& localLocations ) = 0;
 
     /**
      * this is for files only, it makes a file editable, this may be a no-op
      */
-    virtual VcsJob edit( const KUrl& localLocation ) = 0;
+    virtual VcsJob* edit( const KUrl& localLocation ) = 0;
 
     /**
      * this is for files only, it makes a file un-editable, this may be a no-op
      * This is different from revert because it doesn't change the content of the
      * file (it may fail if the file has changed).
      */
-    virtual VcsJob unedit( const KUrl& localLocation ) = 0;
+    virtual VcsJob* unedit( const KUrl& localLocation ) = 0;
 
     /**
      * retrieves status information for a file or dir recursive is only
      * active for directories
      */
-    virtual VcsJob status( const KUrl::List& localLocations,
+    virtual VcsJob* status( const KUrl::List& localLocations,
                            RecursionMode recursion ) = 0;
     /**
      * gives the revision of file/dir, that is the revision to which this files
      * was updated when update() was run the last time
      */
-    virtual VcsJob localRevision( const KUrl& localLocation,
+    virtual VcsJob* localRevision( const KUrl& localLocation,
                                   VcsRevision::RevisionType ) = 0;
 
     /**
      * executes a copy of a file/dir, preserving history if the VCS system
      * allows that, may be implemented by filesystem copy+add
      */
-    virtual VcsJob copy( const KUrl& localLocationSrc,
+    virtual VcsJob* copy( const KUrl& localLocationSrc,
                          const KUrl& localLocationDstn ) = 0;
 
     /**
      * moves src to dst, preserving history if the VCS system allows that, may
      * be implemented by copy+remove
      */
-    virtual VcsJob move( const KUrl& localLocationSrc,
+    virtual VcsJob* move( const KUrl& localLocationSrc,
                          const KUrl& localLocationDst ) = 0;
 
     /**
@@ -122,7 +123,7 @@
      * to the version in the repository
      * unedit() (if not a no-op) is implied.
      */
-    virtual VcsJob revert( const KUrl::List& localLocations,
+    virtual VcsJob* revert( const KUrl::List& localLocations,
                            RecursionMode recursion ) = 0;
 
     /**
@@ -135,14 +136,14 @@
      * @param recursion defines wether the directories should be updated
      * recursively
      */
-    virtual VcsJob update( const KUrl::List& localLocations,
+    virtual VcsJob* update( const KUrl::List& localLocations,
                            const VcsRevision& rev,
                            RecursionMode recursion ) = 0;
 
     /**
      * Checks in the changes of the given file(s)/dir(s) into the repository
      */
-    virtual VcsJob commit( const QString& message,
+    virtual VcsJob* commit( const QString& message,
                            const KUrl::List& localLocations,
                            RecursionMode recursion ) = 0;
 
@@ -150,7 +151,7 @@
      * 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,
+    virtual VcsJob* showCommit( const QString& message,
                                const KUrl::List& localLocations,
                                RecursionMode recursion ) = 0;
     /**
@@ -161,7 +162,7 @@
      *
      * The diff is in unified diff format for text files
      */
-    virtual VcsJob diff( const QVariant& localOrRepoLocationSrc,
+    virtual VcsJob* diff( const QVariant& localOrRepoLocationSrc,
                          const QVariant& localOrRepoLocationDst,
                          const VcsRevision& srcRevision,
                          const VcsRevision& dstRevision,
@@ -173,7 +174,7 @@
      * 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
      */
-    virtual VcsJob showDiff( const QVariant& localOrRepoLocationSrc,
+    virtual VcsJob* showDiff( const QVariant& localOrRepoLocationSrc,
                              const QVariant& localOrRepoLocationDst,
                              const VcsRevision& srcRevision,
                              const VcsRevision& dstRevision ) = 0;
@@ -185,7 +186,7 @@
      * @param limit Restrict to the most recent @p limit entries. Note that the
      * limit is @e advisory and may be ignored.
      */
-    virtual VcsJob log( const KUrl& localLocation,
+    virtual VcsJob* log( const KUrl& localLocation,
                         const VcsRevision& rev,
                         unsigned long limit ) = 0;
 
@@ -196,7 +197,7 @@
      * @param limit Do not show entries earlier than @p limit. Note that the
      * limit is @e advisory and may be ignored.
      */
-    virtual VcsJob log( const KUrl& localLocation,
+    virtual VcsJob* log( const KUrl& localLocation,
                         const VcsRevision& rev,
                         const VcsRevision& limit ) = 0;
 
@@ -205,7 +206,7 @@
      *
      * @param rev List @p rev and earlier. The default is HEAD.
      */
-    virtual VcsJob showLog( const KUrl& localLocation,
+    virtual VcsJob* showLog( const KUrl& localLocation,
                             const VcsRevision& rev ) = 0;
 
     /**
@@ -214,7 +215,7 @@
      * @param localLocation local file that should be annotated.
      * @param rev Revision that should be annotated.
      */
-    virtual VcsJob annotate( const KUrl& localLocation,
+    virtual VcsJob* annotate( const KUrl& localLocation,
                              const VcsRevision& rev ) = 0;
 
     /**
@@ -223,7 +224,7 @@
      * @param localLocation local file that should be annotated.
      * @param rev Revision that should be annotated.
      */
-    virtual VcsJob showAnnotate( const KUrl& localLocation,
+    virtual VcsJob* showAnnotate( const KUrl& localLocation,
                                  const VcsRevision& rev ) = 0;
 
     /**
@@ -232,7 +233,7 @@
      * 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
      */
-    virtual VcsJob merge( const QVariant& localOrRepoLocationSrc,
+    virtual VcsJob* merge( const QVariant& localOrRepoLocationSrc,
                           const QVariant& localOrRepoLocationDst,
                           const VcsRevision& srcRevision,
                           const VcsRevision& dstRevision,
@@ -242,7 +243,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* resolve( const KUrl::List& localLocations,
                             RecursionMode recursion ) = 0;
 
     /**
@@ -256,7 +257,7 @@
      * take the local directory and add it into the repository at the given
      * target
      */
-    virtual VcsJob import( const KUrl& localLocation,
+    virtual VcsJob* import( const KUrl& localLocation,
                            const QString& repositoryLocation,
                            RecursionMode recursion ) = 0;
 
@@ -265,7 +266,7 @@
      * hierarchy. The mapping exactly tells which file in the repository
      * should go to which local file
      */
-    virtual VcsJob checkout( const VcsMapping& mapping ) = 0;
+    virtual VcsJob* checkout( const VcsMapping& mapping ) = 0;
 };
 
 }


_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic