Can't make keywords work

Neil Martinsen-Burrell nmb at wartburg.edu
Sat Mar 21 18:12:00 GMT 2009


On 2009-03-20, at 17:40 , John Arbash Meinel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Neil Martinsen-Burrell wrote:
>> I wanted to try out the content filtering stuff using the keywords  
>> plugin,
>> but I don't seem to be able to make it work using the instructions  
>> in the
>> current documentation.  Here's what I tried:
>>
>> nmb at guttle[~]$ cd /tmp
>> nmb at guttle[/tmp]$ rm -r test
>> nmb at guttle[/tmp]$ bzr version |grep revision
>>    revision: 4175
>> nmb at guttle[/tmp]$ bzr plugins |grep -i keywords
>> keywords
>>    Keywords
>> # got the necessary equipment
>> nmb at guttle[/tmp]$ bzr init --development-wt5 test
>> Created a standalone tree (format: development-wt5)
>> nmb at guttle[/tmp]$ cd test
>> # turn on keywords
>> nmb at guttle[/tmp/test]$ echo '[name *.txt]
>> keywords=on' >.bzrrules
>> nmb at guttle[/tmp/test]$ rm ~/.bazaar/rules
>> nmb at guttle[/tmp/test]$ echo '$Date$ $Author$' > test.txt
>> nmb at guttle[/tmp/test]$ bzr add test.txt .bzrrules
>> bzr: ERROR: Specified file "test.txt" is outside the current view:
>> # what the heck, I didn't say anything about views!
>> nmb at guttle[/tmp/test]$ bzr view --switch off
>> bzr: ERROR: No current view to disable
>> # yeah, tell me about it
>> nmb at guttle[/tmp/test]$ bzr view --name arrgh .bzrrules test.txt
>> Using 'arrgh' view: .bzrrules, test.txt
>> # this doesn't seem right
>
> ^- This is a known bug with filtered views and 'add', which Ian just
> submitted a patch for.
>
> http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C49C2A9B4.5090806%40internode.on.net%3E
>
> The actual fix is pretty small.

Ah, yes.  I remembered the thread after I had posted this.

>> nmb at guttle[/tmp/test]$ bzr add test.txt .bzrrules
>> adding test.txt
>> adding .bzrrules
>> nmb at guttle[/tmp/test]$ bzr ci -m 'initial commit'
>> ignoring files outside view: .bzrrules, test.txt
>> Committing to: /private/tmp/test/
>> added .bzrrules
>> added test.txt
>> Committed revision 1.
>> # Lets see those keywords
>
> ^- something weird here, given that .bzrrules is in the view, but then
> it claims it isn't... Probably worth reporting on its own right.


Done. #346195.  I will file the lack of keyword expansion as a bug  
against bzr-keywords on Launchpad.

-Neil

-- 
"Your work is to discover your work and then with all your heart to  
give yourself to it."
   -- Buddha







More information about the bazaar mailing list