Merge lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap into lp:~swag/armagetronad/0.2.9-sty+ct+ap-fork

Proposed by SwagTron
Status: Merged
Approved by: SwagTron
Approved revision: 1079
Merged at revision: 1081
Proposed branch: lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap
Merge into: lp:~swag/armagetronad/0.2.9-sty+ct+ap-fork
Diff against target: 488 lines (+219/-112)
8 files modified
.gitignore (+95/-0)
batch/make/version (+88/-97)
language/.gitignore (+1/-0)
language/english_base.txt (+2/-0)
src/engine/ePlayer.cpp (+15/-7)
src/engine/eVoter.cpp (+14/-4)
src/network/nAuthentication.cpp (+1/-1)
src/tron/gHud.cpp (+3/-3)
To merge this branch: bzr merge lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap
Reviewer Review Type Date Requested Status
SwagTron Approve
Review via email: mp+363897@code.launchpad.net
To post a comment you must log in.
Revision history for this message
SwagTron (swag) wrote :

Merge from 1079 sty+ct+ap

review: Approve
1080. By Armanelgtron

Merge in revisions 1079 and 1080 of lp:~swag/armagetronad/0.2.9-sty+ct+ap-fork

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.gitignore'
2--- .gitignore 1970-01-01 00:00:00 +0000
3+++ .gitignore 2019-03-04 01:04:48 +0000
4@@ -0,0 +1,95 @@
5+*.DS_Store
6+Armagetron Advanced Dedicated
7+Armagetron Advanced.app
8+desktop/os-x/Info.plist
9+.gdbinit
10+batch/rcd_config
11+batch/rcd_server
12+batch/rcd_startstop
13+batch/serverstarter
14+./armagetronad-dedicated
15+COPYING
16+ChangeLog
17+EclipseBuild
18+/INSTALL
19+/compile
20+Makefile.in
21+/aclocal.m4
22+/autom4te.cache
23+/config.h.in
24+/config.sub
25+/configure
26+/depcomp
27+/install-sh
28+/ylwrap
29+/missing
30+/touch
31+/version
32+src/doc/commands.txt
33+./.changetag
34+Makefile
35+/config.h
36+/config.log
37+/config.status
38+/extrapaths
39+/stamp-h1
40+/universal_variable*
41+batch/relocate
42+batch/relocate.in
43+batch/sysinstall
44+config/Makefile
45+config/aiplayers.cfg
46+config/rc.config
47+desktop/armagetronad-armagetronad.desktop
48+language/languages.txt
49+resource/included/
50+resource/automatic/
51+.deps
52+src/armagetronad_main
53+src/tTrueVersion.h
54+src/tUniversalVariables.h
55+src/tUniversalVariables.h.in
56+.dummy.dep
57+src/doc/Doxyfile
58+*.html
59+html.m4
60+*.dep
61+aa_config.h.in
62+/aa_config.h
63+*.pb.cc
64+*.pb.h
65+*.layout
66+*.depend
67+.objs
68+/build
69+.objs_release
70+desktop/armagetronad.protocol
71+src/vParser.cpp
72+src/protobuf/.dir
73+/armagetronad
74+/armagetronad-dedicated
75+/var
76+src/test/chat_prefix_test
77+leak.log
78+memprofile1.txt
79+memprofile2.txt
80+a.out.dSYM
81+src/tFakeVersion.h
82+config/settings_custom.cfg
83+config/server_info.cfg
84+src/armagetronad-serverquery
85+./rubbish
86+__pycache__
87+/src/armagetronad_serverquery
88+src/armagetronad_main_master
89+src/doc/COPYING.txt
90+rubbish
91+desktop/armagetronad-armagetronad-handler.desktop
92+desktop/armagetronad-link.xml
93+*.cbTemp
94+/version.h
95+*~
96+*.pyc
97+src/.cproject
98+src/.project
99+src/.settings
100
101=== modified file 'batch/make/version'
102--- batch/make/version 2015-04-01 11:44:48 +0000
103+++ batch/make/version 2019-03-04 01:04:48 +0000
104@@ -8,126 +8,117 @@
105
106 # set version parts to defaults for CVS snapshot
107 major_version=`cat ${srcdir}/major_version`
108+minor_version_proto=`cat ${srcdir}/minor_version`
109 DATE=`date +%Y%m%d`
110
111 #echo $major_version
112 #echo $minor_version
113
114-if test -d "${srcdir}/CVS"; then
115- # get the date/branch/version tag
116- rawtag=`cat ${srcdir}/CVS/Entries | grep major_version | sed -e "s,/major_version/.*/.*/.*/,,"`
117- #echo $rawtag
118- # determine the type of the tag
119- echo $rawtag | grep "^D" > /dev/null && tagtype=D
120- #echo $rawtag | grep "^Tb" > /dev/null && tagtype=Tb
121- echo $rawtag | grep "^Tv" > /dev/null && tagtype=Tv
122- #echo $tagtype
123-
124- # extract the raw tag
125- tag=`echo $rawtag | sed -e "s,^$tagtype,,"`
126- #echo $tag
127-
128- # date tag: make it a date dagged alpha release
129- if test "$tagtype" = D; then
130- DATE=`echo $tag | sed -e "s,\...\...\...\$,," | sed -e "s,\.,,g"`
131- minor_version=`cat ${srcdir}/minor_version | sed -e "s,DATE,$DATE," -e "s,YYYYMMDD,$DATE,"`
132- fi
133-
134- # version tag: take whole version, replace _[number] with .[number]
135- if test "$tagtype" = Tv; then
136- major_version=`echo $tag | sed -e "s,_\([0-9]\),\.\\1,g"`
137- minor_version=""
138- DATE=""
139- fi
140-fi
141-
142-if test -d "${srcdir}/.svn" || test -d "${srcdir}/../.svn"; then
143- # get the inter-repository path by parsing the URL
144-
145- URL=`svn info ${srcdir} | grep ^URL | sed -e 's,^URL: ,,'`
146-
147- # uncomment the followint URLs to test various cases
148- # trunk
149- # URL=https://svn.sourceforge.net/svnroot/armagetronad/armagetronad/trunk/armagetronad
150- # branch 0.4
151- # URL=https://svn.sourceforge.net/svnroot/armagetronad/armagetronad/branches/0.4/armagetronad
152-
153- # tag 0.2.8.2
154- # URL=https://svn.sourceforge.net/svnroot/armagetronad/armagetronad/tags/0.2.8.2/armagetronad
155-
156- #echo URL=$URL
157- REPOPATH=`echo $URL | sed -e 's,/armagetronad$,,' -e 's,.*/armagetronad/,,'`
158- #echo REPOPATH=$REPOPATH
159-
160- # is it a tag?
161- if echo $REPOPATH | grep '^tags/' > /dev/null; then
162- # echo Tag
163- major_version=`echo $REPOPATH | sed -e 's,^tags/,,'`
164- minor_version=""
165- DATE=""
166- else
167- # make revision the alpha tag
168- REVISION=`svn info ${srcdir} | grep ^Revision | sed -e 's,^Revision: ,,'`
169-
170- # is it a branch?
171- if echo $REPOPATH | grep '^branches/' > /dev/null; then
172- # echo Branch
173- branch=`echo $REPOPATH | sed -e 's,^branches/,,'`
174- # branch 0.2.8 produces 0.2.9 versions. Confusing, yeah, but moving it
175- # in the repo is too risky.
176- if test ${branch} = "0.2.8"; then
177- # try to get revision ID from bzr using the magic bzr-svn marker
178- # (only works this way on 0.2.8)
179- REVISION=`svn propget bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs ${srcdir} | tail -n 4 | sed -e 's, .*,,' | grep [0-9] | tail -n 1`
180- else
181- major_version=${branch}
182- fi
183- fi
184-
185- # trunk or branch
186-
187- #echo REVISION=$REVISION
188- minor_version=_alpha_r$REVISION
189- DATE=""
190- fi
191-fi
192+bzr_count_revisions()
193+{
194+ srcdir="$1"
195+ limit="$2"
196+
197+ test -z "$limit" || limit="-l $limit"
198+
199+ count=$(bzr log --include-merges --line $limit "${srcdir}" 2>/dev/null | wc -l)
200+ echo $count
201+}
202
203 # *TODO* once we get our superproject up on launchpad (and thus get saner branch nicks), use branch nicks for $major_version
204 # Check if bzr is installed, and if the path is versionned
205-bzr info ${srcdir} >/dev/null 2>&1
206+bzr >/dev/null 2>&1
207 # But for now, ignore it
208-if test $? -eq 0
209+if test $? -eq 0 && test -d ${srcdir}/.bzr
210 #if test 1 -eq 0
211 then
212- # get revno
213- revno=`bzr revno ${srcdir}`
214-
215+ # Crappily, we can't rely on revision numbers to do anything
216+ # ( ie. when one merges then pushes, the last revno might be lower than originally)
217+ # So we count revisions, including merged ones, also including fools which have empty
218+ # lines with only "revno: 15" in their commit messages
219+ revno=$( bzr revno ${srcdir} 2>/dev/null)
220+ revcount=$( bzr_count_revisions ${srcdir} )
221+ lca=$revno
222+ lcaz=$revcount
223+ versioned=#
224+ branchurl=$( bzr info ${srcdir} 2>/dev/null | sed -ne 's/^ parent branch: \(.*\)$/\1/p' )
225+
226+
227+ # We will check this branch diverged, and/or if tree changed
228+ bzrmissingcout=$( cd ${srcdir} && bzr missing --this 2>/dev/null )
229+ missing=$?
230 bzr diff ${srcdir} --quiet >/dev/null 2>&1
231- # Test for the return code of bzr diff (see bzr diff --help)
232- if test $? -eq 0
233- then
234- # If no change was made, use revision number (with offset to match svn revno)
235- # but first check if it's tagged
236+ changed=$?
237+
238+
239+ if test ${missing} -eq 1
240+ # if it diverged:
241+ then
242+ # Count the revisions we added locally
243+ localrevisions=$( echo "${bzrmissingcout}" | sed -ne '2,1s/[^0-9]//gp' )
244+ # See how many steps it is, with the fool's number
245+ stepsbackwards=$( bzr_count_revisions ${srcdir} ${localrevisions} )
246+ # And start dancing.
247+ minor_version=_alpha_z$(( ${revcount} - ${stepsbackwards} ))_${DATE}
248+ # Set last common ancestors
249+ lca=$(( ${revno} - ${localrevisions}))
250+ lcaz=$(( ${revcount} - ${stepsbackwards} ))
251+ srcchanged=#
252+ elif test ${missing} -eq 0 && ( test ${changed} -eq 1 || test ${changed} -eq 2 )
253+ then
254+ # If a change was made and no more revision was added, just use revision fool's number plus build date
255+ minor_version=_alpha_z${revcount}_${DATE}
256+ # And this is versionned too
257+ srcchanged=#
258+ elif test ${missing} -eq 0
259+ then
260+ # If really no change was made, use the fool's number, with tag if any
261+ # So check if we have tags
262+ revno=$(bzr revno ${srcdir})
263 tag=$(bzr tags -r $revno | awk '{ print $1 }')
264- if test $tag
265+ if test ${tag}
266 then
267 # If it is tagged, use the tag
268- DATE=_$tag
269+ minor_version=_alpha_z${revcount}_${tag}
270 else
271- # If not, use revision number
272- DATE=_r${revno}
273+ # If not, use fool's number only
274+ minor_version=_alpha_z${revcount}
275 fi
276- elif test $? -lt 3
277+ # That's versioned as well
278+ else
279+ # Otherwise, this is just not versionned
280+ versioned=
281+ fi
282+
283+ if test $versioned
284 then
285- # If a change was made, use revision number plus build date
286- DATE=_r${revno}_$DATE
287- # It returns 3 if it's not versionned, so forget it
288+ branchnick=$( cd ${srcdir}; bzr nick )
289+ revid=$( bzr testament | sed -ne 's/^revision-id: \(.*\)/\1/p' )
290+ fi
291+fi
292+
293+if test -d "${srcdir}/.git"; then
294+ # check for a tag
295+ cd $srcdir
296+ # todo: once we have make tags, consider just git describe --tags as version ID.
297+ if tag=`git describe --tags --candidates=0` > /dev/null 2>&1; then
298+ major_version=`echo ${tag} | sed -e s/version_// -e s/release_//`
299+ minor_version=""
300+ DATE=""
301+ else
302+ if git diff-index --quiet HEAD --; then
303+ # local checkout clean, just use revno
304+ DATE=_z`git rev-list HEAD --count`
305+ else
306+ # local changes, add date
307+ DATE=_z`git rev-list HEAD --count`_$DATE
308+ fi
309 fi
310 fi
311
312 if test -z "$minor_version"
313 then
314- test -z "$DATE" || minor_version=`cat ${srcdir}/minor_version | sed -e "s,DATE,$DATE," -e "s,YYYYMMDD,$DATE,"`
315+ test -z "$DATE" || minor_version=`echo ${minor_version_proto} | sed -e "s,DATE,$DATE," -e "s,YYYYMMDD,$DATE,"`
316 fi
317
318 echo $major_version$minor_version
319
320=== added file 'language/.gitignore'
321--- language/.gitignore 1970-01-01 00:00:00 +0000
322+++ language/.gitignore 2019-03-04 01:04:48 +0000
323@@ -0,0 +1,1 @@
324+/*.txt.bak
325\ No newline at end of file
326
327=== modified file 'language/english_base.txt'
328--- language/english_base.txt 2019-03-04 00:50:01 +0000
329+++ language/english_base.txt 2019-03-04 01:04:48 +0000
330@@ -1957,6 +1957,8 @@
331 vote_details_help This menu entry determines your vote. Details: \1
332 vote_submitter_text This vote was submitted by \1.
333
334+vote_expired \1 (Already resolved)
335+
336 #*************************************
337 #*************************************
338 #
339
340=== modified file 'src/engine/ePlayer.cpp'
341--- src/engine/ePlayer.cpp 2019-03-04 00:50:01 +0000
342+++ src/engine/ePlayer.cpp 2019-03-04 01:04:48 +0000
343@@ -1590,9 +1590,9 @@
344 if ( p->CurrentTeam() )
345 {
346 if ( p->Object() && !p->Object()->Alive() )
347- con << tOutput("$dead_console_decoration");
348+ con << tOutput("$dead_console_decoration") << " ";
349 }
350- else con << tOutput("$spectator_console_decoration");
351+ else con << tOutput("$spectator_console_decoration") << " ";
352
353 if (se_highlightMyName && actualMessage.Contains(p->GetName()))
354 {
355@@ -4623,6 +4623,10 @@
356 // a name is only legal if it contains at least one non-witespace character.
357 static bool IsLegalPlayerName( tString const & name )
358 {
359+ tString userName = se_UnauthenticatedUserName( name );
360+ if ( userName.Len() <= 1 )
361+ return false;
362+
363 // strip colors
364 tString stripped( tColoredString::RemoveColors( name ) );
365
366@@ -7308,7 +7312,7 @@
367 tSettingItem< bool > se_stripMiddleConf( "FILTER_NAME_MIDDLE", se_stripMiddle );
368
369 // do the optional filtering steps
370-static void se_OptionalNameFilters( tString & remoteName )
371+static void se_OptionalNameFilters( tString & remoteName, int owner )
372 {
373 // filter colors
374 if ( se_filterColorNames )
375@@ -7375,7 +7379,8 @@
376 else
377 {
378 // or replace it by a default value
379- remoteName = "Player 1";
380+ remoteName = "Player ";
381+ remoteName << owner;
382 }
383 }
384 }
385@@ -7411,7 +7416,7 @@
386 m >> remoteName;
387
388 // filter
389- se_OptionalNameFilters( remoteName );
390+ se_OptionalNameFilters( remoteName, Owner() );
391
392 // remove all colors from name
393 tString colorlessName = tColoredString::RemoveColors(remoteName, false);
394@@ -10609,7 +10614,7 @@
395 {
396 // apply name filters only on remote players
397 if ( Owner() != 0 )
398- se_OptionalNameFilters( nameFromClient_ );
399+ se_OptionalNameFilters( nameFromClient_, Owner() );
400
401 // nothing wrong ? proceed to renaming
402 nameFromAdmin_ = nameFromServer_ = nameFromClient_;
403@@ -11003,7 +11008,10 @@
404
405 // replace empty name
406 if ( !IsLegalPlayerName( nameFromClient_ ) )
407- nameFromClient_ = "Player 1";
408+ {
409+ nameFromClient_ = "Player ";
410+ nameFromClient_ << Owner();
411+ }
412
413 if ( sn_GetNetState() != nCLIENT )
414 nameFromServer_ = nameFromClient_;
415
416=== modified file 'src/engine/eVoter.cpp'
417--- src/engine/eVoter.cpp 2019-03-03 20:57:16 +0000
418+++ src/engine/eVoter.cpp 2019-03-04 01:04:48 +0000
419@@ -1003,12 +1003,22 @@
420
421 virtual tString DoGetDescription() const // returns the description of the voting item
422 {
423- return expired_ ? tString("Expired vote") : description_;
424+ return expired_ ? tString( tOutput( "$vote_expired", description_ ) ) : description_;
425 }
426
427 virtual tString DoGetDetails() const // returns the detailed description of the voting item
428 {
429- return expired_ ? tString("Expired vote") : details_;
430+ return expired_ ? tString( tOutput( "$vote_expired", details_ ) ) : details_;
431+ }
432+
433+ bool Expired() const
434+ {
435+ return expired_;
436+ }
437+
438+ bool Pending() const
439+ {
440+ return !expired_;
441 }
442 protected:
443 mutable tString description_; //!< the description of the vote
444@@ -1462,12 +1472,12 @@
445
446 virtual tString DoGetDescription() const // returns the description of the voting item
447 {
448- return eVoteItemServerControlled::DoGetDescription();
449+ return Pending() ? eVoteItemHarm::DoGetDescription() : eVoteItemServerControlled::DoGetDescription();
450 }
451
452 virtual tString DoGetDetails() const // returns the detailed description of the voting item
453 {
454- return eVoteItemServerControlled::DoGetDetails();
455+ return Pending() ? eVoteItemHarm::DoGetDetails() : eVoteItemServerControlled::DoGetDetails();
456 }
457 };
458
459
460=== modified file 'src/network/nAuthentication.cpp'
461--- src/network/nAuthentication.cpp 2019-03-03 20:57:16 +0000
462+++ src/network/nAuthentication.cpp 2019-03-04 01:04:48 +0000
463@@ -1301,7 +1301,7 @@
464 // the finish task can also be triggered any time by this function:
465 void nLoginProcess::Abort()
466 {
467- nMemberFunctionRunner::ScheduleBackground( *this, &nLoginProcess::Finish );
468+ nMemberFunctionRunner::ScheduleForeground( *this, &nLoginProcess::Finish );
469 }
470
471 // which, when finished, triggers the foreground task of updating the
472
473=== removed directory 'src/thirdparty/shttpd'
474=== modified file 'src/tron/gHud.cpp'
475--- src/tron/gHud.cpp 2019-03-03 20:57:16 +0000
476+++ src/tron/gHud.cpp 2019-03-04 01:04:48 +0000
477@@ -581,9 +581,9 @@
478 thisTime = localtime ( &rawtime );
479
480 if(thisTime->tm_min != lastTime) {
481- char h[3];
482- char m[3];
483- char ampm[3] = " ";
484+ char h[13];
485+ char m[13];
486+ char ampm[13] = " ";
487
488 lastTime = thisTime->tm_min;
489

Subscribers

People subscribed via source and target branches