Hi Christian.
Before you spend lots more time and effort on discussing how to
implement "this thing" efficiently ...
I think this feature is exactly the sort of thing that would make sense
as a plug-in to Subversion, and not as part of the core product, but
Subversion does not (yet) have a plug-in architecture that would support
this. It would be valuable to determine what kind of plug-in support
would be needed to enable this.
If you want this to be a "feature" rather than a "hack", or if you are
thinking in terms of submitting it to the central Subversion code base,
then as well as an efficient implementation it also needs to have a
good, simple, high-level behavioural definition. It would not be enough
just to specify how the "update" command would behave. For example, it
could be something like ...
"The HeadRev keyword gives the head revision number of the
repository. Every Subversion command that contacts the
repository and potentially modifies the WC (including commit
and export) will update the HeadRev keyword value in every
file in which it occurs in the scope of the command."
... but with more detail.
I think the lack of a good high-level definition is the more significant
reason why this has not been done before. I do not even know if a
sensible definition is possible. Picture the scene when you are working
on a project that is one of many projects in a busy repository. Every
time you update to "head", even if no changes have been made to your
files the "head" revision number changes because several commits have
been made to other projects in the repository. And then a minute after
you have updated, the number is already out of date, so what is the
point of this information? Or rather, why is this information related to
files in your working copy? It isn't, it's related to the repository. If
I wanted a number that indicates which revision of my project I'm
building, then maybe I would want the highest revision number in which
any file in my project was committed, not the head of the repository. At
least that number would only change when my project changes.
If you just want to hack up something that works for you and build your
own copy of Subversion from your source code, that's totally fine and I
think you can achieve that, although it might be harder than you expect.
We would be glad to advise you on implementation details.
- Julian
Received on 2009-12-24 17:04:51 CET