Nathan Durnan committed 923fe46

Clean up and get ready to implement "Save" option.

Comments (0)

Files changed (1)

 def timestamp_mod(ui, repo, **opts):
 # begin command/function help text	
-	'''Save or restore file modification times.'''
+  '''Save or restore file modification times.'''
 # end help text
 	ui.note("executing timestamp_mod function\n")
 	#Check for command optional argument
 	if opts['save']:
-		#Save
+		#Save timestamps for all files under version control (typically pre-commit)
 		ui.note('saving timestamps...\n')
 	elif opts['restore']:
-		#Restore
+		#Restore timestamps of all files under version control (typically post-update/post-restore)
 		ui.note('restoring timestamps...\n')
 		#no options, just display data in output status
 		ui.note('displaying timestamps...\n')
-        for fileName in TimeStamp_list:
+		for fileName in TimeStamp_list:
 			#retrieve recorded time and make sure it is in the right datatype
-            fileModTime=float(TimeStamp_dict[fileName])
+			fileModTime=float(TimeStamp_dict[fileName])
 			#check for valid timestamp
-            if (fileModTime>=0):
+			if (fileModTime>=0):
 				#valid timestamp detected!
 				#display timestamp using local time adjustment.
-                ui.status(time.strftime("%Y.%m.%d %H:%M:%S", time.localtime(fileModTime)), " \t", fileName, "\n")
-            else:
+				ui.status(time.strftime("%Y.%m.%d %H:%M:%S", time.localtime(fileModTime)), " \t", fileName, "\n")
+			else:
 				#no valid timestamp recorded, skip this file.
-                ui.debug(fileName, ' skipped\n')
+				ui.status(fileName, ' skipped - no timestamp recorded\n')
 			#end of check for valid timestamp
 		#end of filenames in list
 	#end of check command optional argument
 cmdtable = {
-        (timestamp_mod, 
+		(timestamp_mod, 
 			[('s', 'save', None, ('save modification times')),
-			 ('r', 'restore', None, ('restore modification times'))
+			('r', 'restore', None, ('restore modification times'))
 			('hg timestamp_mod [-s | -r]')
 		) #end of timestamp_mod