OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   07-Jul-2003 15:57:50
  Branch: HEAD                             Handle: 2003070714575000

  Modified files:
    openpkg-re              openpkg-dev

  Log:
    add support for 'real' mass-comitting ;-)

  Summary:
    Revision    Changes     Path
    1.116       +36 -4      openpkg-re/openpkg-dev
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/openpkg-dev
  ============================================================================
  $ cvs diff -u -r1.115 -r1.116 openpkg-dev
  --- openpkg-re/openpkg-dev    4 Jul 2003 18:14:58 -0000       1.115
  +++ openpkg-re/openpkg-dev    7 Jul 2003 13:57:50 -0000       1.116
  @@ -996,6 +996,21 @@
           die "$E/bin/rpm not executable. \$E might not be set properly."
       fi
   
  +    #   determine whether CVS commit messages can be bundled
  +    bundle=0
  +    if [ ".${msg}" != . ]; then
  +        bundle=1
  +        bundle_files=""
  +        bundle_msg=""
  +        if [ -f "${msg}" ]; then
  +            bundle_msg="-F \"${msg}\""
  +        elif [ ".${msg}" = ".-" ]; then
  +            bundle_msg=""
  +        else
  +            bundle_msg="-m \"$msg\""
  +        fi
  +    fi
  +
       for name in $all; do
           name=`echo $name | sed -e 's;\.src\.rpm$;;' -e 's;\.nosrc\.rpm$;;'` # 
convenience
           name=`echo ${name} | sed -e 's;-[^-][^-]*-[^-][^-]*$;;'`            # 
convenience
  @@ -1185,7 +1200,7 @@
                        msg="modifying package: ${rpm_name}-${rpm_version_new} 
${rpm_release_old} again"
                   fi
                   if [ ".${msg}" = . ]; then
  -                    die "unable to determine type of source changes. Please 
specifiy commit message"
  +                    die "unable to determine type of source changes. Please specify 
commit message"
                   fi
               fi
   
  @@ -1200,21 +1215,27 @@
               echo "++ comitting changes to CVS repository"
               cd "${OPENPKG_WORK}" || die "cannot cd to ${OPENPKG_WORK}"
               if [ ".${msg}" != . -a -f "${msg}" ]; then
  -                if [ ${dry} -eq 0 ]; then
  +                if [ ${bundle} -eq 1 ]; then
  +                    bundle_files="${bundle_files} ${files}" 
  +                elif [ ${dry} -eq 0 ]; then
                       cvs -d ${OPENPKG_REPO} commit -F "${msg}" $files
                   else
                       echo cvs commit -F "${msg}" $files
                       cvs -d ${OPENPKG_REPO} diff $files | ${cvs_diff_colorize}
                   fi
               elif [ ".${msg}" = ".-" ]; then
  -                if [ ${dry} -eq 0 ]; then
  +                if [ ${bundle} -eq 1 ]; then
  +                    bundle_files="${bundle_files} ${files}" 
  +                elif [ ${dry} -eq 0 ]; then
                       cvs -d ${OPENPKG_REPO} commit $files
                   else
                       echo cvs commit $files
                       cvs -d ${OPENPKG_REPO} diff $files | ${cvs_diff_colorize}
                   fi
               else
  -                if [ ${dry} -eq 0 ]; then
  +                if [ ${bundle} -eq 1 ]; then
  +                    bundle_files="${bundle_files} ${files}" 
  +                elif [ ${dry} -eq 0 ]; then
                       cvs -d ${OPENPKG_REPO} commit -m "${msg}" $files
                   else
                       echo cvs commit -m "${msg}" $files
  @@ -1257,6 +1278,17 @@
               fi
           fi
       done
  +
  +    #   lazy execution of bundled CVS commit
  +    if [ ${bundle} -eq 1 ]; then
  +        cd "${OPENPKG_WORK}" || die "cannot cd to ${OPENPKG_WORK}"
  +        if [ ${dry} -eq 1 ]; then
  +            echo "cvs -d ${OPENPKG_REPO} commit ${bundle_msg} ${bundle_files}"
  +            cvs -d ${OPENPKG_REPO} diff ${bundle_files} | ${cvs_diff_colorize}
  +        else
  +            eval "cvs -d ${OPENPKG_REPO} commit ${bundle_msg} ${bundle_files}"
  +        fi
  +    fi
   }
   
   kill () {
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to