Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144476580
D52681.id54425.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
D52681.id54425.diff
View Options
diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua
--- a/tools/tools/git/mfc-candidates.lua
+++ b/tools/tools/git/mfc-candidates.lua
@@ -129,16 +129,18 @@
local author = os.getenv("USER") or ""
local dirspec = nil
- local url = exec_command("git remote get-url freebsd")
- local freebsd_repo = string.match(url, "[^/]+$")
- freebsd_repo = string.gsub(freebsd_repo, ".git$", "")
+ local url = exec_command("git remote get-url freebsd 2>/dev/null")
+ local freebsd_repo
+ if url and url ~= "" then
+ freebsd_repo = string.match(url, "[^/]+$")
+ freebsd_repo = string.gsub(freebsd_repo, "%.git$", "")
+ end
if freebsd_repo == "ports" or freebsd_repo == "freebsd-ports" then
local year = os.date("%Y")
local month = os.date("%m")
local qtr = math.ceil(month / 3)
to_branch = "freebsd/" .. year .. "Q" .. qtr
elseif freebsd_repo == "src" or freebsd_repo == "freebsd-src" then
- to_branch = "freebsd/stable/14"
-- If pwd is a stable or release branch tree, default to it.
local cur_branch = exec_command("git symbolic-ref --short HEAD")
if string.match(cur_branch, "^stable/") then
@@ -147,6 +149,11 @@
to_branch = cur_branch
local major = string.match(cur_branch, "%d+")
from_branch = "freebsd/stable/" .. major
+ else
+ -- Use latest stable branch.
+ to_branch = exec_command("git for-each-ref --sort=-v:refname " ..
+ "--format='%(refname:lstrip=2)' " ..
+ "refs/remotes/freebsd/stable/* --count=1")
end
else
print("pwd is not under a ports or src repository.")
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 3:40 PM (5 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28595465
Default Alt Text
D52681.id54425.diff (1 KB)
Attached To
Mode
D52681: mfc-candidates: Minor improvements
Attached
Detach File
Event Timeline
Log In to Comment