You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by vinay i <vi...@gmail.com> on 2008/09/26 15:09:43 UTC

How to get diff information of a renamed file

Hi All
How do I get diff information of a renamed file?

Say I have a file repos-path/file.txt. I rename it to
repos-path/new_file.txt in reversion number 30. How to see the diff
information with previous versions?

2ndly, how to see diff information of added and deleted files. In cvs we can
use cvs rdiff -r0 -r1.1 file_name for added file and cvs rdiff -r1.3 -r0 for
a deleted file. How can I do the same for Subverison files?

Thanks
Vinay

Re: How to get diff information of a renamed file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 26, 2008, at 15:14, vinay i wrote:

> Yes. I did get that. I do not want to run the command if it is a  
> directory. Can I check whether an element is a directory before I  
> decide to run the below command?

svn ls URL

Anything that has a "/" at the end is a directory. Anything that  
doesn't, isn't.


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

Re: How to get diff information of a renamed file

Posted by vinay i <vi...@gmail.com>.
Yes. I did get that. I do not want to run the command if it is a directory.
Can I check whether an element is a directory before I decide to run the
below command?

-Vinay

On Sat, Sep 27, 2008 at 1:25 AM, <Pa...@dell.com> wrote:

>   *>*My next question is how to differentiate between a committed file and
> directory?
>
> >>More precisely, if  you want to see the contents of a file deleted in
> rev 30, do "svn cat file_name@29".  That says "look for the thing that in
> rev 29 had name "file_name".
>
> >I want to skip running "svn cat dir_name@29". Does svn has a
> functionality to check if the committed element is a file or directory?
>
>  If you do that you get "svn: warning: 'dir_name' refers to a directory".
>
>
>
>                 paul
>

RE: How to get diff information of a renamed file

Posted by Pa...@Dell.com.
>My next question is how to differentiate between a committed file and directory?

>>More precisely, if  you want to see the contents of a file deleted in rev 30, do "svn cat file_name@29".  That says "look for the thing that in rev 29 had name "file_name".

>I want to skip running "svn cat dir_name@29". Does svn has a functionality to check if the committed element is a file or directory?



If you do that you get “svn: warning: ‘dir_name’ refers to a directory”.

 

                paul


Re: How to get diff information of a renamed file

Posted by vinay i <vi...@gmail.com>.
Hi
My next question is how to differentiate between a committed file and
directory?

>>More precisely, if  you want to see the contents of a file deleted in rev
30, do "svn cat file_name@29".  That says "look for the thing that in rev 29
had name "file_name".

I want to skip running "svn cat dir_name@29". Does svn has a functionality
to check if the committed element is a file or directory?

Thanks
Vinay

On Fri, Sep 26, 2008 at 9:22 PM, vinay i <vi...@gmail.com> wrote:

> Thanks Paul. :-)
>
> -Vinay
>
>
> On Fri, Sep 26, 2008 at 8:58 PM, <Pa...@dell.com> wrote:
>
>>   *>*How do I get diff information of a renamed file?
>> >
>> >Say I have a file repos-path/file.txt. I rename it to
>> repos-path/new_file.txt in reversion number 30. How to see the diff
>> information with previous versions?
>>
>>  Svn diff –r 29:30 new_file.txt
>>
>>
>>
>> Subversion knows the history, so it knows to find the old rev by its old
>> name.
>>
>>
>> >2ndly, how to see diff information of added and deleted files. In cvs we
>> can use cvs rdiff -r0 -r1.1 file_name for added file and cvs rdiff -r1.3 -r0
>> for a deleted file. How can I do the >same for Subverison files?
>>
>>  Svn cat file_name   :-)
>>
>>
>>
>> More precisely, if  you want to see the contents of a file deleted in rev
>> 30, do "svn cat file_name@29".  That says "look for the thing that in rev
>> 29 had name "file_name".
>>
>>
>>
>>                 paul
>>
>
>

Re: How to get diff information of a renamed file

Posted by vinay i <vi...@gmail.com>.
Thanks Paul. :-)

-Vinay

On Fri, Sep 26, 2008 at 8:58 PM, <Pa...@dell.com> wrote:

>   *>*How do I get diff information of a renamed file?
> >
> >Say I have a file repos-path/file.txt. I rename it to
> repos-path/new_file.txt in reversion number 30. How to see the diff
> information with previous versions?
>
>  Svn diff –r 29:30 new_file.txt
>
>
>
> Subversion knows the history, so it knows to find the old rev by its old
> name.
>
>
> >2ndly, how to see diff information of added and deleted files. In cvs we
> can use cvs rdiff -r0 -r1.1 file_name for added file and cvs rdiff -r1.3 -r0
> for a deleted file. How can I do the >same for Subverison files?
>
>  Svn cat file_name   :-)
>
>
>
> More precisely, if  you want to see the contents of a file deleted in rev
> 30, do "svn cat file_name@29".  That says "look for the thing that in rev
> 29 had name "file_name".
>
>
>
>                 paul
>

RE: How to get diff information of a renamed file

Posted by Pa...@Dell.com.
>How do I get diff information of a renamed file?
>
>Say I have a file repos-path/file.txt. I rename it to repos-path/new_file.txt in reversion number 30. How to see the diff information with previous versions?



Svn diff –r 29:30 new_file.txt

 

Subversion knows the history, so it knows to find the old rev by its old  name.


>2ndly, how to see diff information of added and deleted files. In cvs we can use cvs rdiff -r0 -r1.1 file_name for added file and cvs rdiff -r1.3 -r0 for a deleted file. How can I do the >same for Subverison files?



Svn cat file_name   :-)

 

More precisely, if  you want to see the contents of a file deleted in rev 30, do “svn cat file_name@29”.  That says “look for the thing that in rev 29 had name “file_name”.

 

                paul