IRC logs for #openttd on OFTC at 2018-10-15
            
01:31:11 *** HerzogDeXtEr has quit IRC
01:38:18 *** triolus has joined #openttd
01:58:11 *** Lejving has joined #openttd
02:21:15 *** Samu has quit IRC
02:28:09 *** Thedarkb-T60 has quit IRC
02:45:45 *** Supercheese has joined #openttd
02:53:08 *** Flygon has joined #openttd
03:12:23 *** Mazur has joined #openttd
03:29:50 *** tokai|noir has joined #openttd
03:29:50 *** ChanServ sets mode: +v tokai|noir
03:36:37 *** tokai has quit IRC
03:54:17 *** glx has quit IRC
04:25:46 *** Pikka has joined #openttd
05:05:19 *** Supercheese has quit IRC
05:05:42 *** Supercheese has joined #openttd
05:09:24 *** haudrauf has quit IRC
05:10:22 *** haudrauf has joined #openttd
06:31:16 *** triolus has quit IRC
06:57:43 *** Flygon_ has joined #openttd
07:03:00 *** snail_UES_ has quit IRC
07:05:10 *** Flygon has quit IRC
08:36:14 *** Wacko1976 has quit IRC
09:00:34 *** Supercheese has quit IRC
09:29:23 *** Wacko1976 has joined #openttd
09:33:18 *** Samu has joined #openttd
10:32:16 *** matt21347 has joined #openttd
11:43:59 *** Wacko1976 has quit IRC
14:27:52 *** dvim has joined #openttd
14:54:03 *** snail_UES_ has joined #openttd
14:55:34 *** matt21347 has quit IRC
14:55:57 *** matt21347 has joined #openttd
15:04:45 *** dvim has quit IRC
15:07:29 *** dvim has joined #openttd
15:09:53 *** snail_UES_ has quit IRC
15:29:36 *** GroovyNoodle has joined #openttd
15:41:39 *** Flygon_ has quit IRC
15:41:43 <Samu> hi
15:42:25 <dihedral> hey ho
15:42:42 <Xaroth> o7
16:20:03 *** nielsm has joined #openttd
16:43:56 *** Alberth has joined #openttd
16:43:56 *** ChanServ sets mode: +o Alberth
16:44:04 <Alberth> hola
16:47:52 <planetmaker> aloha :)
16:48:12 <planetmaker> https://stackoverflow.com/questions/14989858/get-the-current-git-hash-in-a-python-script <-- anyone can answer my question? :D
16:48:27 <planetmaker> nml version detection is somewhat broken and I want it more pretty than calling git n times
16: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
16:50:12 *** TheMask96 has quit IRC
16:50:17 <planetmaker> I know there is. Not sure I want to include that there, though
16:50:47 <planetmaker> (it's described in the link I provided there)
16:52:25 <Eddi|zuHause> so then you have two ways to go, neither one of which you like?
16:52:51 <Eddi|zuHause> not sure i can help with that :p
16:53:03 *** TheMask96 has joined #openttd
16:53:19 <planetmaker> :D maybe.
16: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 ?
16:59:40 <Alberth> ie the second post in your link
17:02:00 <planetmaker> yeah, maybe that can be utilized to shorten the stuff a lot
17:02:12 <Alberth> except revision is less than useless to describe the content of the repo
17:02:33 <planetmaker> it's just a meaningless name.
17:03:07 <planetmaker> git show HEAD --pretty='%h8 "%at"' or so gives me hash and commit time
17:03:18 <Alberth> arguably, head^1 or so isn't much better
17:20:36 <planetmaker> perhaps sth like "git describe HEAD" is a good choice. In connection with the date or so
17:21:01 <planetmaker> "git describe --tags" I mean.
17:22:04 *** WWacko1976-work has quit IRC
17: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
17:25:38 <planetmaker> And the last tag itself
17:27:19 <Alberth> yep, seems useful
17: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
17:36:38 <Eddi|zuHause> (everything works locally)
17:37:14 <Eddi|zuHause> (i never tried "building" nml, i just run it)
17:37:41 <Eddi|zuHause> (and i never changed anything build-related)
17:38:13 <planetmaker> well, yes... did it have problems with eddi-nml itself? Or with using it on a project?
17:39:25 *** HerzogDeXtEr has joined #openttd
17:39:35 <Eddi|zuHause> both, i think
17:39:57 <Eddi|zuHause> but i don't know whether one depended on the other or they are unrelated problems
17:40:00 <Alberth> the former probably defeats the latter :)
17: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
17: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
17:49:37 <planetmaker> https://devs.openttd.org/~planetmaker/patches/index.php?source=git_version_detection.diff <-- @Alberth, what do you think?
17:50:19 <planetmaker> Eddi|zuHause, hm, yes, it tries to build a windoze binary... that's where the pythonw comes from
17:50:36 <planetmaker> all nicely using a python3.2 or so started in a somewhat ancient wine
17:50:50 <Eddi|zuHause> planetmaker: but there should be no difference to regular nml in that regard
17:51:17 <Alberth> shouldn't there a abspath in line 51 ?
17:52:42 <Alberth> line 62, do line counting in python
17:53:05 <planetmaker> not as far as I know. It's verbatim copy from the existing version detection in line 51...55
17: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
17:53:39 <Alberth> version.split('-')) == 1 "-" not in version right?
17:54:15 <planetmaker> right
17:54:29 <planetmaker> Eddi|zuHause, also correct. Bitrot also in the hg version it seems
17:55:55 *** sla_ro|master has joined #openttd
17:56:12 *** dvim has quit IRC
17:56:34 <Alberth> "-" is pretty fragile, probably, for branch names like "branch-2" or "new-feature"
17:57:24 <Eddi|zuHause> but that would just add more split segments?
17:57:53 *** Oroburos has joined #openttd
17:59:22 <Eddi|zuHause> so effectively that means tags containing "-" don't count as "release"?
18:00:30 <planetmaker> hm, yes
18:04:15 <Alberth> you don't assign version there?
18:04:42 <Alberth> except for ''
18:05:08 <planetmaker> line 78 and 80
18:05:35 <Eddi|zuHause> you only assign version_list before line 68
18:05:44 <Eddi|zuHause> but try to use version there
18:06:04 <Alberth> test is at 68
18:06:19 <planetmaker> oh, yes
18:06:21 <Eddi|zuHause> version_list in line 56
18:07:09 <Eddi|zuHause> how does "git describe" work? i can't get useful output on openttd trunk
18:07:30 <Eddi|zuHause> > git describe
18:07:32 <Eddi|zuHause> fatal: Keine Tags können 'fbfa4eb5920b10f57b9fc72730206f4a05c3638d' beschreiben.
18:07:33 <Eddi|zuHause> Versuchen Sie --always oder erstellen Sie einige Tags.
18:07:58 <Alberth> you didn't check out a branch?
18:08:25 <Eddi|zuHause> says i'm on branch master
18: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
18:10:11 <planetmaker> Eddi|zuHause, git describe --tags
18:10:21 <Eddi|zuHause> planetmaker: same
18:10:32 <planetmaker> might not work w/o tags
18:10:43 <Eddi|zuHause> does openttd trunk not contain any tags
18:11:04 <planetmaker> aye
18:11:14 <planetmaker> bad :)
18:11:32 <planetmaker> thus needs different version detection
18:11:35 <Eddi|zuHause> well, probably only in some branches
18:12:01 <Alberth> it's a converted svn repo, eh :)
18:12:30 <Eddi|zuHause> well "git tag" is definitely not empty :p
18:12:31 <Alberth> git tag should tell you
18:13:06 <Alberth> no tag at or above fbfa4eb5920b10f57b9fc72730206f4a05c3638d probably
18:13:17 <planetmaker> no tag in its history
18:13:26 <planetmaker> all tags are in branches which are not ancestors
18:13:33 <planetmaker> hm
18:14:01 <planetmaker> so it's a good question... do we want such versioning in NML :)
18: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)
18:15:12 <Eddi|zuHause> seems prone to break once you have diverging and re-merging through pull requests and stuff
18:16:38 *** Supercheese has joined #openttd
18:39:20 <planetmaker> that needs research :)
18:44:46 <Eddi|zuHause> planetmaker: think your version patch could benefit from setting "LC_ALL=C"?
18:55:15 *** Thedarkb-T60 has joined #openttd
18:58:17 <planetmaker> Eddi|zuHause, that as well, yes!
19: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 :)
19:11:17 *** Wacko1976 has joined #openttd
19:12:32 *** Thedarkb-T60 has quit IRC
19:13:50 *** Pikka has quit IRC
19:14:19 *** Progman has joined #openttd
19:20:14 *** Wolf01 has joined #openttd
19:20:19 <Wolf01> o/
19:32:31 *** andythenorth has joined #openttd
19:33:51 *** dvim has joined #openttd
19:36:51 *** Thedarkb-T60 has joined #openttd
19:37:07 <Alberth> o/
19:40:09 <andythenorth> yo
19:40:11 <andythenorth> etc
19:55:00 <Wolf01> o/
20:00:31 *** frosch123 has joined #openttd
20:01:16 <Wolf01> Quak
20:03:23 <frosch123> moo
20:03:56 <frosch123> planetmaker: you could also copy ottd's findversion.sh
20:04:19 <frosch123> it does branches, tags, and stuff
20:05:38 *** HerzogDeXtEr1 has joined #openttd
20:11:09 <andythenorth> stuff
20:11:11 <andythenorth> things
20:11:16 <Wolf01> Tanks
20:11:29 *** HerzogDeXtEr has quit IRC
20:12:28 <planetmaker> frosch123, hm, that actually might be the simpliest idea :)
20:14:30 <andythenorth> I stopped tanks
20:14:34 <andythenorth> for a bit
20:15:16 <nielsm> speaking of findversion.sh, isn't there a make target to just produce the "static" version data file?
20:15:24 <frosch123> planetmaker: example output: 20181011-pr6939-g2e16bfddM 20181011 2 2e16bfdd936a5d6c73b8ced18c0f8d8d30751ea5
20:15:34 <andythenorth> Wolf01: I am working on this a bit https://www.flickr.com/photos/andythenorth/32176892732/in/photostream/
20:15:38 <andythenorth> it's a lot more done
20:15:43 <nielsm> I don't have any git tools available in my windows build env, but I have a wsl bash open constantly
20:15:51 <nielsm> and basically need to run findversion.sh manually
20:17:15 <frosch123> nielsm: i think that magic is baked into the compile farm
20:17:22 <frosch123> possibly the old compile farm only :p
20: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?
20:18:22 <frosch123> it's still in svn
20:18:34 *** HerzogDeXtEr1 has quit IRC
20:18:34 <planetmaker> which is... not exactly accessible :)
20:18:36 <frosch123> and on some trello :)
20:18:53 <frosch123> planetmaker: svn://svn-archive.openttd.org/extra
20:18:55 <frosch123> or similar
20:19:08 <planetmaker> oho. I didn't know that URL
20:19:38 <andythenorth> there is also the list https://github.com/OpenTTD
20:20:07 <andythenorth> and I linked the trello list https://github.com/OpenTTD/OpenTTD/issues/6916
20:21:53 <andythenorth> Wolf01: more done https://www.flickr.com/photos/andythenorth/31469465448/in/dateposted-public/
20:24:02 <Wolf01> Nice, it's big
20:28:30 <andythenorth> can anyone repro that this errors? http://bananas.openttd.org/en/manager/update/5446
20:28:34 <andythenorth> I'm logged in on the coop account
20:37:08 *** Thedarkb-T60 has quit IRC
20:37:26 *** Thedarkb-T60 has joined #openttd
20:40:35 *** gelignite has joined #openttd
20:53:19 *** glx has joined #openttd
20:53:19 *** ChanServ sets mode: +v glx
20:58:53 <planetmaker> hmpf... :|
20:59:23 <planetmaker> $ git -C /home/planetmaker/ottd/grfdev/nml update-index --refresh -q
20:59:23 <planetmaker> nml/version_info.py: needs update
20:59:23 <planetmaker> (py36) planetmaker@aeolusmaximus-vortex:~$ echo $?
20:59:23 <planetmaker> 1
21: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)
21:00:37 <planetmaker> but even then... it returns a non-0 exit status
21:14:41 *** Wolf01 is now known as Guest593
21:14:42 *** Wolf01 has joined #openttd
21:20:13 *** Guest593 has quit IRC
21:25:16 *** Alberth has left #openttd
21:38:54 *** Stimrol has quit IRC
21:41:03 *** Stimrol has joined #openttd
21:55:33 *** dvim has quit IRC
22:13:51 *** gelignite has quit IRC
22:14:24 *** sla_ro|master has quit IRC
22: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
22:16:06 *** iSoSyS has joined #openttd
22: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
22:19:25 <frosch123> it also works with spaces in paths
22:22:44 <frosch123> i think instead of the try-except you can also pass "check=False" to subprocess.
22:22:46 <frosch123> but not sure
22:24:50 <frosch123> hmm, i did not finish the nml docker thing, i guess
22:27:35 <planetmaker> hm, right, spaces in paths :|
22:27:55 <planetmaker> I didn't like to write every word quoted :D
22:32:20 <planetmaker> try...except is ok for python, I think
22: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+
22:40:10 <planetmaker> But that lacks the check argument
22:41:44 <frosch123> oh, new stuff, never mnid then :)
22: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)
22:43:03 <planetmaker> I might want to circumvent using that constant, too
22:51:54 <planetmaker> gotta play with pull requests, thus created one: https://github.com/OpenTTD/nml/pull/1/commits/998d9690a4739f98bcb009cf7d84c6c6fd57fdfb
22:57:47 <frosch123> planetmaker: you did the default mistake :)
22:58:01 <frosch123> never create a pr from your "master"
22:58:31 *** dvim has joined #openttd
22: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
22:59:03 <frosch123> with github: do everything in a custom branch, never commit to master
22:59:03 <planetmaker> ah, bah
22:59:37 <planetmaker> time to find out how to rectify this default mistake :)
23:00:13 <frosch123> i guess it's easier after merge
23:00:31 <frosch123> otherwise you have a pr to a no longer existing branch, which makes more trouble :p
23:01:04 <planetmaker> I'd create a new PR for that sake
23:03:57 *** nielsm has quit IRC
23:04:34 <andythenorth> branches for all :)
23:04:37 <andythenorth> no charge
23:04:48 <frosch123> did your fix your hg checkout? :p
23:06:13 *** blathijs has quit IRC
23:06:20 <planetmaker> my hg checkout?
23:06:56 <frosch123> nah, i was just mocking andy
23:10:56 <andythenorth> I deleted it and cloned again
23:11:01 <andythenorth> never use hg branches
23:11:04 <andythenorth> never use hg up
23:12:16 <planetmaker> nothing wrong with either. But don't use *named* hg branches liberally
23:13:03 <andythenorth> just for info (I did check the docs)
23:13:16 <andythenorth> the correct way to checkout a tag is 'hg up [tag name]'?
23:14:18 <planetmaker> yes
23:14:39 <planetmaker> but it doesn't mean you end-up with an unmodified version, if you had a modified one
23:14:50 <planetmaker> add a hg revert --all before or after you do it
23:15:38 <planetmaker> (updating doesn't undo any changes you made to the previous version - it simply merges them to the new one)
23:15:40 <andythenorth> in my experience, if there are uncommitted local changes, hg up [tag] fails with an unrecoverable merge
23:15:40 <andythenorth> which I did fix the first time by editing things in .hg
23:15:40 <andythenorth> but now I just delete the repo
23:15:55 *** matt21347 has quit IRC
23:16:15 *** Wormnest has joined #openttd
23:16:49 <andythenorth> yeah, that's what catches me out
23:16:49 <andythenorth> I expect to move to a place on the tree, not merge
23:17:08 <andythenorth> one day, git for newgrfs :P
23:18:04 <andythenorth> but no editing history, no interactive rebase, and no force push :P
23:18:28 * andythenorth has simple needs ?P
23:21:16 <andythenorth> also bed
23:21:28 *** andythenorth has left #openttd
23:21:56 <planetmaker> never ever edit "things" in .hg...
23:22:21 *** Progman has quit IRC
23:31:36 *** blathijs has joined #openttd
23:39:15 *** frosch123 has quit IRC