[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

more about revisions and such

From: Perry E. Metzger <perry_at_wasabisystems.com>
Date: 2001-11-26 17:46:05 CET

Ben Collins-Sussman <sussman@collab.net> writes:
> > I might still want to be able to identify which revision and branch
> > a file originated on in a customer delivered set.
>
> Every node in the filesystem remembers the revision in which it was
> first created. Nodes have no idea what 'branch' they belong to, since
> branches and tags are ordinary directories. But if a file is copied
> to a branch or tag area, the copy-history is remembered.
>
> If running 'svn log foo.c' showed you the history of foo.c -- and
> traced all the way back to the first revision in which it was created,
> as well as the directory in which it originated... that's enough for
> your use-case, right?

Not really. Allow me to explain the motive. Someone who does not have
access to the repository is delivered a source tree. They can't type
"svn log". They are having problems. You want to ask them to
(essentially) give you a string which will identify the file version
they're looking at (i.e. "foo.c 1.29") or you want to give them a
string like that and ask them if the file is that version.

The path in the repository + the global revision number should be
unique though, yes? That would be sufficient. Presumably $REVISON$
will handle that.

By the way, although they are not necessarily useful from an internal
infrastructure point of view, having a syntax for referring to an
individual file's changes. They could be translated by the system into
the global revision numbers when they are referred to, but they make a
convenient shorthand.

"What happened between the last two changes of this file" is often
something you want to ask, but having to remember in a huge repository
that those were revision numbers 102385833 and 102386924 might get to
be a bit much to type. Remember that a project like NetBSD gets
hundreds of commits a day -- the revision numbers will get dazzling
and thus hard to type very fast.

If you are doing an

        svn diff -r 102385833 -r 102386924 foo.c

it will be hard to see if you made a mistake.

Asking for "+101" and "+102"

        svn diff -r +101 -r +102 foo.c

(that's an off-the-cuff invented syntax meaning "change 101 and 102
to foo.c numbering from the origin" and may suck) or even

        svn diff -r -2 -r -1 foo.c

indicating the change just before the head and the change just before
that to this file would be cool things. (-0 could mean the head, +0
the origin -- though again, this might suck.) Presumably subversion
wouldn't grok that internally but the tools could know you were
referring to that particular file's history.

--
Perry E. Metzger		perry@wasabisystems.com
--
NetBSD Development, Support & CDs. http://www.wasabisystems.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006

This is an archived mail posted to the Subversion Dev mailing list.