Opened 13 years ago

Closed 13 years ago

#264 closed task (fixed)

Is the copyright engine adding extra new lines to the end of a file if there is none?

Reported by: Jari Häkkinen Owned by: Peter Johansson
Priority: major Milestone: 0.6.3
Component: svncopyright Version: 0.6.2
Keywords: Cc:

Description

See http://base.thep.lu.se/ticket/737 where it is reported that extra lines have been added after running the copyright part of svndigest.

Change History (7)

comment:1 Changed 13 years ago by Peter Johansson

Component: corecopyright
Version: trunk0.6.2

at source:trunk/lib/File.cc#L359 there is following code

 while(getline(is, line))
   tmp << line << "\n";

where tmp is an ostream.

So the answer is yes. If last character is not a newline, function will add a newline.

comment:2 Changed 13 years ago by Jari Häkkinen

Ok, so we need to change this. The code clearly adds a new line character, but what about users with microsoft based new lines, i.e., new line with a carriage return?

comment:3 Changed 13 years ago by Peter Johansson

We have OS dependent code elsewhere so why be MS friendly in this particular case.

comment:4 Changed 13 years ago by Peter Johansson

Owner: changed from Jari Häkkinen to Peter Johansson
Status: newassigned

comment:5 Changed 13 years ago by Peter Johansson

This ticket interfere with tickets #231 #232 and #247, which are implemented in trunk.

Either we need to merge these implementations to stable-0.6 branch or move this ticket to 0.7 (i.e. trunk).

What do you think?

comment:6 Changed 13 years ago by Peter Johansson

After some fresh air, I realize my last comment was surprisingly stupid.

I will solve this within 0.6. If there is a conflict, I'll simply solve the confict...

comment:7 Changed 13 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

in [470]

Note: See TracTickets for help on using tickets.