You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nuutti Kotivuori <na...@iki.fi> on 2002/12/02 19:59:24 UTC

idea: a revision keyword expanded only at 'svn export' time

Every now and then someone comes up with the desire to have their
distribution tarballs / daily builds / hacked compilations to contain
the current revision number.

And always it's the same old tune "First of all, your working copy
might have mixed revisions, so a revision might be incorrect there,
but if you reallywanttodothis, then just grep the revision from 'svn
info .'"

Now, this is only an idea that came up on IRC, and I haven't really
thought it through, but it sounds nice, so I'll put it here.

Let's have a new expandable keyword that is only expanded when 'svn
export' is run and it is expanded to the revision being exported. Good
points about this:

 - It's finally a keyword that expands to the "current changeset
   version" as many people want it.

 - It cannot easily be mixed revision, since an export from an URL
   can't make such things - and with HeadURL, it uniquely identifies
   the path and revision from where it is taken from.

 - It subversively supports using 'svn export' for all sorts of
   "release" stuff instead of working copies - which I think is a
   very nice thing.

Open issues to still think about this:

 - What about exports from other working copies? Should there be a
   revision then? Or some fixed text such as "unknown"?

 - How's the keyword gonna look when not 'svn export':ed? Should it be
   just unexpanded? Or should it have some fixed text there as above?

 - Who's the poor guy who's gonna code all this? :-)

If someone thinks this is a good idea, this mail can probably be
stuffed in the issue tracker as a feature request - or it can be just
shot down right now :-)

But, I'm off to hit the sack for now.

-- Naked


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: idea: a revision keyword expanded only at 'svn export' time

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Nuutti Kotivuori <na...@iki.fi> writes:
> If someone thinks this is a good idea, this mail can probably be
> stuffed in the issue tracker as a feature request - or it can be just
> shot down right now :-)

I think it's a neat idea, but a bit too "creeping feature"ish.

If one has used export, then one already has the revision number.  If
one used checkout, then grepping for a head revision in the output of
'svn status -v' is safe (because it can't be a mixed working copy).

If one hasn't used export, then the keyword wouldn't have been
expanded anyway.  If one also hasn't used checkout, it might or might
not be a mixed working copy.

So the keyword doesn't buy us much in this case.  You can do greppy
things to get the keyword expansion, or you can do greppy things to
get it from 'svn st' output, or 'svn info' output.  Neither is much
more work than the other.  The only advantage is that the keyword is
already in some file's text -- a fairly minor advantage, imho.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org