VirtualBox

Changeset 83679 in vbox for trunk


Ignore:
Timestamp:
Apr 11, 2020 6:37:52 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137170
Message:

tools/bin/backport-*: Adding a --first-rev option to check that the branch is empty.

Location:
trunk/tools/bin
Files:
2 edited

Legend:

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

    r83678 r83679  
    125125            ;;
    126126
     127        --first-rev|--first|-1)
     128            MY_FIRST_REV=1
     129            ;;
     130
    127131        --extra)
    128132            if test $# -eq 0; then
     
    140144        # usage
    141145        --h*|-h*|-?|--?)
    142             echo "usage: $0 [--trunk-dir <dir>] [--branch <ver>] [--branch-dir <dir>] [--extra <svn-arg>] rev1 [rev2..[revN]]]"
     146            echo "usage: $0 [--trunk-dir <dir>] [--branch <ver>] [--branch-dir <dir>] [--extra <svn-arg>] [--first-rev] rev1 [rev2..[revN]]]"
    143147            echo ""
    144148            echo "Options:"
     
    149153            echo "  --branch <ver>"
    150154            echo "    The name of the branch being backported to. default: auto"
     155            echo "  --first-rev, --first, -1"
     156            echo "    Merge only: Check that the branch does not have any pending changes."
    151157            echo "  --extra <svn-arg>"
    152158            echo "    Additional arguments to specify to SVN."
  • trunk/tools/bin/backport-merge.sh

    r83678 r83679  
    3333MY_SCRIPT_NAME="backport-merge.sh"
    3434. "${MY_SCRIPT_DIR}/backport-common.sh"
     35
     36#
     37# Check that the branch is clean if first revision.
     38#
     39if test -n "${MY_FIRST_REV}"; then
     40    MY_STATUS=`"${MY_SVN}" status -q "${MY_BRANCH_DIR}"`
     41    if test -n "${MY_STATUS}"; then
     42        echo "error: Branch already has changes pending..."
     43        "${MY_SVN}" status -q "${MY_BRANCH_DIR}"
     44        exit 1;
     45    else
     46        test -z "${MY_DEBUG}" || echo "debug: Found no pending changes on branch."
     47    fi
     48fi
    3549
    3650#
Note: See TracChangeset for help on using the changeset viewer.

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