2508N/A# This program is free software; you can redistribute it and/or modify 2508N/A# it under the terms of the GNU General Public License version 2 2508N/A# as published by the Free Software Foundation. 2508N/A# This program is distributed in the hope that it will be useful, 2508N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 2508N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2508N/A# GNU General Public License for more details. 2508N/A# You should have received a copy of the GNU General Public License 2508N/A# along with this program; if not, write to the Free Software 2508N/A# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 3177N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2508N/A# Create a dictionary (timestamps) mapping paths of python files in the modules 2508N/A# directory to their timestamps. If a file is modified, its timestamp is the 2508N/A# filesystem timestamp. If it's unchanged, its timestamp is the timestamp of 2508N/A# the last changeset which modified it. 2508N/A# Get the set of matching files in the working directory parent. 2508N/A# Find out which files have changed. 2508N/A# Handle the modified files first: get their timestamps from the filesystem. 2508N/A# Remove the filenames from "manifest" so that we don't look for their changeset 2508N/A# timestamps in the next loop. 2508N/A# Now walk backwards through the changesets from the working directory parent 2508N/A# (making sure we don't look at changesets that aren't ancestors), and for each 2508N/A# file that still needs a timestamp, grab it from the changeset and make sure we 2508N/A# Get the timestamp of the workspace. If it's unmodified, then use the 2508N/A# timestamp of the parent of the working directory, and the latest timestamp of 2508N/A# the modified and added files if not. (We would do removed, but we don't know