Skip to content

Commit f10ddad

Browse files
committed
Merged in changes from trunk up to r17584.
- Legacy-Id: 17593
2 parents 726fcbf + 5cecc0b commit f10ddad

129 files changed

Lines changed: 1803 additions & 1239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/attic
2727
/bin
2828
/etc
29+
/env
2930
/ghostdriver.log
3031
/htmlcov
3132
/include
@@ -48,3 +49,5 @@
4849
/trunk37
4950
/unix.tag
5051
/tmp-nomcom-public-keys-dir
52+
*.pyc
53+
__pycache__

bin/mergeready

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,17 @@ for opt, value in opts:
8787
if opt in ["-h", "--help"]: # Output this help, then exit
8888
print( __doc__ % locals() )
8989
sys.exit(1)
90-
elif opt in ["-v", "--version"]: # Output version information, then exit
90+
elif opt in ["-V", "--version"]: # Output version information, then exit
9191
print( program, version )
9292
sys.exit(0)
93-
elif opt in ["-V", "--verbose"]: # Output version information, then exit
93+
elif opt in ["-v", "--verbose"]: # Output version information, then exit
9494
opt_verbose += 1
9595

9696
# ----------------------------------------------------------------------
9797
def say(s):
9898
sys.stderr.write("%s\n" % (s))
9999

100+
100101
# ----------------------------------------------------------------------
101102
def note(s):
102103
if opt_verbose:
@@ -204,6 +205,7 @@ for line in pipe('svn propget svn:mergeinfo .').splitlines():
204205
write_cache = True
205206
mergeinfo[line] = merged
206207
merged_revs.update(merged)
208+
note('')
207209

208210
if write_cache:
209211
cache[repo] = mergeinfo
@@ -227,7 +229,7 @@ def get_changeset_list_from_file(repo, filename):
227229
if line.startswith('#') or line == "":
228230
continue
229231
try:
230-
note(" '%s'" % line)
232+
#note(" '%s'" % line)
231233
parts = line.split()
232234
if len(parts) >1 and parts[1] == '@':
233235
branch, rev = parts[0], parts[2]
@@ -253,7 +255,7 @@ def get_changeset_list_from_file(repo, filename):
253255
def get_ready_commits(repo, tree):
254256
list = []
255257
note("Getting ready commits from '%s'" % tree)
256-
cmd = 'svn log -v -r %s:HEAD %s/%s/' % ((head-500), repo, tree)
258+
cmd = 'svn log -v -r %s:HEAD %s/%s/' % ((head-200), repo, tree)
257259
if opt_verbose > 1:
258260
note("Running '%s' ..." % cmd)
259261
commit_log = pipe(cmd)
@@ -273,7 +275,7 @@ def get_ready_commits(repo, tree):
273275
note(" %s %s: %s@%s" % (when.strftime("%Y-%m-%d %H:%MZ"), who, branch, rev))
274276
list += [(rev, repo, branch),]
275277
elif rev in merged_revs and not branch == merged_revs[rev]:
276-
sys.stderr.write('Rev %s: %s != %s' % (rev, branch, merged_revs[rev]))
278+
sys.stderr.write('Rev %s: %s != %s\n' % (rev, branch, merged_revs[rev]))
277279
else:
278280
pass
279281
else:
@@ -286,10 +288,8 @@ ready += get_changeset_list_from_file(repo, '../ready-for-merge')
286288
hold = get_changeset_list_from_file(repo, 'hold-for-merge')
287289
hold += get_changeset_list_from_file(repo, '../hold-for-merge')
288290
ready += get_ready_commits(repo, 'personal')
289-
ready += get_ready_commits(repo, 'branch/amsl')
290291
ready += get_ready_commits(repo, 'branch/iola')
291292
ready += get_ready_commits(repo, 'branch/dash')
292-
ready += get_ready_commits(repo, 'branch/proceedings')
293293

294294
ready_commits = {}
295295
all_commits = {}
@@ -328,7 +328,9 @@ for entry in ready:
328328
else:
329329
raise
330330
#
331-
merge_path = os.path.join(*path.split(os.path.sep)[:4])
331+
dirs = path.split(os.path.sep)
332+
dirs = dirs[:dirs.index('ietf')] if 'ietf' in dirs else dirs[:4]
333+
merge_path = os.path.join(*dirs)
332334
if not (rev, repo, merge_path) in hold:
333335
output_line = "%s %-24s ^/%s@%s" % (when.strftime("%Y-%m-%d_%H:%MZ"), who+":", merge_path, rev)
334336
all_commits[when] = (rev, repo, branch, who, merge_path)
@@ -388,10 +390,11 @@ for key in keys:
388390
keys = list(not_passed.keys())
389391
keys.sort()
390392
if len(keys) > 0:
391-
sys.stderr.write("Commits marked ready which haven't passed the test suite:\n")
393+
print("")
394+
print("Commits marked ready which haven't passed the test suite:\n")
392395
for key in keys:
393-
sys.stderr.write(not_passed[key]+'\n')
394-
sys.stderr.write('\n')
396+
print(not_passed[key])
397+
print('')
395398

