Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151872390
D35096.id105550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35096.id105550.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D35096: mfc-candidates.sh: Set default to_branch for ports
Attached
Detach File
Event Timeline
Log In to Comment