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

FS copy model

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-01-03 05:46:43 CET

Okay... this isn't related to the network layer. Honest!


Let's say that I have the following items of interest in the FS:

  / 1.37
  /A 50.7
  /A/foo 73.4
  /B 61.8

Now I make a copy of /A/foo to /B/foo. The IDs are now:

  / 1.38
  /A 50.7
  /A/foo 73.4
  /B 61.9
  /B/foo 73.4

And one more copy to /B/bar:

  / 1.39
  /A 50.7
  /A/foo 73.4
  /B 61.10
  /B/foo 73.4
  /B/bar 73.4

In each copy, you'll note that only the directory's ID changes because I'm
not actually making any change to 73.4. We see /B change and the resulting
bubble-up to /.

Question: should /B/foo and /B/bar know that they came from /A/foo? To put
it another way, when somebody pulls up a change log for /B/foo:

  1) they will see the changes from 73.1 thru 73.4
  2) will they *also* see that /B/foo was copied from /A/foo?

In the above handling of node IDs and copying, the answer is "No, they have
no way of knowing whether /B/foo was copied from /A/foo or from /B/bar. The
user *might* have a way to see that they are related, but only the
inspection of parent directory changes will show the actual ordering of
copies. Even then, the comment for the revision may not specify what was
copied from where."

Another alternative is to spin a new revision of 73.4 and insert some
property / comment / marker saying that it was copied from /A/foo. The final
ID table would look like:

  / 1.39
  /A 50.7
  /A/foo 73.4
  /B 61.10

Which approach are we using today? (has it been considered?) Is that the
preferred approach?

I think another way to phrase the question is:

  Do we record a copy from one location to another in the FS? If so, then
  how is it recorded? Is there a machine-readable marker? (the checkin
  comment is not machine-readable)


Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:19 2006

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

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