##// END OF EJS Templates
context: use "vfs.lstat()" to examine target path instead of "os.path.*"...
FUJIWARA Katsunori -
r19902:12a8bdd9 default
parent child Browse files
Show More
@@ -1173,10 +1173,14 b' class workingctx(committablectx):'
1173 wlock.release()
1173 wlock.release()
1174
1174
1175 def copy(self, source, dest):
1175 def copy(self, source, dest):
1176 p = self._repo.wjoin(dest)
1176 try:
1177 if not os.path.lexists(p):
1177 st = self._repo.wvfs.lstat(dest)
1178 except OSError, err:
1179 if err.errno != errno.ENOENT:
1180 raise
1178 self._repo.ui.warn(_("%s does not exist!\n") % dest)
1181 self._repo.ui.warn(_("%s does not exist!\n") % dest)
1179 elif not (os.path.isfile(p) or os.path.islink(p)):
1182 return
1183 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)):
1180 self._repo.ui.warn(_("copy failed: %s is not a file or a "
1184 self._repo.ui.warn(_("copy failed: %s is not a file or a "
1181 "symbolic link\n") % dest)
1185 "symbolic link\n") % dest)
1182 else:
1186 else:
General Comments 0
You need to be logged in to leave comments. Login now