1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# 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: