# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Create a dictionary (timestamps) mapping paths of python files in the modules
# directory to their timestamps. If a file is modified, its timestamp is the
# filesystem timestamp. If it's unchanged, its timestamp is the timestamp of
# the last changeset which modified it.
import time
# Dummy prep function.
# Get the set of matching files in the working directory parent.
manifest = set(
f
)
# Find out which files have changed.
timestamps = {}
# Handle the modified files first: get their timestamps from the filesystem.
# Remove the filenames from "manifest" so that we don't look for their changeset
# timestamps in the next loop.
timestamps[f] = \
# Now walk backwards through the changesets from the working directory parent
# (making sure we don't look at changesets that aren't ancestors), and for each
# file that still needs a timestamp, grab it from the changeset and make sure we
# don't look at it again.
revs = ['reverse(ancestors(.))']
# Get the timestamp of the workspace. If it's unmodified, then use the
# timestamp of the parent of the working directory, and the latest timestamp of
# the modified and added files if not. (We would do removed, but we don't know
# when they were removed.)
s = repo.status()
)), ".")
else: