You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kotaro Murakami <km...@collab.net> on 2009/10/21 03:37:11 UTC

Seeking possible reason for error by diff -r PREV

Hi,

I got an error with diff command. When I used "svn diff -r PREV file.cpp", I got the following error.

svn: REPORT request failed on '/svnroot/・・・/file.cpp'
svn: File not found: revision 10838, path '/・・・/file.cpp'

I checked log of the file.cpp and the revisions in the logs look:

r17535
r16730
r16152
r14113
r13155
r12709
r12130
r11114 <- this is the first ci of this file

Btw the BASE is 20422. Where did revision 10838 in the error message come from?
So I thought that the diff command (diff -r PREV file.cpp) would compare r16730(PREV) and BASE.

How can I look into the problem to find out why this happened?

Thanks,
Kotaro

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409607

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Seeking possible reason for error by diff -r PREV

Posted by Stein Somers <ss...@opnet.com>.
I wrote:
 > if "svn log file.cpp -l 1" prints r17535 as the
 > last change, then PREV for that file is r17534

Wrong. The first log entries may show branching, or in general the copying of 
a parent directory of file.cpp. How you can locate direct changes on file.cpp 
with "svn log", I don't know. I guess "svn log file.cpp -v" and find the 
direct change in the change list. Incidentally, "svn log -r COMMITTED 
configure@HEAD" doesn't work for me either, but I guess svn log simply 
doesn't bother to trace the path from the peg revision.

"svn info -r COMMITTED file.cpp" is probably the quickest way and works fine 
for me, both on svn 1.6.5 and 1.4.2. As does "svn diff -r PREV file.cpp".

Barring wiser advise on the list, I think your repository is corrupt. I would 
"svnadmin dump" and load it somewhere else to figure that out.

-- 
Stein

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410614

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
The followings are some more info on this.

"svn info -r base file.cpp" prints r20422.
"svn info -r committed file.cpp" prints:
svn: REPORT request failed on '/svnroot/dir-0/!svn/bc/20422/dirs-m/dir-n/file.cpp'
svn: File not found: revision 10838, path '/dirs-m/info/file.cpp'
"svn info -r prev file.cpp" prints the same as the committed.

I know there is no '/dirs-m/info/file.cpp' in r10838 but the command refers to r10838 somehow.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410520

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Re: Re: Seeking possible reason for error by diff -r PREV

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Kotaro Murakami wrote on Mon, 26 Oct 2009 at 21:40 -0700:
> Hi John,
> 
> Thanks for your reply.
> 
> > Without seeing a revision file, it'll be hard to help you any further.
> 
> Did you mean a dump file of the repository? What is the "revision file" exactly?
> 

One of the numerically-named files under the directory $PATH_TO_REPOS/db/revs/.

Daniel

> Thanks,
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411596
> 
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411952

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Re: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
Hi John,

Thanks for your reply.

> Without seeing a revision file, it'll be hard to help you any further.

Did you mean a dump file of the repository? What is the "revision file" exactly?

Thanks,

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411596

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Changing a commit username

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 26, 2009, at 04:26, Jake Stone wrote:

> Our svn server is running on Apache with LDAP authentication, and  
> until
> recently any username was "DOMAIN/user" - we decided this was
> unnecessary since there was only one domain. A quick change to the
> server and usernames became just "user" The problem is, there are
> several commit made to the repository before this happened. Is it
> possible to replace these name in the repository? I would like to
> replace any instances of "DOMAIN/user" with "user" so searches by  
> commit
> name, etc work as expected.
>
> One user also had an incorrectly spelled username, and we have the  
> same
> problem.

If there are just a few occurrences, set up a pre-revprop-change hook  
to allow you to change revision properties. Then use "svn propset -- 
revprop -rREV svn:author AUTHOR" to set the author of revision "REV"  
to "AUTHOR". If there are many, you could write a script to automate  
this. You can remove the pre-revprop-change hook after you're done,  
unless you want to continue to allow people to edit revision properties.

Another option is to dump the repository with "svnadmin dump", then  
use svndumptool to transform the svn:author revprop as needed, then  
"svnadmin load" that into a new repository. This would involve the  
inconvenience of having your repository offline, and could take a long  
time, depending on how much data is in the repository. So probably  
you'll just want to use "svn propset" (or "svn propedit") as above.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411338

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Changing a commit username

Posted by Jake Stone <ja...@gmail.com>.
Hello!

