[Uludag-commits] r12287 - trunk/pisi/pisi
svn-uludag at uludag.org.tr
svn-uludag at uludag.org.tr
7 Şub 2007 Çar 14:54:46 EET
Author: faik
Date: Wed Feb 7 14:54:46 2007
New Revision: 12287
Modified:
trunk/pisi/pisi/delta.py
Log:
files:
old = ["a", "b", "c"]
new = ["d", "e", "c"]
If all these files have same hash, we can use old[0] for all the
copy to new location operations.
So we have
a -> d
a -> e
a -> c
for relocations.
But one problem is, old already has "c".
So an "a -> c" sym link copy ends with "File exists" error.
Modified: trunk/pisi/pisi/delta.py
=================================================================
--- trunk/pisi/pisi/delta.py (original)
+++ trunk/pisi/pisi/delta.py Wed Feb 7 14:54:46 2007
@@ -118,6 +118,7 @@
relocations = []
for hash in files_new.keys():
if hash in files_old:
+ files_new[hash] = filter(lambda x:x not in files_old[hash], files_new[hash])
for i in range(len(files_new[hash])):
if files_old[hash][0].path != files_new[hash][i].path:
relocations.append((files_old[hash][0], files_new[hash][i]))
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi