Config
Log for #openttd on 15th October 2018:
Times are UTC Toggle Colours
00:21:15  *** Samu has quit IRC
00:28:09  *** Thedarkb-T60 has quit IRC
00:45:45  *** Supercheese has joined #openttd
00:53:08  *** Flygon has joined #openttd
01:12:23  *** Mazur has joined #openttd
01:29:50  *** tokai|noir has joined #openttd
01:29:50  *** ChanServ sets mode: +v tokai|noir
01:36:37  *** tokai has quit IRC
01:54:17  *** glx has quit IRC
02:25:46  *** Pikka has joined #openttd
03:05:19  *** Supercheese has quit IRC
03:05:42  *** Supercheese has joined #openttd
03:09:24  *** haudrauf has quit IRC
03:10:22  *** haudrauf has joined #openttd
04:31:16  *** triolus has quit IRC
04:57:43  *** Flygon_ has joined #openttd
05:03:00  *** snail_UES_ has quit IRC
05:05:10  *** Flygon has quit IRC
06:36:14  *** Wacko1976 has quit IRC
07:00:34  *** Supercheese has quit IRC
07:29:23  *** Wacko1976 has joined #openttd
07:33:18  *** Samu has joined #openttd
08:32:16  *** matt21347 has joined #openttd
09:43:59  *** Wacko1976 has quit IRC
12:27:52  *** dvim has joined #openttd
12:54:03  *** snail_UES_ has joined #openttd
12:55:34  *** matt21347 has quit IRC
12:55:57  *** matt21347 has joined #openttd
13:04:45  *** dvim has quit IRC
13:07:29  *** dvim has joined #openttd
13:09:53  *** snail_UES_ has quit IRC
13:29:36  *** GroovyNoodle has joined #openttd
13:41:39  *** Flygon_ has quit IRC
13:41:43  <Samu> hi
13:42:25  <dihedral> hey ho
13:42:42  <Xaroth> o7
14:20:03  *** nielsm has joined #openttd
14:43:56  *** Alberth has joined #openttd
14:43:56  *** ChanServ sets mode: +o Alberth
14:44:04  <Alberth> hola
14:47:52  <planetmaker> aloha :)
14:48:12  <planetmaker> https://stackoverflow.com/questions/14989858/get-the-current-git-hash-in-a-python-script <-- anyone can answer my question? :D
14:48:27  <planetmaker> nml version detection is somewhat broken and I want it more pretty than calling git n times
14:49:51  <Eddi|zuHause> i'm fairly sure there's a git module in python so you don't have to mess with command line
14:50:12  *** TheMask96 has quit IRC
14:50:17  <planetmaker> I know there is. Not sure I want to include that there, though
14:50:47  <planetmaker> (it's described in the link I provided there)
14:52:25  <Eddi|zuHause> so then you have two ways to go, neither one of which you like?
14:52:51  <Eddi|zuHause> not sure i can help with that :p
14:53:03  *** TheMask96 has joined #openttd
14:53:19  <planetmaker> :D maybe.
14:59:24  <Alberth> " One common usage of git rev-parse is to print the SHA1 hashes given a revision specifier. In addition, it has various options to format this output such as --short for printing a shorter unique SHA1 "   https://stackoverflow.com/questions/15798862/what-does-git-rev-parse-do#15802301  ?
14:59:40  <Alberth> ie the second post in your link
15:02:00  <planetmaker> yeah, maybe that can be utilized to shorten the stuff a lot
15:02:12  <Alberth> except revision is less than useless to describe the content of the repo
15:02:33  <planetmaker> it's just a meaningless name.
15:03:07  <planetmaker> git show HEAD --pretty='%h8 "%at"' or so gives me hash and commit time
15:03:18  <Alberth> arguably,  head^1  or so isn't much better
15:20:36  <planetmaker> perhaps sth like "git describe HEAD" is a good choice. In connection with the date or so
15:21:01  <planetmaker> "git describe --tags" I mean.
15:22:04  *** WWacko1976-work has quit IRC
15:24:42  <planetmaker> 0.4.5-1-gc95db24a is actually a decent version for me. It contains the hash for identification. And the distance to the last tag
15:25:38  <planetmaker> And the last tag itself
15:27:19  <Alberth> yep, seems useful
15:35:46  <Eddi|zuHause> planetmaker: while you're here, do you have any idea how devzone compiles work? because last time i tried it seemed to have problems "building" eddi-nml, and it couldn't use that to build CETS
15:36:38  <Eddi|zuHause> (everything works locally)
15:37:14  <Eddi|zuHause> (i never tried "building" nml, i just run it)
15:37:41  <Eddi|zuHause> (and i never changed anything build-related)
15:38:13  <planetmaker> well, yes... did it have problems with eddi-nml itself? Or with using it on a project?
15:39:26  *** HerzogDeXtEr has joined #openttd
15:39:35  <Eddi|zuHause> both, i think
15:39:57  <Eddi|zuHause> but i don't know whether one depended on the other or they are unrelated problems
15:40:00  <Alberth> the former probably defeats the latter :)
15:42:35  <Eddi|zuHause> in CETS: 13:12:49 nmlc: error: no such option: --verbosity (https://jenkins.openttdcoop.org/job/cets/29/console) seems to suggest it runs an outdated version of nmlc
15:43:44  <Eddi|zuHause> and i can't make any sense of https://jenkins.openttdcoop.org/job/eddi-nml/24/console ... it tries to run some pythonw.exe stuff to make an archive or something
15:49:37  <planetmaker> https://devs.openttd.org/~planetmaker/patches/index.php?source=git_version_detection.diff <-- @Alberth, what do you think?
15:50:19  <planetmaker> Eddi|zuHause, hm, yes, it tries to build a windoze binary... that's where the pythonw comes from
15:50:37  <planetmaker> all nicely using a python3.2 or so started in a somewhat ancient wine
15:50:50  <Eddi|zuHause> planetmaker: but there should be no difference to regular nml in that regard
15:51:17  <Alberth> shouldn't there a abspath in line 51 ?
15:52:42  <Alberth> line 62, do line counting in python
15:53:05  <planetmaker> not as far as I know. It's verbatim copy from the existing version detection in line 51...55
15:53:21  <Eddi|zuHause> "# we want to return to where we were. So save the old path" <-- that comment doesn't match any surrounding code
15:53:39  <Alberth> version.split('-')) == 1        "-" not in version   right?
15:54:15  <planetmaker> right
15:54:29  <planetmaker> Eddi|zuHause, also correct. Bitrot also in the hg version it seems
15:55:55  *** sla_ro|master has joined #openttd
15:56:12  *** dvim has quit IRC
15:56:34  <Alberth> "-" is pretty fragile, probably, for branch names like "branch-2" or "new-feature"
15:57:24  <Eddi|zuHause> but that would just add more split segments?
15:57:53  *** Oroburos has joined #openttd
15:59:22  <Eddi|zuHause> so effectively that means tags containing "-" don't count as "release"?
16:00:30  <planetmaker> hm, yes
16:04:15  <Alberth> you don't assign version there?
16:04:42  <Alberth> except for ''
16:05:08  <planetmaker> line 78 and 80
16:05:35  <Eddi|zuHause> you only assign version_list before line 68
16:05:44  <Eddi|zuHause> but try to use version there
16:06:04  <Alberth> test is at 68
16:06:19  <planetmaker> oh, yes
16:06:21  <Eddi|zuHause> version_list in line 56
16:07:09  <Eddi|zuHause> how does "git describe" work? i can't get useful output on openttd trunk
16:07:30  <Eddi|zuHause> > git describe
16:07:32  <Eddi|zuHause> fatal: Keine Tags k├Ânnen 'fbfa4eb5920b10f57b9fc72730206f4a05c3638d' beschreiben.
16:07:33  <Eddi|zuHause> Versuchen Sie --always oder erstellen Sie einige Tags.
16:07:58  <Alberth> you didn't check out a branch?
16:08:25  <Eddi|zuHause> says i'm on branch master
16:09:43  <planetmaker> checking for a release probably can also be done by checking for "-g" in position -10:-9 in the version string. That's more reliable and present when it's not a tag as it's part of the hash
16:10:11  <planetmaker> Eddi|zuHause, git describe --tags
16:10:21  <Eddi|zuHause> planetmaker: same
16:10:32  <planetmaker> might not work w/o tags
16:10:43  <Eddi|zuHause> does openttd trunk not contain any tags
16:11:04  <planetmaker> aye
16:11:14  <planetmaker> bad :)
16:11:32  <planetmaker> thus needs different version detection
16:11:35  <Eddi|zuHause> well, probably only in some branches
16:12:01  <Alberth> it's a converted svn repo, eh :)
16:12:30  <Eddi|zuHause> well "git tag" is definitely not empty :p
16:12:31  <Alberth> git tag should tell you
16:13:06  <Alberth> no tag at or above fbfa4eb5920b10f57b9fc72730206f4a05c3638d probably
16:13:17  <planetmaker> no tag in its history
16:13:26  <planetmaker> all tags are in branches which are not ancestors
16:13:33  <planetmaker> hm
16:14:01  <planetmaker> so it's a good question... do we want such versioning in NML :)
16:15:01  <planetmaker> would mean to tag a new release for a branch. and to make a new commit on master which then is called "0.6.0-dev" or so (if you just made the 0.5.0 tag on master which then branches off)
16:15:12  <Eddi|zuHause> seems prone to break once you have diverging and re-merging through pull requests and stuff
16:16:38  *** Supercheese has joined #openttd
16:39:20  <planetmaker> that needs research :)
16:44:46  <Eddi|zuHause> planetmaker: think your version patch could benefit from setting "LC_ALL=C"?
16:55:15  *** Thedarkb-T60 has joined #openttd
16:58:17  <planetmaker> Eddi|zuHause, that as well, yes!
17:00:34  <planetmaker> thank you you two for your valuable inputs. I'll need to rewrite and re-think some parts... and learn more git :)
17:11:17  *** Wacko1976 has joined #openttd
17:12:32  *** Thedarkb-T60 has quit IRC
17:13:50  *** Pikka has quit IRC
17:14:19  *** Progman has joined #openttd
17:20:14  *** Wolf01 has joined #openttd
17:20:19  <Wolf01> o/
17:32:31  *** andythenorth has joined #openttd
17:33:51  *** dvim has joined #openttd
17:36:51  *** Thedarkb-T60 has joined #openttd
17:37:07  <Alberth> o/
17:40:09  <andythenorth> yo
17:40:11  <andythenorth> etc
17:55:00  <Wolf01> o/
18:00:31  *** frosch123 has joined #openttd
18:01:16  <Wolf01> Quak
18:03:23  <frosch123> moo
18:03:56  <frosch123> planetmaker: you could also copy ottd's findversion.sh
18:04:19  <frosch123> it does branches, tags, and stuff
18:05:38  *** HerzogDeXtEr1 has joined #openttd
18:11:09  <andythenorth> stuff
18:11:11  <andythenorth> things
18:11:16  <Wolf01> Tanks
18:11:29  *** HerzogDeXtEr has quit IRC
18:12:28  <planetmaker> frosch123, hm, that actually might be the simpliest idea :)
18:14:30  <andythenorth> I stopped tanks
18:14:34  <andythenorth> for a bit
18:15:16  <nielsm> speaking of findversion.sh, isn't there a make target to just produce the "static" version data file?
18:15:24  <frosch123> planetmaker: example output: 20181011-pr6939-g2e16bfddM      20181011        2       2e16bfdd936a5d6c73b8ced18c0f8d8d30751ea5
18:15:34  <andythenorth> Wolf01: I am working on this a bit https://www.flickr.com/photos/andythenorth/32176892732/in/photostream/
18:15:38  <andythenorth> it's a lot more done
18:15:43  <nielsm> I don't have any git tools available in my windows build env, but I have a wsl bash open constantly
18:15:51  <nielsm> and basically need to run findversion.sh manually
18:17:15  <frosch123> nielsm: i think that magic is baked into the compile farm
18:17:22  <frosch123> possibly the old compile farm only :p
18:17:53  <planetmaker> apropos... old CF. Old code: is there anywhere the stuff which is not OpenTTD, but the extras like master server, osie and alike?
18:18:22  <frosch123> it's still in svn
18:18:34  *** HerzogDeXtEr1 has quit IRC
18:18:34  <planetmaker> which is... not exactly accessible :)
18:18:36  <frosch123> and on some trello :)
18:18:54  <frosch123> planetmaker: svn://svn-archive.openttd.org/extra
18:18:55  <frosch123> or similar
18:19:08  <planetmaker> oho. I didn't know that URL
18:19:38  <andythenorth> there is also the list https://github.com/OpenTTD
18:20:07  <andythenorth> and I linked the trello list https://github.com/OpenTTD/OpenTTD/issues/6916
18:21:54  <andythenorth> Wolf01: more done https://www.flickr.com/photos/andythenorth/31469465448/in/dateposted-public/
18:24:02  <Wolf01> Nice, it's big
18:28:30  <andythenorth> can anyone repro that this errors? http://bananas.openttd.org/en/manager/update/5446
18:28:34  <andythenorth> I'm logged in on the coop account
18:37:08  *** Thedarkb-T60 has quit IRC
18:37:26  *** Thedarkb-T60 has joined #openttd
18:40:35  *** gelignite has joined #openttd
18:53:19  *** glx has joined #openttd
18:53:19  *** ChanServ sets mode: +v glx
18:58:53  <planetmaker> hmpf... :|
18:59:23  <planetmaker> $ git -C /home/planetmaker/ottd/grfdev/nml update-index --refresh -q
18:59:23  <planetmaker> nml/version_info.py: needs update
18:59:23  <planetmaker> (py36) planetmaker@aeolusmaximus-vortex:~$ echo $?
18:59:23  <planetmaker> 1
19:00:22  <planetmaker> so why is that command there in findversion.sh, when it actually may fail and not do a thing (in OpenTTD it misses the -q flag which lets it continue anyway)
19:00:37  <planetmaker> but even then... it returns a non-0 exit status
19:14:41  *** Wolf01 is now known as Guest593
19:14:42  *** Wolf01 has joined #openttd
19:20:13  *** Guest593 has quit IRC
19:25:16  *** Alberth has left #openttd
19:38:54  *** Stimrol has quit IRC
19:41:03  *** Stimrol has joined #openttd
19:55:33  *** dvim has quit IRC
20:13:51  *** gelignite has quit IRC
20:14:24  *** sla_ro|master has quit IRC
20:15:32  <planetmaker> https://devs.openttd.org/~planetmaker/patches/index.php?source=nml_git_version.diff should be a version which now does the same thing as OpenTTD's findversion.sh
20:16:06  *** iSoSyS has joined #openttd
20:19:19  <frosch123> get_child_output("git -C {} update-index --refresh".format(path).split(), env=env) <- ["git", "-C", path, "update-index", "--refresh"] is easier imo
20:19:25  <frosch123> it also works with spaces in paths
20:22:44  <frosch123> i think instead of the try-except you can also pass "check=False" to subprocess.
20:22:46  <frosch123> but not sure
20:24:50  <frosch123> hmm, i did not finish the nml docker thing, i guess
20:27:35  <planetmaker> hm, right, spaces in paths :|
20:27:55  <planetmaker> I didn't like to write every word quoted :D
20:32:20  <planetmaker> try...except is ok for python, I think
20:40:01  <planetmaker> subprocess.run() has the check=... argument. But that's python 3.5+. In my understanding subprocess.check_output is python 3.1+
20:40:10  <planetmaker> But that lacks the check argument
20:41:44  <frosch123> oh, new stuff, never mnid then :)
20:42:47  <planetmaker> actually, my use of the subprocess.DEVNULL constant raises the minimum requirement to 3.3 (instead of 3.2 which is is currently, IIRC)
20:43:03  <planetmaker> I might want to circumvent using that constant, too
20:51:54  <planetmaker> gotta play with pull requests, thus created one: https://github.com/OpenTTD/nml/pull/1/commits/998d9690a4739f98bcb009cf7d84c6c6fd57fdfb
20:57:48  <frosch123> planetmaker: you did the default mistake :)
20:58:16  <frosch123> never create a pr from your "master"
20:58:32  *** dvim has joined #openttd
20:58:41  <frosch123> after merge openttd's master will differ from your master, so you have to do some git magic to repoint your master to the real one
20:59:03  <frosch123> with github: do everything in a custom branch, never commit to master
20:59:04  <planetmaker> ah, bah
20:59:37  <planetmaker> time to find out how to rectify this default mistake :)
21:00:13  <frosch123> i guess it's easier after merge
21:00:32  <frosch123> otherwise you have a pr to a no longer existing branch, which makes more trouble :p
21:01:04  <planetmaker> I'd create a new PR for that sake
21:03:57  *** nielsm has quit IRC
21:04:34  <andythenorth> branches for all :)
21:04:37  <andythenorth> no charge
21:04:48  <frosch123> did your fix your hg checkout? :p
21:06:13  *** blathijs has quit IRC
21:06:20  <planetmaker> my hg checkout?
21:06:56  <frosch123> nah, i was just mocking andy
21:10:57  <andythenorth> I deleted it and cloned again
21:11:01  <andythenorth> never use hg branches
21:11:04  <andythenorth> never use hg up
21:12:16  <planetmaker> nothing wrong with either. But don't use *named* hg branches liberally
21:13:03  <andythenorth> just for info (I did check the docs)
21:13:17  <andythenorth> the correct way to checkout a tag is 'hg up [tag name]'?
21:14:19  <planetmaker> yes
21:14:40  <planetmaker> but it doesn't mean you end-up with an unmodified version, if you had a modified one
21:14:50  <planetmaker> add a hg revert --all before or after you do it
21:15:38  <planetmaker> (updating doesn't undo any changes you made to the previous version - it simply merges them to the new one)
21:15:40  <andythenorth> in my experience, if there are uncommitted local changes, hg up [tag] fails with an unrecoverable merge
21:15:40  <andythenorth> which I did fix the first time by editing things in .hg
21:15:40  <andythenorth> but now I just delete the repo
21:15:55  *** matt21347 has quit IRC
21:16:15  *** Wormnest has joined #openttd
21:16:49  <andythenorth> yeah, that's what catches me out
21:16:49  <andythenorth> I expect to move to a place on the tree, not merge
21:17:09  <andythenorth> one day, git for newgrfs :P
21:18:04  <andythenorth> but no editing history, no interactive rebase, and no force push :P
21:18:28  * andythenorth has simple needs ?P
21:21:16  <andythenorth> also bed
21:21:28  *** andythenorth has left #openttd
21:21:56  <planetmaker> never ever edit "things" in .hg...
21:22:21  *** Progman has quit IRC
21:31:37  *** blathijs has joined #openttd
21:39:15  *** frosch123 has quit IRC
22:03:50  *** Wolf01 has quit IRC
22:13:34  *** Thedarkb-T60 has quit IRC
22:14:32  *** GroovyNoodle has quit IRC
22:16:57  *** Lejving has quit IRC
22:35:17  <Eddi|zuHause> <andythenorth> in my experience, if there are uncommitted local changes, hg up [tag] fails with an unrecoverable merge <-- i would have assumed one could simply abort a merge... but why would it start a merge in the first place? merge with what?
22:35:55  <planetmaker> merge might be an unconvenient term here. hg simply keeps changes in the working dir, no matter what revision you changeout
22:36:24  <Eddi|zuHause> so a revert --all would have done that...
22:36:27  <planetmaker> yet with active changes, when updating, the algorithm employed is that of a merge. Yet... there is no merge performed in any terms of VCS
22:36:30  <planetmaker> Exactly!
22:36:39  <planetmaker> a hg revert --all will always rescue you
22:36:46  <Eddi|zuHause> i just don't understand andy, then...
22:36:52  <planetmaker> if necessary update after that anew. And done
22:37:20  <Eddi|zuHause> i have successfully employed hg branches an never had any problems...
22:37:27  *** Thedarkb-T60 has joined #openttd
22:37:49  *** Wacko1976 has quit IRC
22:38:06  <planetmaker> I've done A LOT of things in hg repos... and never had to throw away my repo just for the sake of updating accross branches or alike
22:46:16  *** Wormnest has quit IRC
22:52:39  *** iSoSyS has quit IRC
23:11:48  *** Oroburos has quit IRC
23:14:00  *** peter1138 has quit IRC
23:14:07  *** peter1138 has joined #openttd
23:14:07  *** ChanServ sets mode: +o peter1138
23:24:50  *** Flygon has joined #openttd
23:45:17  *** Lejving has joined #openttd
23:51:34  *** sim-al2 has quit IRC
23:54:04  *** Samu has quit IRC

Powered by YARRSTE version: svn-trunk