VcsRevision usage question.

Matthew Woehlke mw_triad at users.sourceforge.net
Thu Jun 7 19:11:26 UTC 2007


Robert Gruber wrote:
> While porting CVS plugin to our new VCS-interface 
> I got stopped by VcsRevision having no implementation.

I think that's because each plug-in is supposed to provide its own 
implementation, because it may differ, e.g. CVS has only FileNumber's 
and they look different than FileNumber's in, say, Perforce.

> While implementing I asked myself, what's the deal with 
> the RevisionSpecialType enum. I can't see anything using it. 
> Shouldn't there be something like:
> void setSpecialRevision(RevisionSpecialType type);

The intent was to provide global static instances of e.g. HEAD, BASE, 
etc. I don't think we ever got around to this; they probably should be 
listed in vcshelpers.h.

Andreas, does this look OK?

Index: vcshelpers.h
===================================================================
--- vcshelpers.h        (revision 671417)
+++ vcshelpers.h        (working copy)
@@ -85,6 +85,11 @@
       * return the value of this revision
       */
      QString revisionValue() const;
+
+    static VcsRevision head();
+    static VcsRevision working();
+    static VcsRevision base();
+    static VcsRevision previous();
  };


(btw, the correct path to apply patches is now 
/trunk/KDE/kdevplatform/src/vcs, yes?)

-- 
Matthew
Any sufficiently advanced bug is indistinguishable from a feature.
(...with apologies to Arthur C. Clarke)





More information about the KDevelop-devel mailing list