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

Re: new user need help (repo. older then working copy)

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-11 20:37:35 CET

On Dec 11, 2007, at 13:30, Kuang-Chun Cheng wrote:

> However, I did believe the following feature should be useful (but
> it doesn't work):
> 1) compare revision in repo. with a target directory (no matter
> it's a working directory
> or not) and create a patch.

Subversion does not have this feature, but you can do it yourself:
export (not check out) a copy from the repository (svn checkout url://
to/repo/whatever freshexport), and run "diff -ru freshexport
dirwithyourchanges > patch". Then you can apply that patch as below.
However, note that the patch format does not provide a way to
represent adding files, deleting files, moving files, so you will
need to manually deal with those changes.

> 2) check out a new working copy
> 3) apply the patch to new working copy
> 4) commit patched version back to repo.
>
> I think this is not a bad idea, so I tried it ... but it doesn't
> work :-(

You didn't say how it doesn't work.

> Somehow, I feel subversion relies on working copy a little too much
> in my case.
> Anyway, I can live with that.
>
> Use post-commit is OK ... but IMHO I won't say it's a great
> idea .... because, basically, that
> means subversion is "perfect" only if I always commit twice everytime.

No, you only have to commit once. You just should back up that commit
in the post-commit hook, for example using svnadmin dump to dump the
just-committed revision to a new text file in a backup directory
somewhere, or even copy it to another backup machine somewhere.
Subversion is not a replacement for a backup strategy, and I'm
telling you your backup strategy should be such that no revision of
the repository should ever not be backed up, because of the problems
you have encountered that you otherwise find yourself running into.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 11 20:47:13 2007

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.