OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-re Date: 31-Mar-2003 20:33:45 Branch: HEAD Handle: 2003033119334500 Modified files: openpkg-re openpkg-dev Log: explain and consequently use HEAD handling; sort options and correct abbreviations Summary: Revision Changes Path 1.78 +30 -14 openpkg-re/openpkg-dev ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-re/openpkg-dev ============================================================================ $ cvs diff -u -r1.77 -r1.78 openpkg-dev --- openpkg-re/openpkg-dev 31 Mar 2003 07:25:11 -0000 1.77 +++ openpkg-re/openpkg-dev 31 Mar 2003 18:33:45 -0000 1.78 @@ -60,6 +60,20 @@ OPENPKG_CTAG="${OPENPKG_CTAG}"; B="${B}" # B (cvs tag, branch) OPENPKG_EXEC="${OPENPKG_EXEC}"; E="${E}" # E (exec, instance) export OPENPKG_SPEC P OPENPKG_CTAG B OPENPKG_EXEC E +# +# a note about CVS HEAD +# CVS calls the latest version of a file "head". It also supports two +# hardcoded pseudotags, "BASE" and "HEAD". It is a strange and often +# unexpected behaviour that checking out the "HEAD" tag is a sticky +# operation and not identical to checking out the "head" and clear +# stickyness which requires no -r option to "cvs checkout" or option +# -A to "cvs up". In contrast to this original behaviour this program +# uses "HEAD" for input, internal processing and output whenever the +# user really means "clear stickyness". The "cd" shell script might +# experience the unlikely event that a directory or file was really +# updated to the "HEAD" tag. Only in this event the tag is being +# output as "HEAD_STICKY" which means that this becomes a third +# "hardcoded" pseudotag. # override configuration from ${HOME}/.openpkg-dev.rc progname=`basename $0` @@ -320,7 +334,9 @@ if [ ".${CVSTAGFILES}" = . ]; then B="" else - B=`cat ${CVSTAGFILES} | sed -e 's;//$;//THEAD;' -n -e 's;^.*//T;;p' | sort | uniq | tr '\n' ':' | sed -e 's;:$;;'` + B=`cat ${CVSTAGFILES} \ + | sed -e 's;//THEAD$;//THEAD_STICKY;' -e 's;//$;//THEAD;' -n -e 's;^.*//T;;p' \ + | sort | uniq | tr '\n' ':' | sed -e 's;:$;;'` fi unset CVSTAGFILES echo "${B}" @@ -349,7 +365,7 @@ echo "++ updating to branch ${branch}" ( HOME=${OPENPKG_WORK} export HOME - if [ ".${branch}" = ".HEAD" ]; then + if [ ".${branch}" = .HEAD ]; then cvs update -A else cvs update -r ${branch} @@ -672,13 +688,13 @@ openpkg-dev () { case \$1 in - package | p* ) OPENPKG_SPEC="\`command \${OPENPKG_WORK}/re/openpkg-dev package -query package \$2\`"; cd . ;; + package | pa* ) OPENPKG_SPEC="\`command \${OPENPKG_WORK}/re/openpkg-dev package -query package \$2\`"; cd . ;; branch | br* ) OPENPKG_CTAG="\`command \${OPENPKG_WORK}/re/openpkg-dev branch -query branch \$2\`"; cd . ;; execute | e* ) OPENPKG_EXEC="\`command \${OPENPKG_WORK}/re/openpkg-dev execute -query execute \$2\`"; cd . ;; esac command \${OPENPKG_WORK}/re/openpkg-dev \${1+"\$@"} case \$1 in - package | p* ) if [ ".\$2" = . ]; then cd .; else cd \${OPENPKG_WORK}/src/\${P}; fi ;; + package | pa* ) if [ ".\$2" = . ]; then cd .; else cd \${OPENPKG_WORK}/src/\${P}; fi ;; branch | br* ) cd . ;; execute | e* ) cd . ;; esac @@ -1203,22 +1219,22 @@ # handle command case ${cmd} in - setup | set*) cmd="setup" ;; bash | ba* ) cmd="bash" ;; - update | u* ) cmd="update" ;; - package | pa* ) cmd="package" ;; branch | br* ) cmd="branch" ;; + diff | d* ) cmd="diff" ;; execute | e* ) cmd="execute" ;; + help | h* ) cmd="help" ;; + install | i* ) cmd="install" ;; + kill | k* ) cmd="kill" ;; + lint | lin*) cmd="lint" ;; list | lis*) cmd="list" ;; - peek | pe* ) cmd="peek" ;; - search | sea*) cmd="search" ;; new | n* ) cmd="new" ;; - diff | d* ) cmd="diff" ;; - lint | lin*) cmd="lint" ;; + package | pa* ) cmd="package" ;; + peek | pe* ) cmd="peek" ;; release | r* ) cmd="release" ;; - install | i* ) cmd="install" ;; - kill | k* ) cmd="kill" ;; - help | h* ) cmd="help" ;; + search | sea*) cmd="search" ;; + setup | set*) cmd="setup" ;; + update | u* ) cmd="update" ;; *) die "unknown command \"${cmd}\"" ;; esac ${cmd} "$@" @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]