1. Nathan Durnan
  2. TimeStampMod


Nathan Durnan  committed d14dc04

Rename Hook functions for future flexibility.

  • Participants
  • Parent commits 34bc9c2
  • Branches development

Comments (0)

Files changed (1)

File TimestampMod.py

View file
  • Ignore whitespace
 #	This is the FIRST callback that is executed when intializing this extension.
 def uisetup(ui):
+	'''Initialize UI-Level Callback'''
 	ui.debug('* Loading TimestampMod uisetup\n')
-	ui.setconfig("hooks", "pre-commit.TimestampMod", Pre_Commit_Hook)
-	ui.setconfig("hooks", "post-status.TimestampMod", Post_Status_Hook)
+	ui.setconfig("hooks", "pre-commit.TimestampMod", Hook_Pre_Commit)
+	ui.setconfig("hooks", "post-status.TimestampMod", Hook_Post_Status)
 #_ end of uisetup _____________________________________________________________
 #	It can be used to access other extensions that this one may depend on.
 def extsetup(ui):
+	'''Initialize Extension-Level Callback'''
 	ui.debug('* Loading TimestampMod extsetup\n')
 #_ end of extsetup ____________________________________________________________
 #	It can be used to setup any local state the extension might need.
 def reposetup(ui, repo):
+	'''Initialize Repository-Level Callback'''
 	ui.debug('* Loading TimestampMod reposetup\n')
-	ui.setconfig("hooks", "update.TimestampMod", Update_Hook)
+	ui.setconfig("hooks", "update.TimestampMod", Hook_Update)
 #_ end of reposetup ___________________________________________________________
-def Pre_Commit_Hook(repo, **kwargs):
+def Hook_Pre_Commit(repo, **kwargs):
 	'''Keyword Arguments as follows:
 			'pats': [],
 	timestamp_mod(repo.ui, repo, **dict({'save': True, 'restore': None}))
-def Post_Status_Hook(repo, **kwargs):
+def Hook_Post_Status(repo, **kwargs):
 	'''Keyword Arguments as follows:
 			'pats': [], 
 	timestamp_mod(repo.ui, repo, **dict({'save': None, 'restore': None}))
-def Update_Hook(repo, **kwargs):
+def Hook_Update(repo, **kwargs):
 	'''Keyword Arguments as follows:
 			'error': 0,