VirtualBox

Changeset 83680 in vbox for trunk/tools/bin


Ignore:
Timestamp:
Apr 11, 2020 6:44:19 PM (5 years ago)
Author:
vboxsync
Message:

tools/bin/backport-*: Adding a --update-first option to update the branch before merging.

Location:
trunk/tools/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bin/backport-common.sh

    r83679 r83680  
    129129            ;;
    130130
     131        --update-first|--update|-u)
     132            MY_UPDATE_FIRST=1
     133            ;;
     134
    131135        --extra)
    132136            if test $# -eq 0; then
     
    144148        # usage
    145149        --h*|-h*|-?|--?)
    146             echo "usage: $0 [--trunk-dir <dir>] [--branch <ver>] [--branch-dir <dir>] [--extra <svn-arg>] [--first-rev] rev1 [rev2..[revN]]]"
     150            echo "usage: $0 [--trunk-dir <dir>] [--branch <ver>] [--branch-dir <dir>] [--extra <svn-arg>] \\"
     151            echo "                   [--first-rev] [--update-first] rev1 [rev2..[revN]]]"
    147152            echo ""
    148153            echo "Options:"
     
    155160            echo "  --first-rev, --first, -1"
    156161            echo "    Merge only: Check that the branch does not have any pending changes."
     162            echo "  --update-first, --update, -u"
     163            echo "    Merge only: Update the branch before merging."
    157164            echo "  --extra <svn-arg>"
    158165            echo "    Additional arguments to specify to SVN."
  • trunk/tools/bin/backport-merge.sh

    r83679 r83680  
    4343        "${MY_SVN}" status -q "${MY_BRANCH_DIR}"
    4444        exit 1;
    45     else
    46         test -z "${MY_DEBUG}" || echo "debug: Found no pending changes on branch."
    4745    fi
     46    test -z "${MY_DEBUG}" || echo "debug: Found no pending changes on branch."
     47fi
     48
     49#
     50# Update branch if requested.
     51#
     52if test -n "${MY_UPDATE_FIRST}"; then
     53    if ! "${MY_SVN}" update "${MY_BRANCH_DIR}" --ignore-externals; then
     54        echo "error: branch updating failed..."
     55        exit 1;
     56    fi
     57    test -z "${MY_DEBUG}" || echo "debug: Updated the branch."
    4858fi
    4959
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette