Show More
@@ -36,13 +36,14 b' def upgrade_dir(srcdir, tgtdir):' | |||
|
36 | 36 | |
|
37 | 37 | def pr(s): |
|
38 | 38 | print s |
|
39 | ||
|
39 | junk = ['.svn','ipythonrc*','*.pyc', '*~', '.hg'] | |
|
40 | ||
|
40 | 41 | def ignorable(p): |
|
41 | if p.lower().startswith('.svn') or p.startswith('ipythonrc'): | |
|
42 | return True | |
|
42 | for pat in junk: | |
|
43 | if p.startswith(pat) or p.fnmatch(pat): | |
|
44 | return True | |
|
43 | 45 | return False |
|
44 | 46 | |
|
45 | ||
|
46 | 47 | modded = [] |
|
47 | 48 | files = [path(srcdir).relpathto(p) for p in path(srcdir).walkfiles()] |
|
48 | 49 | #print files |
@@ -67,7 +68,7 b' def upgrade_dir(srcdir, tgtdir):' | |||
|
67 | 68 | sum = rpt.get(str(tgt), None) |
|
68 | 69 | #print sum |
|
69 | 70 | if sum and md5.new(cont).hexdigest() == sum: |
|
70 |
pr(" |
|
|
71 | pr("%s: Unedited, installing new version" % tgt) | |
|
71 | 72 | tgt.write_text(src.text()) |
|
72 | 73 | rpt[str(tgt)] = md5.new(tgt.text()).hexdigest() |
|
73 | 74 | else: |
@@ -76,7 +77,7 b' def upgrade_dir(srcdir, tgtdir):' | |||
|
76 | 77 | real = showdiff(tgt,src) |
|
77 | 78 | pr('') # empty line |
|
78 | 79 | if not real: |
|
79 |
pr("(Ok, it was |
|
|
80 | pr("(Ok, it was identical, only upgrading checksum)") | |
|
80 | 81 | rpt[str(tgt)] = md5.new(tgt.text()).hexdigest() |
|
81 | 82 | else: |
|
82 | 83 | modded.append(tgt) |
General Comments 0
You need to be logged in to leave comments.
Login now