Our svn server is running on Apache with LDAP authentication, and until 
recently any username was "DOMAIN/user" - we decided this was 
unnecessary since there was only one domain. A quick change to the 
server and usernames became just "user" The problem is, there are 
several commit made to the repository before this happened. Is it 
possible to replace these name in the repository? I would like to 
replace any instances of "DOMAIN/user" with "user" so searches by commit 
name, etc work as expected.

One user also had an incorrectly spelled username, and we have the same 
problem.

Thanks!

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411308

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Re: Re: Seeking possible reason for error by diff -r PREV

Posted by John Szakmeister <jo...@szakmeister.net>.
On Sun, Oct 25, 2009 at 7:55 AM, Kotaro Murakami <km...@collab.net> wrote:
> Hi John and Stein,
>
> Thanks for the reply.
> I tryied "svn log file.cpp -l 1" and it returned r17535.

I'm not sure how that last part is relevant (maybe I missed something
else in the thread).  'svn diff' and 'svn log' don't take the same
paths through the repository backend.

> I have not dump the repos but did "svnadmin verify" and it returned no error.

If 'svnadmin verify' didn't fail, you may be okay (although if you're
using a more recent version of svn, I believe it's regressed in some
regards).

RE: Re: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
Hi John and Stein,

Thanks for the reply.
I tryied "svn log file.cpp -l 1" and it returned r17535.

I have not dump the repos but did "svnadmin verify" and it returned no error.

Thanks,

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411158

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
Hi John and Stein,

Thanks for the reply.
I tryied "svn log file.cpp -l 1" and it returned r17535.

I have not dump the repos but did "svnadmin verify" and it returned no error.

Thanks,

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411159

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Re: Seeking possible reason for error by diff -r PREV

Posted by John Szakmeister <jo...@szakmeister.net>.
On Thu, Oct 22, 2009 at 11:50 PM, Kotaro Murakami <km...@collab.net> wrote:
> Thanks Stein.
> The svn version is 1.4.2 and the server is 1.4.0.
> I have not tried yet but "svn log --limit 1 file.cpp" will return r17535 since "--limit" just limits the number of lines displayed, no? Even so, in this case the COMMITTED should be r17535 (bcz "svn log file.cpp" prints r17535 first) and the PREV should be r16730 or r17534 like you said. I am not so sure which of the version svn takes for "diff -r PREV file.cpp" though.
>
> I would like to know a reason why this happens and to fix it if this happens because of a corrupted repository. Any ideas?

'svnadmin verify' or 'svnadmin dump' should help verify the integrity
of the repository.  See what it says.  I've seen a few revisions in
the past where a file was expected to be changed in a prior revision,
but the noderev and change entry was missing from that revision.

-John

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410928

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
Thanks Stein.
The svn version is 1.4.2 and the server is 1.4.0. 
I have not tried yet but "svn log --limit 1 file.cpp" will return r17535 since "--limit" just limits the number of lines displayed, no? Even so, in this case the COMMITTED should be r17535 (bcz "svn log file.cpp" prints r17535 first) and the PREV should be r16730 or r17534 like you said. I am not so sure which of the version svn takes for "diff -r PREV file.cpp" though.

I would like to know a reason why this happens and to fix it if this happens because of a corrupted repository. Any ideas?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410516

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Seeking possible reason for error by diff -r PREV

Posted by Stein Somers <ss...@opnet.com>.
> Is there a way to look into the working copy?

Well you can look in the files under the .svn directories. But since you just 
checked out, there's nothing useful there that isn't in the repository. 
Unless you have an unreliable disk/memory/system, but then I doubt you'd get 
to this point without other errors.

I've never used "-r PREV" and use TortoiseSVN for inspecting history. But 
from what I read and see, if "svn log file.cpp -l 1" prints r17535 as the 
last change, then PREV for that file is r17534 and that's what "svn diff -r 
PREV file.cpp" should be looking at. What is your "svn --version" anyway?

-- 
Stein

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410309

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Seeking possible reason for error by diff -r PREV

Posted by Kotaro Murakami <km...@collab.net>.
Thanks for the reply.
This happens just after the working copy created. My novice quesiton is that evenry info came from the repository after check out.
Is there a way to look into the working copy?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410012

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Seeking possible reason for error by diff -r PREV

Posted by Stein Somers <ss...@opnet.com>.
> Where did revision 10838 in the error message come from?

It's a shot in the dark with an empty water pistol, but maybe svnversion 
reports it as the oldest revision somewhere in the working copy.

-- 
Stein

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409732

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].