You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Horton <kh...@rogers.com> on 2005/08/08 02:10:53 UTC
No such revision - how to fix?
I'm running svn 1.2.1 on OS X 10.4.2. I may have fouled things up
when I upgraded my operating system, and now svn is confused.
If I try to commit a change, I get a response like:
Sending sip/sip.info
svn: Commit failed (details follow):
svn: File not found: transaction '4-1', path '/sip/sip.info'
If I dig a bit deeper, I see:
% svn -v status
? sip.info.0937
5 5 root .
5 5 root sip notes
M 5 5 root sip.info
% svn log
svn: No such revision 5
I didn't think about svn during the OS upgrade, and I didn't get a
backup of the svn repository, but I did get a backup of my working
copy. I later restored the latest svn backup I had, so I think the
source of my problem is that the working copy is "newer" than my
current repository. What is the best way to get svn working again,
while keeping the various newer files that are in my working copy,
while keeping the older versions that are in the repository?
Thanks,
Kevin Horton
Ottawa, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: [Bulk] Re: No such revision - how to fix?
Posted by Kevin Horton <kh...@rogers.com>.
On 8 Aug 2005, at 05:55, Ryan Schmidt wrote:
> On 08.08.2005, at 04:10, Kevin Horton wrote:
>
>
>> If I try to commit a change, I get a response like:
>>
>> Sending sip/sip.info
>> svn: Commit failed (details follow):
>> svn: File not found: transaction '4-1', path '/sip/sip.info'
>>
>> If I dig a bit deeper, I see:
>>
>> % svn log
>> svn: No such revision 5
>>
>> I didn't think about svn during the OS upgrade, and I didn't get a
>> backup of the svn repository, but I did get a backup of my working
>> copy. I later restored the latest svn backup I had, so I think
>> the source of my problem is that the working copy is "newer" than
>> my current repository. What is the best way to get svn working
>> again, while keeping the various newer files that are in my
>> working copy, while keeping the older versions that are in the
>> repository?
>>
>
> I'd fix it this way:
>
> 1) Create an export of your "old" working copy (which has all the
> data in it that you want).
> 2) Create a new working copy from the repository.
> 3) Create an export of your "new" working copy (which is missing
> the newest revisions).
> 4) Create a diff (not an svn diff; just a normal diff) between the
> "new" export and the "old" export.
> (I suggest diffing exports, because if you diff working copies,
> you'll diff the .svn directories too which you need to avoid.)
> 5) Apply this diff to the "new" working copy.
> 6) Commit.
> 7) Throw away the exports and the "old" working copy.
>
> I just recreated the problem here and the solution seems to work:
>
> $ cd /path/to/wc-of-lost-repo
> $ svn log
> svn: No such revision 3
> $ svn co file:///path/to/restored-repo /path/to/new-wc
> A /path/to/new-wc/foo
> Checked out revision 2.
> $ svn export /path/to/wc-of-lost-repo /path/to/export-of-lost-repo
> Export complete.
> $ svn export /path/to/new-wc /path/to/new-export
> Export complete.
> $ cd /path/to/new-wc
> $ diff -ru /path/to/new-export /path/to/export-of-lost-repo | patch
> patching file foo
> $ svn ci -m "Restoring work lost in the OS upgrade fiasco."
> Sending foo
> Transmitting file data .
> Committed revision 3.
> $
>
> In my example I only lost 1 revision, so my revisions match up in
> the end; if you lost more than one, then your "new" working copy
> will still be several revision numbers short of where you were with
> the old repository. Either way, you should not use any old working
> copies of the old repository anymore, as they'll be out of sync
> with the restored older repo.
>
Ryan,
Thank you very much for the assistance. That worked perfectly, AFAICT.
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: No such revision - how to fix?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On 08.08.2005, at 04:10, Kevin Horton wrote:
> If I try to commit a change, I get a response like:
>
> Sending sip/sip.info
> svn: Commit failed (details follow):
> svn: File not found: transaction '4-1', path '/sip/sip.info'
>
> If I dig a bit deeper, I see:
>
> % svn log
> svn: No such revision 5
>
> I didn't think about svn during the OS upgrade, and I didn't get a
> backup of the svn repository, but I did get a backup of my working
> copy. I later restored the latest svn backup I had, so I think the
> source of my problem is that the working copy is "newer" than my
> current repository. What is the best way to get svn working again,
> while keeping the various newer files that are in my working copy,
> while keeping the older versions that are in the repository?
I'd fix it this way:
1) Create an export of your "old" working copy (which has all the
data in it that you want).
2) Create a new working copy from the repository.
3) Create an export of your "new" working copy (which is missing the
newest revisions).
4) Create a diff (not an svn diff; just a normal diff) between the
"new" export and the "old" export.
(I suggest diffing exports, because if you diff working copies,
you'll diff the .svn directories too which you need to avoid.)
5) Apply this diff to the "new" working copy.
6) Commit.
7) Throw away the exports and the "old" working copy.
I just recreated the problem here and the solution seems to work:
$ cd /path/to/wc-of-lost-repo
$ svn log
svn: No such revision 3
$ svn co file:///path/to/restored-repo /path/to/new-wc
A /path/to/new-wc/foo
Checked out revision 2.
$ svn export /path/to/wc-of-lost-repo /path/to/export-of-lost-repo
Export complete.
$ svn export /path/to/new-wc /path/to/new-export
Export complete.
$ cd /path/to/new-wc
$ diff -ru /path/to/new-export /path/to/export-of-lost-repo | patch
patching file foo
$ svn ci -m "Restoring work lost in the OS upgrade fiasco."
Sending foo
Transmitting file data .
Committed revision 3.
$
In my example I only lost 1 revision, so my revisions match up in the
end; if you lost more than one, then your "new" working copy will
still be several revision numbers short of where you were with the
old repository. Either way, you should not use any old working copies
of the old repository anymore, as they'll be out of sync with the
restored older repo.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org