[RFC] Workingstyle of different VCS systems

Kuba Ober kuba at mareimbrium.org
Thu Apr 12 16:28:00 UTC 2007


On Tuesday 10 April 2007, Matthew Woehlke wrote:
> Kuba Ober wrote:
> > On Thursday 05 April 2007, Andreas Pakulat wrote:
> >> import - import a local dir into the VCS
> >
> > Has to be done by hand, basically doing aegis -new_file on each file in
> > the dir
>
> As Andreas said, that's what the back end is for. :-)
>
> >> state - get the state of a local file, currently possible state flags
> >> 	are:
> >> 	Added, Uptodate, Modified, Conflict (between VCS-version and
> >> 	local version), Sticky (some CVS thing, no idea what it means),
> >> 	NeedsPatch (what does that mean?), NeedsCheckout, Directory,
> >> 	Deleted, Replaced
> >
> > Aegis has only two possible states: a file may need to be merged with
> > upstream before integration, or not. Nothing else makes any sense.
>
> Hmm...
> added - file only exists in this change (right?)
> uptodate - file exists, but isn't in this change
> modified - file doesn't need merge, but is in this change (right?)
> conflict - file in this change *does* need merge (right?)
> deleted - can't you delete in aegis?
>
> ...so aegis can still map most of the states.

uptodate has no meaning in aegis -- a file either is in a change or it isn't, 
so if it isn't there is no "state".

added/modified/deleted are the same thing, unless you want to undo the 
operation -- from the point of view of the build, it's all the same. Well, 
except that deleted files are not listed in terse file lists (which is 
correct - the build system must ignore deleted files).

conflict is the only "real deal" thing - it implies a merge, and that can 
happen at several levels. You may need to merge your change with the branch, 
and if you're doing integration of a branch you may need to create a new 
change to merge the branch with upstream.

> I think "needspatch" means that you don't have the latest version. This
> would make sense in perforce, cvs, and svn, but I am guessing it does
> not apply to aegis?

What's the difference between needspatch and conflict? The only way you can 
have an "outdated" version in your change is if the branch the change is in 
had been altered, and you didn't merge yet.

> Ditto for "needscheckout"; means the file exists in 
> the repo but not in your working copy.

That's handled automatically, since you always have access to branch files, 
there's no need for checkout. Next time you build, the build system (if it 
properly uses aegis's file lists) will pick the file up, or barf.

> >> diff - show a difference between local file and latest VCS version, or 2
> >>        VCS versions
> >
> > Makes sense, but there needs to be a way of choosing which "latest VCS
> > version" do we talk about. There can be multiple branches of parallel
> > development!
>
> Actually you should always (i.e. for all plugins) be able to specify
> what VCS version to diff against. Andreas is right, though, "latest"
> should mean the version your change is based off of. (Actually, in
> general it should mean the file you would get if you reverted the file
> being diff'd.)

OK, so this is always the baseline of the branch you're in.

> >> localVersion - gives the version of the local file
> >
> > East: that's just the file in the change you're working on.
>
> I assume you meant "easy", but it's not *quite* that simple; IIUC the
> local version in aegis is "where did this file come from" (e.g. the
> change, baseline, etc.).

Yes, I meant easy. If you're working on a change, and the way kdevelop would 
be used you *always* work on a change, there's no question about that. The 
file is either in change or in an upstream baseline.

> >> copy - copy a file with VCS methods (history is kept)
> >
> > IIRC, aegis doesn't support this.
> >
> >> move - move/rename a file with VCS methods (history is kept)
> >
> > OK, aegis -move
>
> How can aegis support "move" but not "copy"? How can it not support
> "copy", period? (Note: in perforce, "copy" == "integrate"; aegis might
> use its merge or branch command to do a copy.)

OK, I don't know if you use aegis's terminology, or usual cvs/svn terminology. 
In aegis, copy means a checkout: you copy the file from the baseline into the 
change. A move means just what unix mv means. Aegis implements mv as an aegis 
copy (checkout) under a changed name, followed by removal of the file with 
the old name. Aegis does not support copying files. If you want to copy 
something, you do:
$cp file1 file2
$aegis -new_file file2

Cheers, Kuba




More information about the KDevelop-devel mailing list