[RFC] Workingstyle of different VCS systems

Andreas Pakulat apaku at gmx.de
Thu Apr 12 20:14:58 UTC 2007


On 11.04.07 10:15:48, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > On 10.04.07 10:25:13, Matthew Woehlke wrote:
> >> I assume the point of all this is to be able to script a checkout or 
> >> branch without user interaction? I still think I would use a VCS-defined 
> >> object to represent a checkout or branch; it simplifies the interface. 
> >> There should be a factory method to create a placeholder object from an 
> >> identifier (i.e. the name, above). Then there should be a method to add 
> >> a mapping, with an option to make it recursive or not (in perforce, the 
> >> difference is '//URL/path/*' vs. '//URL/path/...', so this would be svn 
> >> compatible) and an option to specify an exclusion. This method is 
> >> allowed to fail if any mapping already exists*, and/or if you request an 
> >> excluding (rather than including) mapping.
> >  
> > I like this idea, so for svn I'd create just 1 mapping having the
> > repo-url and the local path. 
> 
> Right... except, why just one? :-) Certainly I would assume branching 
> can handle many (you might have to do them one at a time, but that's a 
> back-end detail),

Well, I don't think people branch multiple things at once, i.e.
http://foobar/app1->http://foobar/branches/app1-todo
http://foobar/app2->http://foobar/branches/app2-todo
doesn't seem like a normal thing to do. But hey whatever, if the API
supports...

> and you can check out several things, again one at a 
> time. Doesn't svn even figure out how to correctly do an update when you 
> do this? (e.g. the admin directory we have in 3.x?) Or am I imagining that?

Pulling stuff from other URL's is done differently in svn, it uses
svn:externals for that. A working copy is always checked out from 1
directory (+any externals, but those are properties of one of the
subdirectories in the checked-out-dir).

> > So whats difference between an additional class and having a QMap+Flag
> > (for the recursion thing, or anything the plugin wants to provide as
> > flags)?
> 
> You mean that each item in the QMap has a flag, yes? :-) Hmm... maybe 
> that works, although I don't see why you wouldn't just use a list. 

I actually meant 1 flag for all entries, but I think per mapping is
better. And then QMap doesn't work anymore... So I guess something like
this is ok (possibly some more convenience stuff):

ISCMParameter{
public:
  enum CheckoutFlag{
    Recursive,
    NonRecursive
    };
  void addMapping(const QString& key, const QString& value, CheckoutFlag);
  QStringList keys();
  QStringList value(const QString& key);
  CheckoutFlag flag(const QString& key);
};

Andreas

-- 
It is so very hard to be an
on-your-own-take-care-of-yourself-because-there-is-no-one-else-to-do-it-for-you
grown-up.




More information about the KDevelop-devel mailing list