Index: Tools/scripts/mfh =================================================================== --- Tools/scripts/mfh +++ Tools/scripts/mfh @@ -113,20 +113,29 @@ do rev=${rev##r} for f in $("${svn}" diff --summarize -c "r${rev}" "${svnserver}/ports/head"); do + # ignore top-level filenames without slash case ${f} in */*) ;; - *)continue;; + *) continue ;; esac f=${f#*/ports/head/} - f=${f%/*} - filelist="${filelist}${LF}${f}" + # strip down f to the first two components (CATEGORY/PORTNAME), + # so that if the MFH only addresses files/, we still get the + # full port to review, and, for instance, bump PORTREVISION + # separately if the patch was broken out from a larger lump. + while :; do + case ${f} in + */*/*) f=${f%/*} ;; + *) break ;; + esac + done + filelist="${filelist}${f}${LF}" done "${svn}" log "-r${rev##-}" ${svnserver}/ports/head | sed '1,2d;$d;/^MFH:/d' \ | sed '$d' >> commit.txt done -filelist=$(printf '%s\n' "${filelist}" | sort -u) -"${svn}" up --parents $(printf '%s\n' $filelist \ - | sed "s}^}${branch}/}") +filelist=$(printf '%s' "${filelist}" | sort -u | sed "s}^}${branch}/}") +"${svn}" up --parents $(printf '%s\n' $filelist) "${svn}" up --quiet "${branch}" for rev in "$@" do @@ -134,9 +143,9 @@ "${svn}" merge -c "r${rev}" ^/head/ "${branch}" done "${svn}" up --quiet "${branch}" +printf '\nAll the merge work was done in %s:\n' "${dir}/${branch}" "${svn}" status "${branch}" "${svn}" diff "${branch}" -echo "All the merge work was done in ${dir}/${branch}" ask "Do you want to commit? (no = start a shell)" || ( echo "Dropping you to a shell so you can investigate. Exit the shell to resume this script." cd "${branch}"