jonatan wrote:
> I recently installed Subversion to handle all PHP code on a web
> server. I have a few questions/issues from the perspective of a newbie
> to Subversion and SCM software in general.
>
> 1) "svn delete". This seems to delete the file permanently. Suppose I
> have files a and b in revision 1, but in revision 2 I do away with
> file b. Since the file is deleted permanently, there is no way to
> revert to revision 1, since b is deleted. Am I missing something, or
> is there some other way of deleting a file from future revisions
> without deleting it from past revisions?
Yes, you're missing something. :-)
You can /never/ delete history. Your file b is still there, it's just
not visible in the HEAD revision. To paraphrase your question:
$ svn add a b
$ svn commit
This creates your revision 1, with files a and b.
$ svn rm b
$ svn commit
You're now at revision 2; that revision doesn't contain b any more.
However, b still exists in revision 1. You can get it back by updating
to revision 1 again:
$ svn up -r 1
If course, that won't bring back b in HEAD. But you can also resurrect a
delted file:
$ svn cp -r1 <repos-url>/b b
$ svn commit
This will copy b as it existed in revision 1 to your working copy, and
commit it, creating revision 3.
> 2) Stacked commits. I am sometimes offline for periods of time. It
> would be great if I could somehow stack up commits to be performed
> when I get online again. Otherwise I'll have to make one huge commit
> with all changes, which would make the changes less easily
> distinguishable. I realize there may be problems (conflicts) when
> multiple users are committing changes, but since I am the only user
> accessing the repository, I don't see why this wouldn't be possible.
> Any thoughts?
That would require distributed repositories; you'd need a local
repository copy that could somehow be synchronized with the master after
several commits. Subversion doesn't support that (yet). and won't before
1.0.
> 3) I get intermittent crashes from the BDB when running "svn export".
> It has happened about three times, and I'm only at revision 11.
>
> svn: Couldn't open a repository.
> svn: Unable to open an ra_local session to URL
> svn: Unable to open repository file:///home/arksvn/trunk
> svn: Berkeley DB error
> svn: Berkeley DB error while opening environment for filesystem
> /home/arksvn/db:
> DB_RUNRECOVERY: Fatal error, run database recovery
>
> Running "svnadmin recover" fixes it though. Is this normal? (My server
> is running SVN r3987 and BDB 4.0.14).
This shouldn't happen through normal use. Can you reproduce this
consistently? If yes, can you tell us exactly how?
> 4) How do I find out which revision of Subversion I'm running, when I
> am running a dev build? "svn --version" just shows "svn, version
> 0.16.0 (dev build)".
You can't, really. All you know is that your binaries weren't built from
a release tarball, but from a working copy. There's no guarantee in
general that all the files in the working copy were at the same version.
Only the person who built the binaries can be sure.
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 28 19:10:48 2002