Show More
@@ -417,12 +417,12 b' class fsbackend(abstractbackend):' | |||||
417 | return os.path.join(self.opener.base, f) |
|
417 | return os.path.join(self.opener.base, f) | |
418 |
|
418 | |||
419 | def getfile(self, fname): |
|
419 | def getfile(self, fname): | |
420 |
|
|
420 | if self.opener.islink(fname): | |
421 | if os.path.islink(path): |
|
421 | return (self.opener.readlink(fname), (True, False)) | |
422 | return (os.readlink(path), (True, False)) |
|
422 | ||
423 | isexec = False |
|
423 | isexec = False | |
424 | try: |
|
424 | try: | |
425 |
isexec = |
|
425 | isexec = self.opener.lstat(fname).st_mode & 0100 != 0 | |
426 | except OSError, e: |
|
426 | except OSError, e: | |
427 | if e.errno != errno.ENOENT: |
|
427 | if e.errno != errno.ENOENT: | |
428 | raise |
|
428 | raise | |
@@ -431,17 +431,17 b' class fsbackend(abstractbackend):' | |||||
431 | def setfile(self, fname, data, mode, copysource): |
|
431 | def setfile(self, fname, data, mode, copysource): | |
432 | islink, isexec = mode |
|
432 | islink, isexec = mode | |
433 | if data is None: |
|
433 | if data is None: | |
434 |
|
|
434 | self.opener.setflags(fname, islink, isexec) | |
435 | return |
|
435 | return | |
436 | if islink: |
|
436 | if islink: | |
437 | self.opener.symlink(data, fname) |
|
437 | self.opener.symlink(data, fname) | |
438 | else: |
|
438 | else: | |
439 | self.opener.write(fname, data) |
|
439 | self.opener.write(fname, data) | |
440 | if isexec: |
|
440 | if isexec: | |
441 |
|
|
441 | self.opener.setflags(fname, False, True) | |
442 |
|
442 | |||
443 | def unlink(self, fname): |
|
443 | def unlink(self, fname): | |
444 |
|
|
444 | self.opener.unlinkpath(fname, ignoremissing=True) | |
445 |
|
445 | |||
446 | def writerej(self, fname, failed, total, lines): |
|
446 | def writerej(self, fname, failed, total, lines): | |
447 | fname = fname + ".rej" |
|
447 | fname = fname + ".rej" | |
@@ -453,7 +453,7 b' class fsbackend(abstractbackend):' | |||||
453 | fp.close() |
|
453 | fp.close() | |
454 |
|
454 | |||
455 | def exists(self, fname): |
|
455 | def exists(self, fname): | |
456 |
return |
|
456 | return self.opener.lexists(fname) | |
457 |
|
457 | |||
458 | class workingbackend(fsbackend): |
|
458 | class workingbackend(fsbackend): | |
459 | def __init__(self, ui, repo, similarity): |
|
459 | def __init__(self, ui, repo, similarity): |
General Comments 0
You need to be logged in to leave comments.
Login now