merge-upstream changes po files behind your back

Bug #1014802 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

I found this unexpected. While updating landscape-client to 12.05, with an upstream tarball, merge-upstream changed the po files by normalizing them.

Here is the diff by just replacing the po/* files with the upstream version:
http://pastebin.ubuntu.com/1018636/ (attached as "good-diff.diff")

Here is the diff produced after running bzr merge-upstream:
http://pastebin.ubuntu.com/1018638/ (attached as "merge-upstream.diff")

Maybe we need an option to not do this.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi,

The merge is done by the po_merge plugin.

http://doc.bazaar.canonical.com/beta/en/whats-new/whats-new-in-2.5.html#po-merge-plugin

bzr-builddeb might be causing this to activate when using in bzr branches, but I don't think
so. Do you have the config described in that link set on your machine?

Thanks,

James

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

No, I don't have any po_merge configuration in locations.conf or branch.conf.

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

@Andreas: The default values for the plugin may still apply to your setup.

po_merge.po_dirs = po,debian/po
po_merge.po_glob = *.po
po_merge.po_glob = *.pot
po_merge.command = 'msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"'

See 'bzr help po_merge' and set what is appropriate for your use case (including po_merge.po_dirs = do-not-even-try ;).

You can set any of these options in bazaar.conf, locations.conf or branch.conf depending on where you want to apply them.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

That's why I opened this bug. I find that behavior unexpected. I asked to merge a one-liner typo fix, and got a huge diff where I challenge the reviewer to find it.

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

I don't get it, your report ended with: "Maybe we need an option to not do this.". You *do* have options.

Additionally, as mentioned in 'bzr help po_merge', you can even redo the merge if the results don't suit your needs.

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

bug #884270 records most of the discussion leading to the plugin introduction

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Yeah, provided you know there is something calling po_merge acting behind your back. Then you can search for its documentation, and finally how to disable it.

This bug is about it being enabled by default I guess. bzr is a version control system, with some steroids. I think this behavior in particular is too much steroids. This together with bzr commit automatically using the changes in debian/changelog as the commit message (to cite another example of a writable behind-your-back action enabled by default) freak me out.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

And made me lose time, because reviewing a 200kb+ debdiff and chasing that po file change wasn't fun.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 1014802] Re: merge-upstream changes po files behind your back

On Wed, 20 Jun 2012 14:56:15 -0000, Andreas Hasenack <email address hidden> wrote:
> Yeah, provided you know there is something calling po_merge acting
> behind your back. Then you can search for its documentation, and finally
> how to disable it.
>
> This bug is about it being enabled by default I guess. bzr is a version
> control system, with some steroids. I think this behavior in particular
> is too much steroids. This together with bzr commit automatically using
> the changes in debian/changelog as the commit message (to cite another
> example of a writable behind-your-back action enabled by default) freak
> me out.

The changelog thing is now disabled by default.

The po_merge thing is in bzr core, so I'll reassign the bug there.

Thanks,

James

affects: bzr-builddeb (Ubuntu) → bzr
Revision history for this message
Martin Packman (gz) wrote :

So, there is an option to not do this, but people using merge when po files are present need to know about the po_merge plugin to perhaps disable it in some circumstances.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.