[TYPO3-v4] Remove @version annotation from files

Michael Stucki michael at typo3.org
Thu Aug 19 08:03:26 CEST 2010


Hi Christian,

> Remove @version annotation from FLOW3 classes
> 
> currently each PHP class contains the following line
>  * @version $Id: $
> That is replaced by SVN clients (if configured correctly) before comitting.
> 
> With the move to Git that won't be the case any longer, so we should get
> rid of these annotations.

I didn't use the feature often but the sense of it should be clear. It
helps to find out on what revision of a file a diff was based.
"svn diff" provides the revision in the header already, but when doing
this with the "diff" program then the information is missing.

That's the only reason I can think of but I also think it should not be
removed just because you don't like it. Yes we plan to move to Git, but
it didn't happen yet.

> I'd like to do the same for v4 for the following reasons:
> - The line is of limited use: svn log" tells this as well and more. Even
> without svn (packages), it's still not very usefull to know when a file
> was last changed (real history is missing).

As long as users send patches without using SVN, we may still find this
line helpful.

> - The feature is nowhere really documented, eg. my personal local svn
> client is *not* configured to replace this line by the real version when
> committing, it's currently inconsistent in the core.

True fact. It should be fixed, that's right.

> - It's pita to work with it: If you "svn diff" a file with changes +-3
> around this line, "svn diff" sets this line to " * @version $Id: $" in
> it's diff, while the real line is different. This is an svn bug which is
> already reported for ages but still not fixed yet. It leads to failing
> hunks when trying to re-apply this change (backporting, apply to a clean
> checkout before committing, ...).

That's a bug of your client then (or a misconfiguration). When I'm
changing the revision in a file then my SVN client doesn't even report
it as a change. So actually it wouldn't be a problem at all.

Besides this, you should be able to ignore these lines when creating a
diff (use diffs "-I" parameter to ignore lines matching a certain regex).

> - We don't need it anymore if we change to git as well.

True but that's not the case yet.

> - It's also a problem if mixing core svn with some other version system,
> eg. "git rebase" happily fails if there are local changes +-3 lines.

Same here.

> I already wasted hours with this stupid thing and would like to get rid
> of it, just as FLOW3 did.

I think it's mainly an issue of your SVN client.

> Other opinions? Anyone thinks this "feature" is *really* usefull and
> needed?

I don't insist on it but I see that it could still be useful for some
cases.

- michael


More information about the TYPO3-project-v4 mailing list