@@ -843,6 +843,7 @@ def check_tag(self, tagname, need_it=False, old_svn_tag_name=None):
843
843
return found_tagname
844
844
845
845
846
+ ##############################
846
847
def do_tag (self ):
847
848
self .init_module_dir ()
848
849
self .revert_module_dir ()
@@ -977,7 +978,29 @@ def commit_all_changes(log):
977
978
os .unlink (changelog_svn )
978
979
979
980
980
- ####################
981
+ ##############################
982
+ def do_version (self ):
983
+ self .init_module_dir ()
984
+ self .revert_module_dir ()
985
+ self .update_module_dir ()
986
+ spec_dict = self .spec_dict ()
987
+ if self .options .www :
988
+ self .html_store_title ('Version for module %s (%s)' % (self .friendly_name (),
989
+ self .last_tag (spec_dict )))
990
+ for varname in self .varnames :
991
+ if not spec_dict .has_key (varname ):
992
+ self .html_print ('Could not find %%define for %s' % varname )
993
+ return
994
+ else :
995
+ self .html_print ("%-16s %s" % (varname ,spec_dict [varname ]))
996
+ if self .options .verbose :
997
+ self .html_print ("%-16s %s" % ('main specfile:' ,self .main_specname ()))
998
+ self .html_print ("%-16s %s" % ('specfiles:' ,self .all_specnames ()))
999
+ self .html_print_end ()
1000
+
1001
+
1002
+
1003
+ ##############################
981
1004
# store and restitute html fragments
982
1005
@staticmethod
983
1006
def html_href (url ,text ): return '<a href="%s">%s</a>' % (url ,text )
@@ -1146,6 +1169,10 @@ def run(self):
1146
1169
if mode == "tag" or mode == "sync" :
1147
1170
parser .add_option ("-e" ,"--editor" , action = "store" , dest = "editor" , default = default_editor (),
1148
1171
help = "specify editor" )
1172
+
1173
+ if mode in ["diff" ,"version" ] :
1174
+ parser .add_option ("-W" ,"--www" , action = "store" , dest = "www" , default = False ,
1175
+ help = "export diff in html format, e.g. -W trunk" )
1149
1176
1150
1177
default_modules_list = os .path .dirname (sys .argv [0 ])+ "/modules.list"
1151
1178
parser .add_option ("-n" ,"--dry-run" ,action = "store_true" ,dest = "dry_run" ,default = False ,
0 commit comments