0

I want to use the automatic_tag_name hook to automatic create tag name without the need of manually typing

I tried to write it like it : automatic_tag_name(branch name,10)= "GIL"

  1. Is it the correct syntax? (i found iittle information on it in the documents)
  2. Is it possible to create tag name from a file? this file will contains only the tag name
Gil.I
  • 895
  • 12
  • 23

1 Answers1

1

See this example pahe here: http://doc.bazaar.canonical.com/latest/en/user-guide/hooks.html

SO correct call should be:

def post_push_autotag(push_result):
    automatic_tag_name(push_result.new_revno)

branch.Branch.hooks.install_named_hook('post_push_autotag', post_push_autotag, 'My autotag')
TridenT
  • 4,879
  • 1
  • 32
  • 56
  • thanks @TridenT. i wasnt aware that i must write plugin to use the auto_tag hook. for my question #2 , i can solve it in the pluging also? – Gil.I Oct 11 '11 at 21:57
  • Yes, you can read the file, get the tag name and use it in the automatic_tag_name() function. – TridenT Oct 13 '11 at 05:37