comparison hgext/convert/monotone.py @ 8051:718c8f01feb2

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Sat, 11 Apr 2009 23:21:39 +0200
parents 683d8ebcf434 087cc65bebff
children fe2a87a3d344
comparison
equal deleted inserted replaced
8048:d22432bdcba1 8051:718c8f01feb2
109 return certs 109 return certs
110 110
111 def mtnrenamefiles(self, files, fromdir, todir): 111 def mtnrenamefiles(self, files, fromdir, todir):
112 renamed = {} 112 renamed = {}
113 for tofile in files: 113 for tofile in files:
114 if tofile.startswith(todir): 114 if tofile.startswith(todir + '/'):
115 renamed[tofile] = fromdir + tofile[len(todir):] 115 renamed[tofile] = fromdir + tofile[len(todir):]
116 return renamed 116 return renamed
117
118 117
119 # implement the converter_source interface: 118 # implement the converter_source interface:
120 119
121 def getheads(self): 120 def getheads(self):
122 if not self.rev: 121 if not self.rev:
156 for tofile, fromfile in renamed.items(): 155 for tofile, fromfile in renamed.items():
157 self.ui.debug (_("copying file in renamed directory " 156 self.ui.debug (_("copying file in renamed directory "
158 "from '%s' to '%s'") 157 "from '%s' to '%s'")
159 % (fromfile, tofile), '\n') 158 % (fromfile, tofile), '\n')
160 files[tofile] = rev 159 files[tofile] = rev
160 copies[tofile] = fromfile
161 for fromfile in renamed.values(): 161 for fromfile in renamed.values():
162 files[fromfile] = rev 162 files[fromfile] = rev
163 return (files.items(), copies) 163 return (files.items(), copies)
164 164
165 def getmode(self, name, rev): 165 def getmode(self, name, rev):