Sponsored Content
Top Forums Shell Programming and Scripting gets all files details committed to svn by a particular user [or all users] since a particular date Post 302584164 by itkamaraj on Thursday 22nd of December 2011 10:06:05 AM
Old 12-22-2011
@linuxadmin,

Thanks for sharing the script.

Some of the changes you need to do for the script.


Code:
Dont use cat and awk together


cat $svnfile_log_all | awk -v uName=$uName '/^r[0-9]+ / {user=$3} /./ {print user} '

change it to

awk -v uName=$uName '/^r[0-9]+ / {user=$3} /./ {print user} ' $svnfile_log_all



Code:
dont use cat and grep

cat $PROJECT/.svn/entries | grep "http://"

change it to

grep "http://" $PROJECT/.svn/entries

Code:
cat, grep , wc --- you can do it by grep -c

`cat $svnfile_log_all | grep "$uName" | wc -l`

change it to

grep -c $uName $svnfile_log_all


Code:
|sort | uniq 

change it to

sort -u

Code:
cat $PROJECT/.svn/entries | grep "http://" | head -1

change it to

awk  '/http:\/\// {print; exit}'  $PROJECT/.svn/entries

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Selecting files between a user inputed date range

Hi all! I'm working on a KSH script to select files between a user inputed date range (stored in a variable) and then move them and unzip them. I'm stuck at how to get the files between the user inputed date range selected. Any help would be greatly appreciated! The files are as such: ... (6 Replies)
Discussion started by: kelldan
6 Replies

2. Solaris

user logon details

how can i identifying whose are logged in last few days,time and date also want. what i will do for get that information (2 Replies)
Discussion started by: sijocg
2 Replies

3. Shell Programming and Scripting

SVN activity of certain user

Hi there, I'm looking for some help to get a little script done that shows me (or counts) only the added lines from an SVN repository of one specific user. Anybody has an idea? Thanks, Michael (0 Replies)
Discussion started by: MichaelGiese
0 Replies

4. Solaris

Command History for a user with IP details

Hi We are sharing our envoirnment with our component teams. the plateform is SunOS 5.8 Generic_117350-41 sun4u sparc SUNW,Sun-Fire-V490. All team logs in the domain with same user and perform activities. Now for the system auditing purpose can somebody guide me how can I get the details when... (6 Replies)
Discussion started by: sukhvinder_Tm
6 Replies

5. UNIX and Linux Applications

SVN user permissions trouble

I am trying to add a user to my SVN server that can only access one of about a dozen repositories I have set up. Here are the files that I think need changed and what I have set them to. No matter what I try with these files I am unable to see the results I am after. In the end I want this new... (0 Replies)
Discussion started by: benn600
0 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. Shell Programming and Scripting

To get the files in a directory for the given date (User entered date)

Need a ksh script to get the files that were created or modified in a directory on a particular date entered by the user. For example if a directory contains files as below : > ll total 41 -rw-rw-r-- 1 psn psn 199 Aug 23 07:06 psn_roll.sh -rw-rw-r-- 1 psn psn ... (10 Replies)
Discussion started by: ramprabhum
10 Replies

8. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

HTML Code archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (2 Replies)
Discussion started by: rehantayyab82
2 Replies

9. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

HTML Code: archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies

10. 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
CDV(1)							      General Commands Manual							    CDV(1)

