Keyword Expansion

Bug #408841 reported by Nick Trew
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Ian Clatworthy
Bazaar Keywords Plugin
Fix Committed
High
Ian Clatworthy

Bug Description

Bzr-keywords doesn't seem to expand or collapse keyword placeholders, despite having rules in ~/.bazaar/rules.

After some discussion on IRC, I can confirm that keywords are expanded when branching a repository, but I believe there are some issues with checkouts (the format not supporting keywords, or something similar).

I think ideally keywords should be expanded/updated upon commit, so they can be seen locally as well as from any branches.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

A fix for 385879 has been proposed for merging into 2.0. So that's part of the problem addressed.

The other issue is whether the core commit code or the keywords plugin should be responsible for refreshing the keywords in working tree files post commit. My initial reaction is to be make it the responsibility of this plugin via registering a post-commit hook. I'll try that now.

Changed in bzr-keywords:
assignee: nobody → Ian Clatworthy (ian-clatworthy)
Changed in bzr-keywords:
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Robert Kielty (r-kielty) wrote :

Hi,

I am trying to get $Revision-Id$ to expand to a value and it is not expanding.

bzr --version
Bazaar (bzr) 2.1.1
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.32-24-generic-pae-i686-with-Ubuntu-10.04-lucid
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/rkielty/.bazaar
  Bazaar log file: /home/rkielty/.bzr.log

~/workspace/SeveredFifth$ bzr plugins
bzrtools 2.1.0
    Various useful commands for working with bzr.

keywords
    Keyword Templating

launchpad 2.1.1
    Launchpad.net integration plugin for Bazaar.

netrc_credential_store 2.1.1
    Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.1.1
    Merge hook for bzr's NEWS file.

The file ~/bazaar/rules contains
[name AndroidMaifest.xml]
keywords = xml_escape

I do a commit and I still have $Revision-Id$ in the AndroidManifest.xml file.

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Fix Released
assignee: nobody → Ian Clatworthy (ian-clatworthy)
milestone: none → 2.0.0rc2
Revision history for this message
Richard Stanton (a-stanton) wrote :

I've just switched to using bzr, and seem to be seeing exactly the behavior listed above - if I commit a change, the keywords don't get expanded, but if I create a new branch from my repository, the keywords are expanded. I'd like them to be expanded locally - is there a simple way to achieve this?

Thanks

Revision history for this message
Quentin Anciaux (quentin-anciaux-m) wrote :

Hi, this is still not working. Upon commit, the keywords are not expanded. The only way I've found to have them expanded is to commit, rm the file and revert it, that way, the keywords are expanded.

It is not useful that way, would be better if the keywords were expanded upon commit (like it is in svn).

How can this be achieved ?

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.