Can't make keywords work

John Arbash Meinel john at arbash-meinel.com
Fri Mar 20 22:40:11 GMT 2009


-----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.


> 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.


...


> That's about all the fighting I'm willing to do to try out a new feature. 
> Problems I noticed above:
> 
> 1) Views get in the way when they have never been asked for.  That is 
> completely bogus and to get them out of the way, one has to define a view
> for every file one wants to use.

Fix Committed, just not merged yet. Basically, this failure generated a
lot of discussion about how view should actually be implemented, which
delayed the landing of an actual patch.

> 
> 2) Keyword expansion apparently never happens.  There are no errors in
> ~/.bzr.log related to keywords::

This.... I don't know anything about yet.

> 3) ``bzr help keywords`` says I can set rules in .bzrrules.  
> ``bzr help rules`` says I have to set them in ~/.bazaar/rules.  
> Who's right?  Neither apparently.
> 
> Hopefully the experience with this can be easily improved.
> 
> -Neil
> (an EARLY adopter)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknEG0sACgkQJdeBCYSNAAMctgCgwB8Oq7Ek6HXJMF5jlFFowT8/
TcMAn0AXKlPYaLze784VUabrxA40hsvr
=tiJC
-----END PGP SIGNATURE-----



More information about the bazaar mailing list