Skip to content

Commit 39e1157

Browse files
Barış MetinBarış Metin
Barış Metin
authored and
Barış Metin
committed
add module-version
1 parent f361ace commit 39e1157

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

module-tools.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ def check_tag(self, tagname, need_it=False, old_svn_tag_name=None):
843843
return found_tagname
844844

845845

846+
##############################
846847
def do_tag (self):
847848
self.init_module_dir()
848849
self.revert_module_dir()
@@ -977,7 +978,29 @@ def commit_all_changes(log):
977978
os.unlink(changelog_svn)
978979

979980

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+
##############################
9811004
# store and restitute html fragments
9821005
@staticmethod
9831006
def html_href (url,text): return '<a href="%s">%s</a>'%(url,text)
@@ -1146,6 +1169,10 @@ def run(self):
11461169
if mode == "tag" or mode == "sync" :
11471170
parser.add_option("-e","--editor", action="store", dest="editor", default=default_editor(),
11481171
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")
11491176

11501177
default_modules_list=os.path.dirname(sys.argv[0])+"/modules.list"
11511178
parser.add_option("-n","--dry-run",action="store_true",dest="dry_run",default=False,

module-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module-tools.py

0 commit comments

Comments
 (0)