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

Re: Join 3 Files with History?

From: Jan Hendrik <list.jan.hendrik_at_gmail.com>
Date: Mon, 17 Aug 2009 21:51:56 +0200

Concerning Re: Join 3 Files with History?
Ryan Schmidt wrote on 16 Aug 2009, 14:20, at least in part:

> On Aug 16, 2009, at 03:56, Jan Hendrik wrote:
>
> > From old days I have a frameset in one website project, consisting
> > of exactly three files:
> >
> > lecture.php (a HTML frameset)
> > content.php
> > footnotes.php
>
> [snip]
>
> > we want to get rid of that frameset and join the files into one,
> > e.g.:
> >
> > -- append footnotes.php to content.php;
> > -- overwrite lecture.php with the joined stuff
> >
> > But we would like to have this new lecture.php having the history of
> > its anchestors, too! Just merged into one big history like the
> > files were merged into one. Is that possible at all?
>
> In short, no. You can combine the other files into lecture.php by any
> means you like, but when you use "svn log" on it, it will show the
> history of lecture.php, and will not show the history of
> footnotes.php or content.php.

That's what I thought, too (and was afraid of). I'll have to figure out
which history is more important a/o more logical.

> > AFAICS I can copy content & footnotes onto lecture and state that in
> > the commit message. Or I can svn delete lecture.php, copy footnotes
> > to content and svn rename this to a new lecture.php. Yet either way
> > I will lose direct access to the history of at least one of the old
> > files.
>
> Yes, that's how it is. I know of no workaround.

Too bad. Well, I can easily see that it would be a rather
problematic feature to implement as the history of lecture.php
would have to point to many then. Three in this scenario, but
someone else might want to join even some more files.

> Peg revisions are not special or super revisions. They are your
> regular and ordinary revisions. There are just two ways of having
> Subversion use them: the usual way is called operative revisions and
> has the syntax "-r OPREV". The peg revision syntax is "@PEGREV" at
> the end of a URL. Consider:
>
> svn cat -r OPREV url://to/file_at_PEGREV
>
> It means: Go to revision PEGREV in the repository and get the object
> known at that time as "file". Then display revision OPREV of that
> object. This is useful if "file" was deleted at some point, then
> recreated anew later or copied from an entirely different object. The
> peg revision allows you to specify that you want the older object by
> the same name, not the object by that name that's currently there.

I assume that OPREV has to be smaller than PEGREV and would
display the file content.php_at_100 as it looked like in rev. 35 when it
probably even was named draft49.php still.

> Peg revisions are also good for examining objects which have been
> deleted from the HEAD. For example, if in revision 500 you delete
> content.php but you later want to go back and examine its log, you can
>
> svn log url://to/content.php_at_499
>
> You specify a peg revision in which the file still existed (so
> anything between the time the file was created and 499, since in 500
> it's gone). If you don't specify a peg revision, it defaults to HEAD,
> so "svn log url://to/content.php" (without a peg revision) won't work
> if you've deleted content.php from the HEAD.

Honestly, I still don't get it. Of course I understand that svn log
url://to/content.php won't work if content.php doesn't exist anymore
in HEAD. Yet why can't I say svn log -r499 url://to/content.php
when I want to see the log of rev. 499 for a file named content.php
present in that revision? Or svn log -r400:499 url://to/content.php?
Maybe because Subversions follows moves/renames? Either way I
would have to know first that in rev. 499 there still was a file named
content.php. Anyway, this leads off-topic and is of little use in this
case and at this moment - if I don't understand this, I can't explain
it to the writers who in turn I suspect cannot even access
peg_at_revisions at all through Tortoise or what ever they use as GUI.
 Someday I shall give that chapter another read.

Thanks for your time, Ryan.

JH
---------------------------------------
Freedom quote:

     The Founding Fathers knew
     a government can't control the economy
     without controlling people.
     And they knew when a government sets out to do that,
     it must use force and coercion to achieve its purpose.
     So we have come to a time for choosing.
               -- Ronald Reagan, October 27, 1964

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2384504

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-17 21:54:09 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.