396399
keys = list(ready_commits.keys())
397400
keys.sort()

bin/mkdevbranch

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)";
7878
# Option parsing
7979

8080
# Options
81-
shortopts=hm:M:vV
82-
longopts=help,meeting=,message=,verbose,version
81+
shortopts=hm:M:nvV
82+
longopts=help,meeting=,message=,dry-run,verbose,version
8383

8484
# Default values
8585
num=""
8686
msg=""
87+
do=""
8788

8889
if [ "$(uname)" = "Linux" ]; then
8990
args=$(getopt -o "$shortopts" --long "$longopts" -n '$program' -- $SV "$@")
@@ -103,6 +104,7 @@ while true ; do
103104
-h| --help) usage; exit;; # Show this help, then exit
104105
-m| --meeting) num=$2; shift;; # Specify the IETF meeting number
105106
-M| --message) msg=$2; shift;; # Specify extra message text
107+
-n| --dry-run) do="echo -- ==>";; # Only show what would be done
106108
-v| --verbose) VERBOSE=1;; # Be more talkative
107109
-V| --version) version; exit;; # Show program version, then exit
108110
--) shift; break;;
@@ -128,8 +130,8 @@ function mksvndir() {
128130
who=$1
129131
if [ "$2" ]; then dir=$2; else dir=$who; fi
130132
if ! svn info https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$dir >/dev/null 2>&1 ; then
131-
echo "Creating personal directory area for IETF datatracker coding: /personal/$dir"
132-
svn mkdir https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$dir -m "Personal SVN dir for $who, for IETF datatracker code"
133+
$do echo "Creating personal directory area for IETF datatracker coding: /personal/$dir"
134+
$do svn mkdir https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$dir -m "Personal SVN dir for $who, for IETF datatracker code"
133135
else
134136
echo "Repository area personal/$dir is already in place."
135137
fi
@@ -143,7 +145,7 @@ cd $progdir
143145

144146
if [ "$who" ]; then
145147
mksvndir $who
146-
svn cp https://svn.tools.ietf.org/svn/tools/ietfdb/$source https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$who/$target/ -m "New branch for $target"
148+
$do svn cp https://svn.tools.ietf.org/svn/tools/ietfdb/$source https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$who/$target/ -m "New branch for $target"
147149
echo "New branch: ^/personal/$who/$target"
148150
else
149151
[ "$msg" ] && msg="
@@ -154,11 +156,21 @@ $msg
154156
trac-admin /www/tools.ietf.org/tools/ietfdb wiki export IETF${n}SprintSignUp \
155157
| egrep "^\|\|" | tail -n +2 | python -c '
156158
import sys, re
157-
afile = open("aliases")
158-
aliases = dict([ line.strip().split(None,1) for line in afile.read().splitlines() ])
159+
with open("aliases") as afile:
160+
try:
161+
aliases = dict([ line.strip().split(None,1) for line in afile.read().splitlines() if line.strip() ])
162+
except ValueError:
163+
sys.stderr.write([ line.strip().split(None,1) for line in afile.read().splitlines() if line.strip() ])
164+
raise
159165
160166
for line in sys.stdin:
161-
blank, name, email, rest = line.strip().split("||", 3)
167+
try:
168+
blank, name, email, rest = line.strip().split("||", 3)
169+
email = email.strip()
170+
except ValueError:
171+
sys.stderr.write(line+"\n")
172+
raise
173+
162174
login, dummy = re.split("[@.]", email, 1)
163175
if email in aliases:
164176
login = aliases[email]
@@ -171,9 +183,9 @@ for line in sys.stdin:
171183
echo "$login ($name <$email>):"
172184
mksvndir $login
173185
if ! svn info https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$login/$target >/dev/null 2>&1 ; then
174-
echo " creating $target branch for $login ($name)."
175-
svn cp https://svn.tools.ietf.org/svn/tools/ietfdb/$source https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$login/$target/ -m "New IETF datatracker coding branch for $name" \
176-
&& mail "$name <$email>" -s "A new SVN branch for you for IETF datatracker coding${rev:+, based on $rev}." -b henrik@levkowetz.com <<-EOF
186+
$do echo " creating $target branch for $login ($name)."
187+
$do svn cp https://svn.tools.ietf.org/svn/tools/ietfdb/$source https://svn.tools.ietf.org/svn/tools/ietfdb/personal/$login/$target/ -m "New IETF datatracker coding branch for $name" \
188+
&& $do mail "$name <$email>" -s "A new SVN branch for you for IETF datatracker coding${rev:+, based on $rev}." -b henrik@levkowetz.com <<-EOF
177189
Hi,
178190
$msg
179191
This mail has been automatically generated by the $program script.
@@ -199,7 +211,7 @@ for line in sys.stdin:
199211
200212
EOF
201213
else
202-
echo " branch personal/$login/$target already exists."
214+
$do echo " branch personal/$login/$target already exists."
203215
fi
204216
done
205217
fi

bin/mkpatch

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)";
7171
# Option parsing
7272

