]> gcc.gnu.org Git - gcc.git/blobdiff - maintainer-scripts/gcc_release
gcc_release (build_sources): If trying to apply a tag that already exists, issue...
[gcc.git] / maintainer-scripts / gcc_release
index 0c60cdb512d22f3635454d0951a268eea499ff77..6458ce1b24ecb0a212ce3b542c49048b778f011b 100755 (executable)
@@ -170,12 +170,19 @@ EOF
   EXPORTDATE=""
   if [ -n "${TAG}" ]; then
     inform "Tagging sources as ${TAG}"
-    # The -F option to CVS is intentionally not used below.  If you
-    # need to retry a release, you will have to manually remove any
-    # existing tag.
+    EXPORTTAG="-r${TAG}"
+    # Try to check out a file using ${TAG}.  If the command succeeds,
+    # then the sources have already been tagged.  We don't want to 
+    # overwrite an existing tag, so we don't want to use the "-F"
+    # option to "cvs rtag" below.  So, if the tag already exists,
+    # issue an error message; the release manager can manually remove
+    # the tag if appropriate.
+    if ${CVS} export -d "`basename ${SOURCE_DIRECTORY}`" \
+      "${EXPORTTAG}" gcc/ChangeLog; then
+      error "Tag ${TAG} already exists"
+    fi
     ${CVS} rtag -r ${CVSBRANCH} ${TAG} gcc || \
       error "Could not tag sources"
-    EXPORTTAG="-r${TAG}"
   else
     if [ ${CVSBRANCH} != "HEAD" ]; then
       EXPORTTAG="-r${CVSBRANCH}"
This page took 0.028172 seconds and 5 git commands to generate.