Nathan Durnan avatar Nathan Durnan committed 6af9f3f

Update timestamps after resolve when --all option is used as well.
See Issue #27 at BitBucket

Comments (0)

Files changed (2)

 .hgtags,1323983941.97
 README.rst,1328133746.06
 TimeStampMod.png,1305052883.0
-TimestampMod.py,1328132974.11
+TimestampMod.py,1328134752.84
 TimeStampMod.xmind,1306451621.66
 def Hook_Post_Resolve(repo, **kwargs):
 	repo.ui.note("TimestampMod|Post-Resolve Hook accessed!\n")
 	#repo.ui.debug("Post-Resolve:kwargs = \n", str(kwargs), '\n')
-	if (File_TimestampRecords in str(kwargs['pats'])):
+	myResolveAll = False #starting value
+	if ('opts' in kwargs):
+		if ('all' in kwargs['opts']):
+			myResolveAll = kwargs['opts']['all']
+		#end of check for 'preview' option.
+	#end of check for 'opts' keyword.
+	if (myResolveAll or (File_TimestampRecords in str(kwargs['pats']))):
 		#Only re-apply timestamps if the timestamp file is the one being resolved.
 		repo.ui.status("Resolved timestamp file - Reapplying timestamps!\n")
 		timestamp_mod(repo.ui, repo, **dict({'save': None, 'restore': True}))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.