UNIX command/script svn log to get just the files information


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting UNIX command/script svn log to get just the files information
# 1  
Old 06-20-2013
UNIX command/script svn log to get just the files information

Just need the directory name and files changes information in svn log

This is my svn log verbose:
Code:
svn log -v //test/svn/Demo/branches/HelloWorld/Batch --limit 2

Code:
------------------------------------------------------------------------
r133 | testuser1 | 2013-04-02 18:22:28 -0400 (Tue, 02 Apr 2013) | 3 lines
Changed paths:
M /branches/HelloWorld/Batch/test.java

DEMO-13
Testing to lock 

------------------------------------------------------------------------
r132 | testuser2 | 2013-04-02 18:20:40 -0400 (Tue, 02 Apr 2013) | 3 lines
Changed paths:
M /branches/HelloWorld/Batch/test.java

DEMO-1
Testing to lock

Desired output:
Code:
Batch/test.java
Batch/test.java

Thanks you !!!

Last edited by Franklin52; 06-20-2013 at 08:19 AM.. Reason: Please use code tags
# 2  
Old 06-20-2013
What have you tried so far?
# 3  
Old 06-20-2013
Code:
svn log -v //test/svn/Demo/branches/HelloWorld/Batch --limit 2 | egrep -o "\/.+$" | awk -F"/" '{print $(NF-1) FS $NF}'

# 4  
Old 06-20-2013
Code:
svn log -v //test/svn/Demo/branches/HelloWorld/Batch --limit 2 | awk '$1~/^[AMD]$/{for(i=2;i<=NF;i++)print $i}'

/branches/HelloWorld/Batch/test.java
/branches/HelloWorld/Batch/test.java


Last edited by iaav; 06-20-2013 at 08:33 AM.. Reason: Please use code tags
# 5  
Old 06-20-2013
Hello,

Could you please try the following code.

Note: I am thinking that it is the log file and in following comand it is te5.


Code:
 
$ cat te5 | grep -i "/branches/HelloWorld" | awk -F "HelloWorld/" '{print$2}'
Batch/test.java
Batch/test.java
$




Thanks,
R. Singh
# 6  
Old 06-20-2013
Try:
Code:
svn log -v //test/svn/Demo/branches/HelloWorld/Batch --limit 2 |
awk -F/ 'NF>1{print $(NF-1) FS $NF}'

# 7  
Old 06-20-2013
@Franklin52 - This gives the comments too.
Code:
svn log -v //test/svn/Demo/branches/HelloWorld/Batch --limit 2 | awk -F/ 'NF>1{print $(NF-1) FS $NF}'
Batch/test.java
Testing to lock Demo/HelloWorld
Batch/test.java
Testing to lock Demo/HelloWorld

Moderator's Comments:
Mod Comment How to use code tags

Last edited by Franklin52; 06-20-2013 at 08:36 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making post down hook script for svn regarding sending emails after an file is committed in svn

Hi Folks , I am asking this question but i apologise please if this is not the correct forum , I have to develop a shell script that i want to place in at hooks/post-commit , that is basically i have to develop a post hook script and the main functionality of that script would be lets say if... (0 Replies)
Discussion started by: sunsun06060606
0 Replies

2. Shell Programming and Scripting

Get out of only Modified and Added files in svn log

How to get only modified and added files with revision,author and comments from svn log verbose ------------------------------------------------------------------------ r7351 | user01 | 2013-07-02 17:53:28 -0400 (Tue, 02 Jul 2013) | 2 lines Changed paths: D /trunk/demo/proj1/.project ... (1 Reply)
Discussion started by: iaav
1 Replies

3. Shell Programming and Scripting

Connect to SVN from UNIX

Hi, Can anyone please tell the command to connect to SVN from UNIX? Thanks (1 Reply)
Discussion started by: sampoorna
1 Replies

4. Shell Programming and Scripting

I want a script to view the complete log information of data stage job from UNIX IBM AIX.

Hi, I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment. Can you please help me out by give the script. Thanks in advance... (7 Replies)
Discussion started by: victory
7 Replies

5. Shell Programming and Scripting

reading information from a table and apply a command on multiple files

Hey gyuz, I wanna calculate the number of mapped reads of a bam file in a region of interest. I used this code to do so : samtools view input.bam chrname:region1 > region1.txt This will store all the reads from given bam file within the region of interest in region1.txt Now I have... (5 Replies)
Discussion started by: @man
5 Replies

6. Solaris

How to integrate SVN client to SVN server repository.

Hi, I am new to SVN configuration on Solaris 10.I have installed SVN client version 1.7. bash-3.00# ./svn --version svn, version 1.7.4 (r1295709) compiled Mar 2 2012, 12:59:36 Here my requirement is how to integrate svn client to One of the SVN server repository. My repository... (0 Replies)
Discussion started by: muraliinfy04
0 Replies

7. UNIX for Advanced & Expert Users

SVN installation in UNIX

Hi all, I need ur help in installing SVN for unix. I am desperately need some helps on how to install SVN in unix. I have downloaded subversion-1.7.4.tar.gz . I have unzipped it and when i tried to ./configure it. I am unable to do so getting the error like "-bash: /.configure: No such... (5 Replies)
Discussion started by: dpak10
5 Replies

8. UNIX for Dummies Questions & Answers

PERL/UNIX - SVN check in command

I am working in perl. I need to do some svn check in from my server. I need to install svn in my server. I have the package "svn" in my server path How can I install that in my server. I tried , but this doesnt work. Can you please help with the command to be used. Thanks in... (0 Replies)
Discussion started by: irudayaraj
0 Replies

9. Ubuntu

Browsing folders getting SVN information

HI All I am newbie to Linux and Ubuntu. In Windows there is TortoiseSvnClient that makes possible to see ( while browsing a folder) whether a file is under source control with SVN or not ( green, red balloons on top of the file and question marks etc. ). Do you know if there is such product... (2 Replies)
Discussion started by: manustone
2 Replies
Login or Register to Ask a Question