Show More
@@ -174,6 +174,7 b' class abstractvfs(object):' | |||||
174 | only if destination file is guarded by any lock |
|
174 | only if destination file is guarded by any lock | |
175 | (e.g. repo.lock or repo.wlock). |
|
175 | (e.g. repo.lock or repo.wlock). | |
176 | """ |
|
176 | """ | |
|
177 | srcpath = self.join(src) | |||
177 | dstpath = self.join(dst) |
|
178 | dstpath = self.join(dst) | |
178 | oldstat = checkambig and util.filestat(dstpath) |
|
179 | oldstat = checkambig and util.filestat(dstpath) | |
179 | if oldstat and oldstat.stat: |
|
180 | if oldstat and oldstat.stat: | |
@@ -184,9 +185,13 b' class abstractvfs(object):' | |||||
184 | # stat of renamed file is ambiguous to original one |
|
185 | # stat of renamed file is ambiguous to original one | |
185 | return ret, newstat.avoidambig(dpath, oldstat) |
|
186 | return ret, newstat.avoidambig(dpath, oldstat) | |
186 | return ret, True |
|
187 | return ret, True | |
187 |
ret, avoided = dorename(s |
|
188 | ret, avoided = dorename(srcpath, dstpath) | |
|
189 | if not avoided: | |||
|
190 | # simply copy to change owner of srcpath (see issue5418) | |||
|
191 | util.copyfile(dstpath, srcpath) | |||
|
192 | ret, avoided = dorename(srcpath, dstpath) | |||
188 | return ret |
|
193 | return ret | |
189 |
return util.rename(s |
|
194 | return util.rename(srcpath, dstpath) | |
190 |
|
195 | |||
191 | def readlink(self, path): |
|
196 | def readlink(self, path): | |
192 | return os.readlink(self.join(path)) |
|
197 | return os.readlink(self.join(path)) |
General Comments 0
You need to be logged in to leave comments.
Login now