LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2010, 12:18 PM   #1
sangal_ak04
LQ Newbie
 
Registered: Sep 2008
Posts: 27

Rep: Reputation: 0
Question CVS rlog command in Linux


Hi all

What command should i use to get the "Comment/s" a user provided while committing/checkin a file in a repository.

For ex:
I have the following files with versions:

/mnt/cvs/abd-cvsroot/module1/module1_file1.java - Version: 1.4.1.8
/mnt/cvs/abd-cvsroot/module2/module2_file3.java - Version: 1.10

Now lets suppose while committing/checkin the above two files for their respective versions as shown above, user gave the following comment.

For file: module1_file1.java
Comment: "Updated file1 in module1 for 2012 deadline, charge itself".

For file: module2_file3.java
Comment: "Updated file3 in module2 to start beeping after 2012 Dec 20
using motion technology".

Now, what command should I fire to see only the comment of module1_file1.java for version 1.4.1.8 and similar for module2_file3.java file.


Is there any direct command to specify the version no. while using "rlog" ????


Thanks
Arun Sangal
 
Old 04-22-2010, 12:32 PM   #2
sangal_ak04
LQ Newbie
 
Registered: Sep 2008
Posts: 27

Original Poster
Rep: Reputation: 0
Lightbulb

One wierd way is to run the following:

1) export CVSROOT=server:usernameasswd@cvs_repo_server:/mnt/cvs/abc-cvsroot
2) cvs login
3) Run the following command:

cvs rlog module1_file1.java | sed -n "/revision 1.20.4.5.2.43.10.123.4.8/,/----------------------------/ p"| sed "s/----------------------------//" | tac | tr -d '\012'| sed 's/\(date: [0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]. author.*$\)/\n\n\1\n/'


But, I wanted to get the same by running ... rlog command i.e.

cvs rlog -r1.20.4.5.2.43.10.123.4.8 /mnt/cvs/abc-cvsroot/module1/module1_file1.java


or use -v1.20.4.5.2.43.10.123.4.8 option if -r is only for tags/branch tags/labels


Arun
 
Old 04-22-2010, 01:29 PM   #3
sangal_ak04
LQ Newbie
 
Registered: Sep 2008
Posts: 27

Original Poster
Rep: Reputation: 0
Lightbulb

If giga variable contains the version of the file as a value. then the following command at $ prompt in Linux/Unix will only show the comment.

cvs rlog common/source/Configuration/ctp.properties | sed -n "/revision ${giga}/,/----------------------------/ p" | sed "s/----------------------------//;/^revision.*$/d;/^$/d" | tac | sed '/^date: [0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]. author.*$/d'

Himanshu Ali Ashok Azad - C12201221: WebSphere 7.0 upgrade - correct Startup Pool Size
 
Old 04-22-2010, 01:36 PM   #4
sangal_ak04
LQ Newbie
 
Registered: Sep 2008
Posts: 27

Original Poster
Rep: Reputation: 0
Thumbs up

or try the following:

cvs rlog common/source/Configuration/ctp.properties | sed -n "/revision ${giga}/,/----------------------------/ p" | sed "s/----------------------------//;/^revision.*$/d;/^$/d;/^date: [0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]. author.*$/d"
 
  


Reply

Tags
cvs, linux, script, version



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install encfs, but how to check if rlog and boost has been installed? vitalstrike82 Slackware 1 04-20-2009 11:36 AM
MIgrate CVS from CVSNT (Windows) to CVS (Linux) Wilson_Lee Linux - Server 3 07-15-2008 04:16 AM
cvs repository cvs-1.11.21.tar.gz installation problem on redhat 5 linux version ajaytiwary Linux - Newbie 1 09-30-2007 12:58 PM
cvs wine. Unable to download. Error "cvs: command not found" gonus Debian 5 08-03-2004 07:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration