peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 147 forks source link

Line endings are not preserved additional empty lines are added #82

Open pombreda opened 9 years ago

pombreda commented 9 years ago

When updating a version, the line endings are not preserved and transformed to the current os line endings. This is rather problematic as when on Linux or Mac I do not want to convert certain Windows scripts line endings to LF, and reciprocally when I am on Windows.

In addition, on windows, extra lines are added to the updated files, including throwing in extra CR which makes the files rather damaged and unusable after a bump.

So IMHO:

  1. Line ending should be preserved to what they are and never converted to something else.
  2. new lines should not be added

Some candidate culprit code bits include any place where splitlines, or r/l/strip is used

pombreda commented 9 years ago

Note: the problem does not seem to show up anymore when using the head of master

peritus commented 9 years ago

Yes, that should be fixed already. Sorry for delaying the release. Could you upgrade to 0.5.3 and see if the bug still shows ?

We could still use a bit of help with the last test passing on windows (or better: understanding why it fails), see https://ci.appveyor.com/project/peritus/bumpversion

Also see #65 and #72.

pombreda commented 9 years ago

@peritus Since I run both mac, linux and windows, I can definitely get a look at this and report. Give me a few days.

pombreda commented 9 years ago

I shall say that these cross-os thingies can be devilish for sure

pombreda commented 9 years ago

@peritus could you run your pytests in -vv mode to get a tad more verbosity on failures?

peritus commented 9 years ago

@pombreda that is possible. Do you mean my workstation, appveyor or travis ?

pombreda commented 9 years ago

@peritus all of these :) ... this does not impact non-failing tests, but provides more details for failures

peritus commented 9 years ago

@pombreda just checked, you should be able to do that in your fork (appveyor and travis build pull requests), should give you more flexibility.

inirudebwoy commented 9 years ago

If you want more details when running py.test with tox.:

tox -- -vv

There is no need to modify any files. Tox docs on this subject.