Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108056466
D35096.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.diff
View Options
diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh
--- a/tools/tools/git/mfc-candidates.sh
+++ b/tools/tools/git/mfc-candidates.sh
@@ -30,21 +30,34 @@
# SUCH DAMAGE.
from_branch=freebsd/main
-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
+# Get the FreeBSD repository
+repo=$(basename "$(git remote get-url freebsd 2>/dev/null)" 2>/dev/null)
+
+if [ "${repo}" = "ports.git" ]; then
+ year=$(date '+%Y')
+ month=$(date '+%m')
+ qtr=$(((month-1) / 3 + 1))
+ to_branch="freebsd/${year}Q${qtr}"
+elif [ "${repo}" = "src.git" ]; then
+ to_branch=freebsd/stable/13
+ # 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
+else
+ echo "pwd is not under a ports or src repository."
+ exit 0
+fi
params()
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 21, 11:54 PM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16022042
Default Alt Text
D35096.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