7373
# Options
74-
shortopts=c:r:hvV
75-
longopts=change=,revision=,help,verbose,version
74+
shortopts=c:or:hvV
75+
longopts=change=,overwrite,revision=,help,verbose,version
7676

7777
# Default values
7878

@@ -92,7 +92,7 @@ fi
9292
while true ; do
9393
case "$1" in
9494
-c| --change) CHG="$2"; shift;; # the change made by revision ARG
95-
-r| --revision) REV="$2"; shift;; # the change made between revisions REV
95+
-o| --overwrite) OVER=1;; # overwrite any existing patch file
9696
-h| --help) usage; exit;; # Show this help, then exit
9797
-v| --verbose) VERBOSE=1;; # Be more talkative
9898
-V| --version) version; exit;; # Show program version, then exit
@@ -105,16 +105,19 @@ done
105105
# ----------------------------------------------------------------------
106106
# The program itself
107107

108-
if [ $# -lt 2 ]; then die "Expected patch name and file list on the command line."; fi
109-
if [[ $1 =~ / ]]; then die "Expected a patch name, but the first argument to $program seems to be a file path: '$1'"; fi
110-
111-
name=$1; shift;
112-
if [ "$CHG" ]; then name="$name-c$CHG"; fi
108+
if [ "$CHG" ]; then
109+
name=$(echo $(svn log -c $CHG | sed -r -e '/^---/d' -e '/^r[0-9]+/d' -e '/^$/d' -e 's/Merged in \[[0-9]+\] from [^:]+..//' ) | sed -r -e 's/(.*)/\L\1/' -e 's/[^[:alnum:]]/-/g' -e 's/-+/-/g' | cut -c 1-40)
110+
name="$name-c$CHG"
111+
else
112+
if [ $# -lt 2 ]; then die "Expected patch name and file list on the command line."; fi
113+
if [[ $1 =~ / ]]; then die "Expected a patch name, but the first argument to $program seems to be a file path: '$1'"; fi
114+
name=$1; shift;
115+
fi
113116

114117
patchfile=$progdir/../../patches/$(date +%Y-%m-%d)-$name.patch
115-
if [ -e $patchfile ]; then die "Patchfile $patchfile already exists"; fi
118+
if [ -e $patchfile -a ! -n "$OVER" ]; then die "Patchfile $patchfile already exists"; fi
116119
svn diff ${CHG:+ -c $CHG} ${REV:+ -r $REV} "$@" > $patchfile
117120
less $patchfile
118121
echo ""
119122
echo ""
120-
echo "Patch is in $patchfile."
123+
echo "Patch is in $patchfile"

bin/mkrelease

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ function note() {
6666
if [ -n "$VERBOSE" ]; then echo -e "\n$*"; fi
6767
}
6868

69+
function check() {
70+
[ "$(which $1)" ] || die "could not find the '$1' command. $2"
71+
}
72+
6973
# ----------------------------------------------------------------------
7074
function version() {
7175
echo -e "$program $version"
@@ -119,6 +123,11 @@ while true ; do
119123
shift
120124
done
121125

126+
# ----------------------------------------------------------------------
127+
# Check some requirements
128+
129+
check bower "It is required to update web resources. Install with npm."
130+
122131
# ----------------------------------------------------------------------
123132
# The program itself
124133

@@ -212,6 +221,7 @@ if [ -z "$IGNORE_RESOURCES" ]; then
212221
$do svn commit ietf/externals/static -m "Updated bower-managed static web assets"
213222
# Get rid of bower-installed files which we don't use:
214223
$do rm -rf ietf/externals/static/datatracker/
224+
$do rm -rf ietf/externals/static/jquery.cookie/
215225
$do rm -f $(svn st ietf/externals/ | grep '^\?' | awk '{print $2}')
216226
fi
217227

@@ -244,7 +254,9 @@ if [ -d ../coverage ]; then
244254
rsync -a static/coverage/ ../coverage/$VER/
245255
fi
246256

247-
contributors=$(echo "$changes" | sed 's/\.[ \t\n]/ /'| tr -c "a-z0-9.@-" "\n" | sort | uniq | grep '@' | sed -r -e 's/^\.+//' -e 's/\.+$//' -e 's/^/-c /' || true)
257+
contributors=$(echo "$changes" | gawk '/^ \* Merged in \[[0-9]+\] from [^: ]+/ {sub(":",""); print $6;}' | sort | uniq)
258+
note "Contributors:
259+
$contributors"
248260

249261
note "Setting the current time on the release notes in the changelog file ..."
250262
$do sed -r -i -e "1,/^ -- /s/([A-Za-z-]+ <[a-z0-9.-]+@[a-z0-9.-]+> ).*$/\1$(TZ=UTC date +'%d %b %Y %H:%M:%S %z')/" changelog

0 commit comments

Comments
 (0)