NAME
cdv - codeville command line client tool SYNOPSIS
cdv command [options] DESCRIPTION
cdv is a client for codeville, a distributed version control system. It aims to perform the same job as SVN, CVS, RCS, arch, etc. COMMAND OVERVIEW
add <files> Add new files to the repository. All files must be added before they will be part of the version control system. commit [-b] [-m "<comment>"] [-n] Commits all changes made to the repository since the last commit. A comment is required for every commit. It may either be supplied via the -m option for simple comments or if the -m option is omitted, whatever editor is specified in the EDITOR environment vari- able will be launched. If no editor is specified, vi is the default in all unixy environments (including OS X and cygwin) and Notepad is the default in Windows. In the editor, a comment may be added at the top, and file changes which the user does not wish to have in a given changeset can be removed by deleting them from the "### files" list at the bottom (although merging cannot be avoided through deleting things from the "### merge files" list). Every commit creates a changeset. If there are changes since the last update, files will be merged. In the event of unresolved conflicts, the user will be prompted to resolve them. -n used to commit changes off-line. Changes committed off-line can still be used with all commands, but are not visible to other users until an on-line commit is done. -b forces commit to not make a new changeset. This will commit changes which have already been committed locally via -n (or as a result of having multiple repositories involved), but will not create a new changeset for existing file modifications. This is espe- cially needed for committing to back-up servers (servers started with -b) as it is the only way to commit changes to a back-up server. This is not the recommended way to commit changes to normal servers. In general, if one wishes to commit changes committed offline without committing new changes, one should commit and changeset with all the files in the ""### files"" list removed. construct <changeset> Recreates the repository at the given changeset. create <repository name> Creates a new repository with the appropriate name. describe [-x|-d] [-s] <changeset> Gives the description of the changeset including the long name of the change, the user who made the change, that date it was made, the comment, the relation it has to other changesets, and what files were modified and in what manner they were modified (i.e. added, modified, renamed, or deleted). -s gives a short description -d does a diff -x displays an XML version of the output. This is not compatible with displaying a diff. This can only be used with parenthesized changesets from the file history. It's sort of a hack right now, really. destroy <repository> Destroys a repository. The opposite of create. diff [-r <changeset> [-r <changeset>] ] [<files>] Does a diff between different versions of each of given files. If no files are specified, all relevant files are shown. The first -r option indicates which changeset the diff should be from, the second which it should be to. If no changesets are specified, it shows the difference between the last known state of the repository and the current client state. edit <files> Enables editing a file. When not in edit-mode, this is unnecessary. heads Lists the root nodes in the graph of changesets. history [-h <changeset>] [-n <number>] [-s <skip count>] [-v] [<files>] Gives the history of the repository or of the files specified. Specifically, it lists all relevant change sets by short name, user, date, and comment in most recent first order. -n limits the number of changes printed to the given number -h causes it to print the history starting at the given changeset. -s skips the first <skip count> changes. -v causes it to print the changes verbosely which includes additional information about each changeset which affected the files. init Initialize a new client with the current directory as the root. Specify a directory other than current one by using the top level -p switch. is_ancestor <changeset1> <changeset2> Tells whether or not <changeset1> is an ancestor of <changeset2>. Note that it is possible for neither changeset to be an ancestor of the other. last-modified <file> Returns the last changeset which modified a given file. list-repos Lists all the repositories on the same server as the repository you are in. password Change your password. print_dag [-h <changeset>] [-h <changeset>] [...] <file> Prints the directed acyclic graph which shows the changesets which have been applied to a file and their relationships. Changesets specified with -h are treated as head nodes for the graph (i.e. later changesets are excluded). print_history [<changeset>] Prints the directed acylcic graph of the the entire history. Starts at the given changeset, if provided. rebuild Recreates all of the metadata from the static history. This should generally only be done when instructed to by software upgrade instructions. remove <files> Deletes files from the repository. rename <file> <newname> Moves or renames files. revert [-a] <files> Reverts any local changes to the file. At this time only changes to the content of the file can be reverted. The ability to revert adds, deletes, and renames will be coming in the future. There is a subtle difference in the definition of revert from what you might expect. It does not guarantee that it will restore the file to some previous state. For example, if you are in the middle of a merge and call revert on a file, it will be regenerated by running the merge. If the file were modified prior to running the merge update, the file contents will now be different from anytime in the past. Revert should be thought of as throwing away uncommitted changes. -a indicates files should only be reverted if they have not been modified. Basically unmarks them as open for edit. set <variable> <value> Sets a Codeville variable to a given value. show-vars Show a list of all Codeville variables and what they are set to. status [-v] Shows changes not yet committed to the repository in brief. -v gives more verbose status which includes mention of files which are in the directory space, but not in the repository and files missing from the directory space. unset <variable> Removes a Codeville variable so that it no longer has any setting. update [-d] Gets all changes made to the repository since the last time you did an update. Files will be merged as necessary. In the event of unresolved conflicts, the user will be asked to resolve them. -d pull in changesets but do not merge them. Has no effect on the workspace state. This allows a user to browse and diff changesets without having to merge. SPECIFYING FILES
Files can be specified using bash-style wildcards on any platform. In addition, '...' behaves like a find command, expanding all files and directories within subdirectories. General notes: Flags are listed in no particular order. All printed graphs are output in a format intended to be run through graphviz tools' "dot" tool. SEE ALSO
cdvpasswd(1), http://www.codevile.org/ AUTHOR
This manual page was written by Michael Janssen <jamuraa@debian.org> from the documentation available at http://www.codeville.org/, for the Debian GNU/Linux system (but may be used by others). Dec 1 2005 CDV(1)
All times are GMT -4. The time now is 03:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy