On Dec 12, 2007 3:37 AM, Ryan Schmidt <subversion-2007b@ryandesign.com>
wrote:
>
> 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.
well, I used "svn diff -r4" in my rev8 working copy ... and
svn complain that there are no rev8.
>
>
> > 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.
I understand what you are saying. Just feel that per commit backup is
a little too much ... but you are right, I run into this problem because I
only backup at midnight ... so I lost one day history.
Regards
KC
Received on Tue Dec 11 21:08:13 2007