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
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
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
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
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
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
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.
__
@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
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
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
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 -
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
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
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
14 matches
Mail list logo