[Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/update_copyright_script into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 -- Your team Widelands Developers is

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread GunChleoc
Thanks, I way trying to add the with and close at the wrong place. Good point about the line endings too :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widel

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread kaputtnik
Crosspost :-D -- https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/update_copyright_script. ___ Mailing list: https://launchpad.n

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread kaputtnik
Added some diff comments to use the 'with' statement as example. There is also a bash script 'find_not_updated_copyright_year_in_modified_src_files'. Is this needed anymore then? Diff comments: > > === added file 'utils/__init__.py' > === added file 'utils/file_utils.py' > --- utils/file_util

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread Tino
Another small change: Force Unix-style line endings on writing. When run on windows it does not create huge changes this way. -- https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/wide

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread Tino
Review: Approve I've pushed a small change to use "with" for opening files, so python should take care of closing them. Tested with Python 2.7 and 3.5 on my system with the update_copyright.py script. -- https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 Yo

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-25 Thread GunChleoc
Adding an __init__.py file fixed the ugly import code :) -- https://code.launchpad.net/~widelands-dev/widelands/update_copyright_script/+merge/315352 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/update_copyright_script. __

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-24 Thread GunChleoc
@kaputtnik: I found no way of explicitly closing the files that works while keeping the wrapper functions. All I get is errors, even .close() won't work. I also find the code to include the file utils script ridiculously ugly, do you know a more elegant way of doing that? @Haso50: fix_formattin

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-24 Thread Klaus Halfmann
Review: Approve test, use Testing is all fine update_copyright_script$ ./utils/update_copyright.py Usage: update_copyright.py brombeere:update_copyright_script $ ./utils/update_copyright.py 2017 Updating copyright year to: 2017 ... lots of dots ... done. brombeere:update_copyright_script $ bzr

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-24 Thread kaputtnik
Maybe a silly question: Looks like the files are opened but not closed? Python programmers using mostly the 'with' statement when handling files, which automatically closes files. See the last example in https://docs.python.org/2/tutorial/inputoutput.html#methods-of-file-objects -- https://co

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-24 Thread GunChleoc
Thanks for the review - added replies to your comments. Diff comments: > > === added file 'utils/file_utils.py' > --- utils/file_utils.py 1970-01-01 00:00:00 + > +++ utils/file_utils.py 2017-01-23 12:35:34 + > @@ -0,0 +1,32 @@ > +#!/usr/bin/env python > +# -*- coding: utf-8 -

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-23 Thread bunnybot
Continuous integration builds have changed state: Travis build 1858. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/194464798. Appveyor build 1695. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_update_cop

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-23 Thread Klaus Halfmann
Ahh, my favourite - but I have not time to check this tonight, argh :-) The test will actually be to run this will all variants of python I can find. Code LGTM Diff comments: > > === added file 'utils/file_utils.py' > --- utils/file_utils.py 1970-01-01 00:00:00 + > +++ utils/file_uti

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_copyright_script into lp:widelands

2017-01-23 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/update_copyright_script into lp:widelands. Commit message: Added a new Python script 'utils/update_copyright.py' for updating the copyright year in the C++ source files. Requested reviews: Widelands Developers (widelands-dev) For mo