You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kuang-Chun Cheng <kc...@gmail.com> on 2007/12/11 11:55:33 UTC
new user need help (repo. older then working copy)
Hi,
My SVN repo. crash last week. I had re-install my RH5.1 and re-install
backup SVN repo. ....
My project has up-to-date revison 4 in backup repo. But my working copy
already has revison 8.
I knew I will lost history of revision 5,6,7 .... that's OK. But how can
I re-commit my revison 8 into repository and make it revison 5 in both
repo. and working copy ???
Regards
KC
Re: new user need help (repo. older then working copy)
Posted by Kuang-Chun Cheng <kc...@gmail.com>.
On Dec 12, 2007 3:37 AM, Ryan Schmidt <su...@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
Re: new user need help (repo. older then working copy)
Posted by Ryan Schmidt <su...@ryandesign.com>.
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
Re: new user need help (repo. older then working copy)
Posted by Kuang-Chun Cheng <kc...@gmail.com>.
On Dec 12, 2007 2:48 AM, Ryan Schmidt <su...@ryandesign.com>
wrote:
> On Dec 11, 2007, at 06:25, Kuang-Chun Cheng wrote:
>
> > On Dec 11, 2007 8:13 PM, Andy Levy wrote:
> >
> >> On Dec 11, 2007 6:55 AM, Kuang-Chun Cheng wrote:
> >>
> >> > My SVN repo. crash last week. I had re-install my RH5.1 and re-
> >> install
> >> > backup SVN repo. ....
> >> >
> >> > My project has up-to-date revison 4 in backup repo. But my
> >> working copy
> >> > already has revison 8.
> >> > I knew I will lost history of revision 5,6,7 .... that's OK.
> >> But how can
> >> > I re-commit my revison 8 into repository and make it revison 5
> >> in both
> >> > repo. and working copy ???
> >>
> >> Copy your changes to a safe place, check out a new working copy, copy
> >> your changes into that new WC, then commit.
> >
> > Any easier way to do that ?
> > Can I force working copy to old revision (rev 4 in my case)
> > without revert my modification ? Thanks a lot.
>
> Nope, no easier way. Do it the way Andy said.
>
> Subversion does not make this situation "easy" because it should
> never arise if you have up to date backups of your repository.
> Therefore, it is imperative that you have up to date backups of your
> repository at all times. Best practice: back up from the post-commit
> hook, after every commit.
Thanks .... and in fact, I already did that ...
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.
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 :-(
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.
Regards
KC
Re: new user need help (repo. older then working copy)
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 11, 2007, at 06:25, Kuang-Chun Cheng wrote:
> On Dec 11, 2007 8:13 PM, Andy Levy wrote:
>
>> On Dec 11, 2007 6:55 AM, Kuang-Chun Cheng wrote:
>>
>> > My SVN repo. crash last week. I had re-install my RH5.1 and re-
>> install
>> > backup SVN repo. ....
>> >
>> > My project has up-to-date revison 4 in backup repo. But my
>> working copy
>> > already has revison 8.
>> > I knew I will lost history of revision 5,6,7 .... that's OK.
>> But how can
>> > I re-commit my revison 8 into repository and make it revison 5
>> in both
>> > repo. and working copy ???
>>
>> Copy your changes to a safe place, check out a new working copy, copy
>> your changes into that new WC, then commit.
>
> Any easier way to do that ?
> Can I force working copy to old revision (rev 4 in my case)
> without revert my modification ? Thanks a lot.
Nope, no easier way. Do it the way Andy said.
Subversion does not make this situation "easy" because it should
never arise if you have up to date backups of your repository.
Therefore, it is imperative that you have up to date backups of your
repository at all times. Best practice: back up from the post-commit
hook, after every commit.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: new user need help (repo. older then working copy)
Posted by Kuang-Chun Cheng <kc...@gmail.com>.
Any easier way to do that ?
Can I force working copy to old revision (rev 4 in my case)
without revert my modification ? Thanks a lot.
Regards,
KC
On Dec 11, 2007 8:13 PM, Andy Levy <an...@gmail.com> wrote:
> On Dec 11, 2007 6:55 AM, Kuang-Chun Cheng <kc...@gmail.com> wrote:
> > Hi,
> >
> > My SVN repo. crash last week. I had re-install my RH5.1 and re-install
> > backup SVN repo. ....
> >
> > My project has up-to-date revison 4 in backup repo. But my working copy
> > already has revison 8.
> > I knew I will lost history of revision 5,6,7 .... that's OK. But how
> can
> > I re-commit my revison 8 into repository and make it revison 5 in both
> > repo. and working copy ???
>
> Copy your changes to a safe place, check out a new working copy, copy
> your changes into that new WC, then commit.
>
Re: new user need help (repo. older then working copy)
Posted by Andy Levy <an...@gmail.com>.
On Dec 11, 2007 6:55 AM, Kuang-Chun Cheng <kc...@gmail.com> wrote:
> Hi,
>
> My SVN repo. crash last week. I had re-install my RH5.1 and re-install
> backup SVN repo. ....
>
> My project has up-to-date revison 4 in backup repo. But my working copy
> already has revison 8.
> I knew I will lost history of revision 5,6,7 .... that's OK. But how can
> I re-commit my revison 8 into repository and make it revison 5 in both
> repo. and working copy ???
Copy your changes to a safe place, check out a new working copy, copy
your changes into that new WC, then commit.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org