expand_keywords expands on update/commit

Bug #949494 reported by Bill Pollifrone
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Keywords Plugin
Incomplete
Undecided
Unassigned

Bug Description

bzr export and bzr export --keywords=[style] output raw and cooked values respectively. Not sure if by design, but one would expect bzr update or bzr checkout to give the uncooked values. I've tracked this down to the fact that expand_keywords is called for those actions without any keywords switch.

I've modified my local copy of the code to have a global flag set when the keywords kwarg is specified in export/cat actions and use that to skip expanding of keywords as a quick and dirty fix. I'm not sure if this is all by design or an oversight or if there's a better way to handle than with a global.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 949494] [NEW] expand_keywords expands on update/commit

On Wed, Mar 07, 2012 at 11:25:09PM -0000, Bill Pollifrone wrote:
> bzr export and bzr export --keywords=[style] output raw and cooked
> values respectively. Not sure if by design, but one would expect bzr
> update or bzr checkout to give the uncooked values. I've tracked this
> down to the fact that expand_keywords is called for those actions
> without any keywords switch.
>
> I've modified my local copy of the code to have a global flag set when
> the keywords kwarg is specified in export/cat actions and use that to
> skip expanding of keywords as a quick and dirty fix. I'm not sure if
> this is all by design or an oversight or if there's a better way to
> handle than with a global.
I'm not entirely sure I follow what you mean.

Do you mean that you want "bzr co" and "bzr up" to not create files
with keywords expanded?

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
Changed in bzr-keywords:
status: New → Incomplete
Revision history for this message
Martin Pool (mbp) wrote :

On 9 March 2012 00:27, Jelmer Vernooij <email address hidden> wrote:
>
> Do you mean that you want "bzr co" and "bzr up" to not create files
> with keywords expanded?

That is what he seems to mean.

The intention is that they should be expanded in a checkout. But,
there could very usefully be a per-tree option to turn it off.

--
Martin

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

It's indeed a bit odd that "bzr export" doesn't replace the keywords. I think it would be more consistent (and generally useful) to always replace keywords, unless explicitly disabled.

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.