Skip to content

Commit 93f6971

Browse files
committed
Make the mergedevbranch script more flexible in accepting different partial repository paths on the command line.
- Legacy-Id: 4808
1 parent c245f6a commit 93f6971

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/mergedevbranch

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,28 @@ branch=$1
108108
rev=$2
109109
fix=$3
110110

111+
note "Identify the branch:"
112+
if svn info http://svn.tools.ietf.org/svn/tools/ietfdb/personal/$branch > /dev/null 2>&1; then
113+
branch="personal/$branch"
114+
elif svn info http://svn.tools.ietf.org/svn/tools/ietfdb/branch/$branch > /dev/null 2>&1; then
115+
branch="branch/$branch"
116+
elif svn info http://svn.tools.ietf.org/svn/tools/ietfdb/$branch > /dev/null 2>&1; then
117+
true
118+
else
119+
die "Could not find a branch matching '$branch'"
120+
fi
121+
note "Merging from $branch@$rev"
122+
111123
note "Extract who and what:"
112124
info=$(svn log http://svn.tools.ietf.org/svn/tools/ietfdb/ -r $rev --incremental)
113125
set $(echo "$info" | tail -n +2 | head -n 1 | tr "|" "\t")
114126
who=$2; echo -e "\n$who"
115127
comment=$(echo "$info" | tail -n +3); echo -e "$comment\n"
116128

129+
130+
117131
note "Do the merge:"
118-
svn merge -c $rev http://svn.tools.ietf.org/svn/tools/ietfdb/personal/$branch .
132+
svn merge -c $rev http://svn.tools.ietf.org/svn/tools/ietfdb/$branch .
119133

120134
mail -s "Merged datatracker branch personal/$branch@$rev to trunk" $who -c henrik@levkowetz.com <<-EOF
121135
Hi,

0 commit comments

Comments
 (0)