You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Grant Edwards <gr...@visi.com> on 2008/05/29 20:11:46 UTC

How to compare working copy file with older version of that file?

I can't seem to figure out how to compare the working version
of a file with an old revision of that file.  Here's the log
for the file:

   $ svn log matrixConfig.h 
   ------------------------------------------------------------------------
   r2068 | grante | 2008-05-22 18:02:04 -0500 (Thu, 22 May 2008) | 2 lines
   
   Disable all ciphers except RC4-SHA so that ssldump could 
   decrypt application data.
   ------------------------------------------------------------------------
   r2057 | grante | 2008-05-21 11:00:19 -0500 (Wed, 21 May 2008) | 3 lines
   
   Merge in changes that came with the SSH beta release.
   
   
   ------------------------------------------------------------------------
   r1973 | grante | 2008-05-06 13:05:23 -0500 (Tue, 06 May 2008) | 3 lines
   
   Branch in which MatrixSSL/SSH incorporation is being done.
   
   
   ------------------------------------------------------------------------

According to the manual (p34), this should work, shouldn't it?

   $ svn diff -c 2068 matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'

What does /ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h
have to do with anything?  That's not the path of the file in
question (and I didn't ask about revision 1972).

According to the manual, this also should work but doesn't:

   $ svn diff -r 2057:2068 matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'

How do I ask for the differences between either the working
verion and an older version or between two older versions of a
file?

If I edit the file and then do "svn diff matrixConfig.h" it
works fine, but anything where I specify a version falls down.

-- 
Grant Edwards                   grante             Yow! Will this never-ending
                                  at               series of PLEASURABLE
                               visi.com            EVENTS never cease?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-29, Ryan Schmidt <su...@ryandesign.com> wrote:

>>>> I wonder if you have a corrupt repository, and Subversion runs
>>>> into trouble when it is trying to create the text of the file
>>>> you're asking about from its history of changes.  What happens
>>>> when you do "svn cat" of that file, with a URL, or with a -r
>>>> switch, or both?
>>>
>>> Same thing:
[...]
>>>    $ svn cat -r 2057 matrixConfig.h
>>>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/ 
>>> matrixssl/src/matrixConfig.h'
>>>
>>> <and in a different directory that's not a working copy of anything...>
>>>
>>>    $ svn cat -r 2057 svn://lnxdb/devicemaster/ecos/ecosapps/ branches/MatrixSSL/matrixssl/src/matrixConfig.h
>>>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'
>>
>> Both the branch and the file in question were added by revision
>> 1973.  Neither that branch nor the file existed in revision 1972.
>>
>> I don't get why svn thinks that file should exist in the trunk
>> in revision 1972.
>
> Can you try verifying the repository? Run "svnadmin verify /path/to/ 
> repository" on the server.

I'll ask the admin to do that when he comes in tomorrow.

-- 
Grant Edwards                   grante             Yow! Will the third world
                                  at               war keep "Bosom Buddies"
                               visi.com            off the air?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-30, Les Mikesell <le...@gmail.com> wrote:

>>>> It appears from the log that I committed both the "copy"
>>>> operation that created the branch and the additions of the new
>>>> files in a single "commit".  Is that illegal?
>>> If you copy workspace -> URL
>> 
>> I'm pretty sure I didn't do that (I wasn't aware you could do
>> that).

[...]

> I don't understand how a copy to create a branch can also
> include newly created files unless the source of the copy is
> the workspace.

Good point.  The log definitely shows them happening with a
single commit. If copying from a workspace is the only way that
could happen, then I must have done it that way -- which would
be odd, since that's certainly not the way I normally do it.

> Otherwise you should have a revision # for the creation of the
> branch copy and at least another revision for the commit where
> files were added.

There's only a single log entry that shows the new branch and
the addition of the new files in that branch.  I believe I
posted the excerpt from the log showing that somehwere up the
thread, but I can post it again if it would illuminate anything.

-- 
Grant Edwards                   grante             Yow! Send your questions to
                                  at               ``ASK ZIPPY'', Box 40474,
                               visi.com            San Francisco, CA 94140,
                                                   USA


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Les Mikesell <le...@gmail.com>.
Grant Edwards wrote:
> 
>>> It appears from the log that I committed both the "copy"
>>> operation that created the branch and the additions of the new
>>> files in a single "commit".  Is that illegal?
>> If you copy workspace -> URL
> 
> I'm pretty sure I didn't do that (I wasn't aware you could do
> that).
> 
>> you can get changes in the copy that aren't committed anywhere
>> else - and sometimes you might want that.
> 
> I'm sorry, I don't understand what means (nor how it relates to
> the question).

I don't understand how a copy to create a branch can also include newly 
created files unless the source of the copy is the workspace.  Otherwise 
you should have a revision # for the creation of the branch copy and at 
least another revision for the commit where files were added.

-- 
   Les Mikesell
    lesmikesell@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-30, Les Mikesell <le...@gmail.com> wrote:

>> It appears from the log that I committed both the "copy"
>> operation that created the branch and the additions of the new
>> files in a single "commit".  Is that illegal?
>
> If you copy workspace -> URL

I'm pretty sure I didn't do that (I wasn't aware you could do
that).

> you can get changes in the copy that aren't committed anywhere
> else - and sometimes you might want that.

I'm sorry, I don't understand what means (nor how it relates to
the question).

>> I guess I can create a new branch from the trunk and re-add
>> the current versions of the new files.  Assuming that new
>> branch isn't broken, I'll at least have access to revisions
>> from this point forward.  I won't have history on the added
>> files prior to today, but by access to old revs of those files
>> isn't really working anyway.
>
> If you expect the start of a branch to have continuous history
> back through the trunk before the branch was created, you need
> to either commit all changes back to the trunk before copying
> the workspace to a branch or create the branch by copying a
> trunk revision instead of the workspace.

The files that were copied from the trunk to the branch do have
continuous history back through the trunk before the branch was
created.

I'll try to explain the problem more clearly:

The problem is with the new files that were added when the
branch was created.  

The new files that were added don't have history prior to the
point where they were added.  Nobody expects them to -- except,
apparently, the "svn" command line client.

IOW, the svn command is failing because it can't find versions
of files prior to the point where they were added to svn:

   $ svn log -v sslStartup.c
   
   ------------------------------------------------------------------------
   r2065 | grante | 2008-05-22 18:00:28 -0500 (Thu, 22 May 2008) | 2 lines
   Changed paths:
      M /ecos/ecosapps/branches/MatrixSSL/sslStartup.c
   
   Handle case where DH support isn't included in 
   crypto lib.
   ------------------------------------------------------------------------
   r1973 | grante | 2008-05-06 13:05:23 -0500 (Tue, 06 May 2008) | 3 lines
   Changed paths:
      A /ecos/ecosapps/branches/MatrixSSL (from /ecos/ecosapps/trunk:1972)
   [...]
      A /ecos/ecosapps/branches/MatrixSSL/sslStartup.c
   
   Branch in which MatrixSSL/SSH incorporation is being done.


   
   
   $ svn cat -r 2064 sslStartup.c
   
   ------------------------------------------------------------------------
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/sslStartup.c'


The file was added to a branch in rev 1973.  When I try to
cat or compare with any rev other than the current rev using
the "-r" option, svn kacks becaus it can't find the file in the
trunk in rev 1972.  The file never existed (and still doesn't
exist) in the trunk.  The file never existed at all prior to
revision 1973. Yet, svn insists on trying to find the file in
revision 1972 of the trunk.

If I do a "cat -r 2065" sslStartup.c, that works fine because
I'm asking for the current version of the file.  Doing a "cat -r"
or "diff -r" on any older version fails.

-- 
Grant Edwards                   grante             Yow! for ARTIFICIAL
                                  at               FLAVORING!!
                               visi.com            


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Les Mikesell <le...@gmail.com>.
Grant Edwards wrote:
> 
>> Did you create the branch, delete it, then create it again?
> 
> No, not that I remember, and I don't see any indication of that
> in the log for the parent directory.
> 
> It appears from the log that I committed both the "copy"
> operation that created the branch and the additions of the new
> files in a single "commit".  Is that illegal?

If you copy workspace -> URL you can get changes in the copy that aren't 
committed anywhere else - and sometimes you might want that.

> I guess I can create a new branch from the trunk and re-add the
> current versions of the new files.  Assuming that new branch
> isn't broken, I'll at least have access to revisions from this
> point forward.  I won't have history on the added files prior
> to today, but by access to old revs of those files isn't really
> working anyway.

If you expect the start of a branch to have continuous history back 
through the trunk before the branch was created, you need to either 
commit all changes back to the trunk before copying the workspace to a 
branch or create the branch by copying a trunk revision instead of the 
workspace.

-- 
   Les Mikesell
    lesmikesell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Re: How to compare working copy file with older version of that file?

Posted by Paul Koning <Pa...@dell.com>.
>>>>> "Grant" == Grant Edwards <gr...@visi.com> writes:

 Grant> On 2008-05-30, Paul Koning <Pa...@dell.com> wrote:
 >> Did you create the branch, delete it, then create it again?

 Grant> No, not that I remember, and I don't see any indication of
 Grant> that in the log for the parent directory.

That's where you would see it.

 Grant> It appears from the log that I committed both the "copy"
 Grant> operation that created the branch and the additions of the new
 Grant> files in a single "commit".  Is that illegal?

I've done that; it should be fine.  So now I'm flat out of ideas...

     paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-30, Paul Koning <Pa...@dell.com> wrote:

> Did you create the branch, delete it, then create it again?

No, not that I remember, and I don't see any indication of that
in the log for the parent directory.

It appears from the log that I committed both the "copy"
operation that created the branch and the additions of the new
files in a single "commit".  Is that illegal?

I guess I can create a new branch from the trunk and re-add the
current versions of the new files.  Assuming that new branch
isn't broken, I'll at least have access to revisions from this
point forward.  I won't have history on the added files prior
to today, but by access to old revs of those files isn't really
working anyway.

The admin tells me that the server is 1.3.1 and I'm running a
1.4.6 client.  Is that an issue?

-- 
Grant Edwards                   grante             Yow! I guess it was all a
                                  at               DREAM ... or an episode of
                               visi.com            HAWAII FIVE-O ...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Re: How to compare working copy file with older version of that file?

Posted by Paul Koning <Pa...@dell.com>.
Did you create the branch, delete it, then create it again?

    paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-29, Ryan Schmidt <su...@ryandesign.com> wrote:

> Can you try verifying the repository? Run "svnadmin verify /path/to/ 
> repository" on the server.

svnadmin verify passes.  It also seems to work if you use the
URL@rev notation:

   $ svn cat -r 2068 svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'
   
   $ svn cat svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h@2068 | head -n5
   /*
    *      matrixConfig.h
    *      Release $Name: MATRIXSSL_2_1_7_COMM $
    *
    *      Configuration settings for building the MatrixSSL library.

Smartsvn is able to view old version of the file, but rapidsvn
and esvn can't.

What's really annoying is that I can't compare the working
version of a file with older revisions of that file using the
normal sytax of 

   svn diff -r <whatever> filename

BTW, I have same problem with all files that have been added to
that branch.  Files that were copied when the branch was
created are fine.

What do I do to fix this?

-- 
Grant Edwards                   grante             Yow! I just heard the
                                  at               SEVENTIES were over!!  And
                               visi.com            I was just getting in touch
                                                   with my LEISURE SUIT!!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 29, 2008, at 15:39, Grant Edwards wrote:

>>> I wonder if you have a corrupt repository, and Subversion runs into
>>> trouble when it is trying to create the text of the file you're  
>>> asking
>>> about from its history of changes.  What happens when you do "svn  
>>> cat"
>>> of that file, with a URL, or with a -r switch, or both?
>>
>> Same thing:
>>
>>    $ svn info matrixConfig.h
>>    Path: matrixConfig.h
>>    Name: matrixConfig.h
>>    URL: svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/ 
>> matrixssl/src/matrixConfig.h
>>    Repository Root: svn://lnxdb/devicemaster
>>    Repository UUID: 11e97225-5210-0410-b87b-0f6ef07e6056
>>    Revision: 2068
>>    Node Kind: file
>>    Schedule: normal
>>    Last Changed Author: grante
>>    Last Changed Rev: 2068
>>    Last Changed Date: 2008-05-22 18:02:04 -0500 (Thu, 22 May 2008)
>>    Text Last Updated: 2008-05-29 15:08:32 -0500 (Thu, 29 May 2008)
>>    Checksum: ce78bb1e2fc3cf98c7618c054f7baed2
>>
>>    $ svn cat -r 2057 matrixConfig.h
>>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/ 
>> matrixssl/src/matrixConfig.h'
>>
>>
>> <and in a different directory that's not a working copy of  
>> anything...>
>>
>>    $ svn cat -r 2057 svn://lnxdb/devicemaster/ecos/ecosapps/ 
>> branches/MatrixSSL/matrixssl/src/matrixConfig.h
>>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/ 
>> matrixssl/src/matrixConfig.h'
>
> Both the branch and the file in question were added by revision
> 1973.  Neither that branch nor the file existed in revision 1972.
>
> I don't get why svn thinks that file should exist in the trunk
> in revision 1972.

Can you try verifying the repository? Run "svnadmin verify /path/to/ 
repository" on the server.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
>> I wonder if you have a corrupt repository, and Subversion runs into
>> trouble when it is trying to create the text of the file you're asking
>> about from its history of changes.  What happens when you do "svn cat"
>> of that file, with a URL, or with a -r switch, or both?
>
> Same thing:
>
>    $ svn info matrixConfig.h
>    Path: matrixConfig.h
>    Name: matrixConfig.h
>    URL: svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
>    Repository Root: svn://lnxdb/devicemaster
>    Repository UUID: 11e97225-5210-0410-b87b-0f6ef07e6056
>    Revision: 2068
>    Node Kind: file
>    Schedule: normal
>    Last Changed Author: grante
>    Last Changed Rev: 2068
>    Last Changed Date: 2008-05-22 18:02:04 -0500 (Thu, 22 May 2008)
>    Text Last Updated: 2008-05-29 15:08:32 -0500 (Thu, 29 May 2008)
>    Checksum: ce78bb1e2fc3cf98c7618c054f7baed2
>    
>    $ svn cat -r 2057 matrixConfig.h
>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'
>
>
><and in a different directory that's not a working copy of anything...>
>
>    $ svn cat -r 2057 svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
>    svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'

Both the branch and the file in question were added by revision
1973.  Neither that branch nor the file existed in revision 1972.

I don't get why svn thinks that file should exist in the trunk
in revision 1972.

-- 
Grant Edwards                   grante             Yow! MERYL STREEP is my
                                  at               obstetrician!
                               visi.com            


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-29, Paul Koning <Pa...@dell.com> wrote:
> The commands you're trying work for me.
>
> I wonder if you have a corrupt repository, and Subversion runs into
> trouble when it is trying to create the text of the file you're asking
> about from its history of changes.  What happens when you do "svn cat"
> of that file, with a URL, or with a -r switch, or both?

Same thing:

   $ svn info matrixConfig.h
   Path: matrixConfig.h
   Name: matrixConfig.h
   URL: svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
   Repository Root: svn://lnxdb/devicemaster
   Repository UUID: 11e97225-5210-0410-b87b-0f6ef07e6056
   Revision: 2068
   Node Kind: file
   Schedule: normal
   Last Changed Author: grante
   Last Changed Rev: 2068
   Last Changed Date: 2008-05-22 18:02:04 -0500 (Thu, 22 May 2008)
   Text Last Updated: 2008-05-29 15:08:32 -0500 (Thu, 29 May 2008)
   Checksum: ce78bb1e2fc3cf98c7618c054f7baed2
   
   $ svn cat -r 2057 matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'


<and in a different directory that's not a working copy of anything...>

   $ svn cat -r 2057 svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'

-- 
Grant Edwards                   grante             Yow! I'm pretending that
                                  at               we're all watching PHIL
                               visi.com            SILVERS instead of RICARDO
                                                   MONTALBAN!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Re: How to compare working copy file with older version of that file?

Posted by Paul Koning <Pa...@dell.com>.
The commands you're trying work for me.

I wonder if you have a corrupt repository, and Subversion runs into
trouble when it is trying to create the text of the file you're asking
about from its history of changes.  What happens when you do "svn cat"
of that file, with a URL, or with a -r switch, or both?

   paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to compare working copy file with older version of that file?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-05-29, Grant Edwards <gr...@visi.com> wrote:

> I can't seem to figure out how to compare the working version
> of a file with an old revision of that file.  Here's the log
> for the file:

Comparing two revisions using URLs doesn't work either:

   $ svn log svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
   ------------------------------------------------------------------------
   r2068 | grante | 2008-05-22 18:02:04 -0500 (Thu, 22 May 2008) | 2 lines
   
   Disable all ciphers except RC4-SHA so that ssldump could 
   decrypt application data.
   ------------------------------------------------------------------------
   r2057 | grante | 2008-05-21 11:00:19 -0500 (Wed, 21 May 2008) | 3 lines
   
   Merge in changes that came with the SSH beta release.
   
   
   ------------------------------------------------------------------------
   r1973 | grante | 2008-05-06 13:05:23 -0500 (Tue, 06 May 2008) | 3 lines
   
   Branch in which MatrixSSL/SSH incorporation is being done.
   
   
   ------------------------------------------------------------------------
   
   
   $ svn diff -r 2057:2068 svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL/matrixssl/src/matrixConfig.h
   svn: File not found: revision 1972, path '/ecos/ecosapps/trunk/matrixssl/src/matrixConfig.h'

What am I doing wrong?

-- 
Grant Edwards                   grante             Yow! SHHHH!!  I hear SIX
                                  at               TATTOOED TRUCK-DRIVERS
                               visi.com            tossing ENGINE BLOCKS into
                                                   empty OIL DRUMS ...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org