expand_keywords expands on update/commit

Bug #949494 reported by Bill Pollifrone on 2012-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Keywords Plugin
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.

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) on 2012-03-08
Changed in bzr-keywords:
status: New → Incomplete
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

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  Edit
Everyone can see this information.

Other bug subscribers