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