Page MenuHomeFreeBSD

D35096.id105550.diff
No OneTemporary

D35096.id105550.diff

Index: tools/tools/git/mfc-candidates.sh
===================================================================
--- tools/tools/git/mfc-candidates.sh
+++ tools/tools/git/mfc-candidates.sh
@@ -33,18 +33,28 @@
to_branch=freebsd/stable/13
author="${USER}"
-# If pwd is a stable or release branch tree, default to it.
-cur_branch=$(git symbolic-ref --short HEAD 2>/dev/null)
-case $cur_branch in
-stable/*)
- to_branch=$cur_branch
- ;;
-releng/*)
- to_branch=$cur_branch
- major=${cur_branch#releng/}
- major=${major%.*}
- from_branch=freebsd/stable/$major
-esac
+# If pwd is a ports repo, set default to_branch to current quarterly branch.
+repo=$(basename "$(git remote get-url freebsd)")
+
+if [ "${repo}" = "ports.git" ]; then
+ year=$(date '+%Y')
+ month=$(date '+%m')
+ qtr=$(((month-1) / 3 + 1))
+ to_branch="freebsd/${year}Q${qtr}"
+else
+ # If pwd is a stable or release branch tree, default to it.
+ cur_branch=$(git symbolic-ref --short HEAD 2>/dev/null)
+ case $cur_branch in
+ stable/*)
+ to_branch=$cur_branch
+ ;;
+ releng/*)
+ to_branch=$cur_branch
+ major=${cur_branch#releng/}
+ major=${major%.*}
+ from_branch=freebsd/stable/$major
+ esac
+fi
params()
{

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 12, 6:21 AM (21 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31333543
Default Alt Text
D35096.id105550.diff (1 KB)

Event Timeline