Commits

tu...@4525493e-7705-40b1-a816-d608a930855b  committed 650d2b3

11Feb03 - CETull@lbl.gov
* Additional duplicate report to determine file and line

  • Participants
  • Parent commits 0c6c573

Comments (0)

Files changed (2)

 ----------------------------------------------------------------------
 History:
 
-07Feb03 - CETull@lbl.gov
-* Added duplicate reports for clid.db.
-
+11Feb03 - CETull@lbl.gov
+* Additional duplicate report to determine file and line
 
 cvsstat: /afs/cern.ch/atlas/maxidisk/d64/tull/dev-atlas/offline/Control/CLIDSvc
 
-
- 1 file(s) locally modified - commit !
+ 2 file(s) locally modified - commit !
 ==============================================================
    README.TXT
+   share/cvs2cliddb.csh
 ==============================================================
 
- 2 file(s) locally added - commit !
-==============================================================
-   share/clid.duplicateids
-   share/clid.duplicatenames
-==============================================================
+ 2 file(s) unknown to cvs
 
- 1 file(s) unknown to cvs - add !
-==============================================================
-   .README.TXT.swp  
-==============================================================
-
- 8 file(s) up to date
-
+ 9 file(s) up to date
 
 ## DO NOT EDIT BELOW THIS LINE #######################################
 # $Log: not supported by cvs2svn $
+# Revision 1.3  2003/02/06 18:03:50  tull
+#
+# 07Feb03 - CETull@lbl.gov
+# * Added duplicate reports for clid.db.
+#
 # Revision 1.2  2003/02/06 03:18:00  tull
 #
 # 06Feb03 - CETull@lbl.gov

File share/cvs2cliddb.csh

 # WARNING: This shell script makes heavy use of regexp magic. Edit only
 # if you are very comfortable with regular expressions.
 #
-touch clid.cvs
+touch clid.junk
+touch clid.cvs1
 echo -n 'Please wait, this may take a while.'
 foreach f ( `find . -type f \( -name '*.h' -o -name '*.cxx' \) -print` )
     echo -n '.'
-    egrep -h 'CLASS_DEF' $f \
-        | sed -e 's/[	 ]//g' \
-        | egrep '^CLASS_DEF2*\(' \
-        | sed -e 's/CLASS_DEF2*(\(.*\),\([0-9]*\),[0-9]*).*/\2 \1/' \
-    >> clid.cvs
-    egrep -h 'CLID.*=' $f \
-        | sed -e 's/[	 ]//g' \
-        | egrep 'CLID&*CLID_.*=[0-9]*;' \
-        | sed -e 's/.*CLID&*CLID_\(.*\)=\([0-9]*\);.*/\2 \1/' \
-    >> clid.cvs
+    egrep -n 'CLASS_DEF' $f clid.junk \
+    | sed -e 's/[	 ]//g' \
+    >> clid.cvs1
+    egrep -n 'CLID.*=' $f clid.junk \
+    | sed -e 's/[	 ]//g' \
+    >> clid.cvs1
 end
 #
-sort -n clid.cvs | uniq > clid.sort
+touch clid.cvs
+egrep ':CLASS_DEF2*(.*,[0-9]*,[0-9]*)' clid.cvs1 >> clid.cvs
+egrep 'CLID&*CLID_.*=[0-9]*;' clid.cvs1 >> clid.cvs
+#
+touch clid.tmp
+egrep ':CLASS_DEF2*\(' clid.cvs \
+    | sed -e 's/.*:CLASS_DEF2*(\(.*\),\([0-9]*\),[0-9]*).*/\2 \1/' \
+    >> clid.tmp
+egrep 'CLID&*CLID_.*=[0-9]*;' clid.cvs \
+    | sed -e 's/.*CLID&*CLID_\(.*\)=\([0-9]*\);.*/\2 \1/' \
+    >> clid.tmp
+sort -n clid.tmp | uniq > clid.sort
 #
 sed -e 's/.* //' clid.sort | sort | uniq -c | egrep -v ' 1	' \
     >> clid.duplicatenames
 sed -e 's/ .*//' clid.sort | sort | uniq -c | egrep -v ' 1	' \
     >> clid.duplicateids
 #
+touch clid.duplicates
+foreach f ( `sed -e 's/ *[0-9]*	*//' clid.duplicate{ids,names}` )
+    echo =========================== $f >> clid.duplicates
+    egrep $f clid.cvs >> clid.duplicates
+end
+#
 echo ''
 echo 'File clid.sort contains a candidate clid.db'
 echo 'File clid.duplicatenames contains a list of duplicated names with count'
 echo 'File clid.duplicateids contains a list of duplicated CLIDs with count'
+echo 'File clid.duplicates contains the lines for duplicate names and CLIDs'
 echo ''
 #