Reputation: 105
I've searched and haven't found a similar question here already. I've started work on a long running project that uses CVS and as a result there are some huge CVS logs, with many many tags. This makes is very difficult to review the log output for the latest commits.
What is the simplest way to only display recently log output, since the date I started work on a project?
Or maybe just the last X commits (similar to git log -n 5
)
Upvotes: 1
Views: 485
Reputation: 105
My own solution after some research, is to use the -d option of the CVS log command
# Get all log output since yyyy-mm-dd
cvs log -d ">=2014-02-17" <filename>
# Get all output before yyyy-mm-dd
cvs log -d "<2014-03-17" <filename>
I've created these handy commands in my .bash_rc script
# Date commands to output last week / month in 'yyyy-mm-dd' format
alias last-week='date -d last-week +%Y-%m-%d'
alias last-month='date -d last-month +%Y-%m-%d'
# Fetch the CVS log (without tags) for the last week / month
alias cvs-log-lw='cvs log -N -d ">=`last_week`"'
alias cvs-log-lm='cvs log -N -d ">=`last_month`"'
When I wanted to just fetch the log history for a file for the last week, I can execute
cvs-log-lw <filename>
I'm not aware of a way to only display the last X number of commits.
Upvotes: 1