Sometimes I lie awake at night wondering if we really know how to
version directory contents given a CVS-like working directory. Here
is one of the problem scenarios I came up with.
In the last phone conversation I was a part of, we determined (or so I
recall) that if a directory is listed in the WC as having version N,
then it has the base properties of version N and all the entries of
version N (plus any locally added entries), though those entries may
have versions other than N.
Okay. Now suppose someone does:
svn co -r 5 dirname
cd dirname
svn rm -f alpha
svn ci
svn update -r 5 dirname
After the "svn ci", what is the wc version of "dirname"? It pretty
much has to be 5; updating it would require bringing in any entry
changes from the new version, which could be expansive. Does
"dirname" still have an entry for alpha, with a distinguished revision
number meaning "deleted"? If not, then the update back to rev 5 will
fail, because the client won't report a variance for alpha and the
server won't know to tell the client to bring alpha back.
Perhaps I'm being paranoid, and we're already this clever. But I
thought I would bring it up to set my mind at ease.
As a second and possibly harder issue, if I "svn cp dir1 dir2", what
goes in the SVN files of dir2, which doesn't yet exist in the
repository? If I commit immediately, how does the client figure out
to report a single directory copy with no new files? What if I'm a
putz and I cd somewhere into dir2 and try to commit there?
Received on Sat Oct 21 14:36:27 2006