End configuration files with newline

Bug #137335 reported by Gioele Barabucci
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Unassigned

Bug Description

Could bzr add \n to the end of configuration files?

Right now (bzr 0.90.0), files saved under ~/.bazaar do not end with a newline.

Example:
  gioele@prova:~$ cat ~/.bazaar/locations.conf
  [/home/gioele/Temp/work/project.orig]
  push_location = file:///home/gioele/Temp/repo/project.orig/
  push_location:policy = norecurse
  [/home/gioele/Temp/work/project.new]
  push_location = file:///home/gioele/Temp/repo/project.new/
  push_location:policy = norecursegioele@prova:~$

Revision history for this message
Vincent Ladeuil (vila) wrote :
Changed in bzr:
status: New → Invalid
Revision history for this message
Gioele Barabucci (gioele) wrote :

Vila, Could you please file this bug under configobj then?

I think this is yet an open issue for bazaar, regardless of the package that causes it.

Revision history for this message
Vincent Ladeuil (vila) wrote :

You didn't say why you consider it an issue.

As far as I can see, bzr is perfectly happy with or without the trailing newline which is why I marked this bug invalid.

Note that you can perfectly add such newline yourself without any risk and that it will be kept if bzr update the file.

Revision history for this message
Gioele Barabucci (gioele) wrote :

It is just incorrect to me, akin to a spelling mistake.

Anyway, it looks like the same bug was reported to configobj and has been fixed in configobj 4.5.1 (intrepid):

http://mail.python.org/pipermail/python-announce-list/2008-February/006409.html
> Changes in ConfigObj 4.5.1
> ====================
>
> ConfigObj will now guarantee that files will be written terminated
> with a newline.

Revision history for this message
Vincent Ladeuil (vila) wrote :

bzr-1.3 upgraded the embedded ConfigObj to 4.5.2.

Changed in bzr:
milestone: none → 1.3
status: Invalid → Fix Released
John A Meinel (jameinel)
Changed in bzr:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.