+# Work around missing author holes in the VCS history
+AUTHOR_HACKS = {
+ ('hooke','driver','hdf5.py'):['Massimo Sandal'],
+ ('hooke','driver','mcs.py'):['Allen Chen'],
+ ('hooke','plugin','peakspot.py'):['Fabrizio Benedetti'],
+ }
+
+# Work around missing year holes in the VCS history
+YEAR_HACKS = {
+ ('hooke','driver','hdf5.py'):2009,
+ ('hooke','driver','picoforce.py'):2006,
+ ('hooke','driver','picoforcealt.py'):2006,
+ ('hooke','plugin','peakspot.py'):2007,
+ ('hooke','plugin','tutorial.py'):2007,
+ }
+
+# Helpers for VCS-specific commands
+
+def splitpath(path):
+ """Recursively split a path into elements.
+
+ Examples
+ --------
+
+ >>> splitpath(os.path.join('a', 'b', 'c'))
+ ('a', 'b', 'c')
+ >>> splitpath(os.path.join('.', 'a', 'b', 'c'))
+ ('a', 'b', 'c')
+ """
+ path = os.path.normpath(path)
+ elements = []
+ while True:
+ dirname,basename = os.path.split(path)
+ elements.insert(0,basename)
+ if dirname in ['', '.']:
+ break
+ path = dirname
+ return tuple(elements)