Merge lp:~jelmer/brz/path2ie-more into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/path2ie-more
Merge into: lp:brz
Diff against target: 42 lines (+6/-9)
1 file modified
breezy/bzr/workingtree.py (+6/-9)
To merge this branch: bzr merge lp:~jelmer/brz/path2ie-more
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+355138@code.launchpad.net

Commit message

Use _path2ie in a couple more places.

Description of the change

Use _path2ie in a couple more places.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks, looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/bzr/workingtree.py'
--- breezy/bzr/workingtree.py 2018-09-14 14:35:18 +0000
+++ breezy/bzr/workingtree.py 2018-09-17 13:35:59 +0000
@@ -731,12 +731,12 @@
731 raise731 raise
732732
733 def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):733 def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):
734 inv, file_id = self._path2inv_file_id(path)734 try:
735 if file_id is None:735 return self._path2ie(path).executable
736 except errors.NoSuchFile:
736 # For unversioned files on win32, we just assume they are not737 # For unversioned files on win32, we just assume they are not
737 # executable738 # executable
738 return False739 return False
739 return inv.get_entry(file_id).executable
740740
741 def _is_executable_from_path_and_stat_from_stat(self, path, stat_result):741 def _is_executable_from_path_and_stat_from_stat(self, path, stat_result):
742 mode = stat_result.st_mode742 mode = stat_result.st_mode
@@ -744,8 +744,8 @@
744744
745 def is_executable(self, path, file_id=None):745 def is_executable(self, path, file_id=None):
746 if not self._supports_executable():746 if not self._supports_executable():
747 inv, inv_file_id = self._path2inv_file_id(path)747 ie = self._path2ie(path)
748 return inv.get_entry(inv_file_id).executable748 return ie.executable
749 else:749 else:
750 mode = os.lstat(self.abspath(path)).st_mode750 mode = os.lstat(self.abspath(path)).st_mode
751 return bool(stat.S_ISREG(mode) and stat.S_IEXEC & mode)751 return bool(stat.S_ISREG(mode) and stat.S_IEXEC & mode)
@@ -1455,10 +1455,7 @@
14551455
1456 def stored_kind(self, path, file_id=None):1456 def stored_kind(self, path, file_id=None):
1457 """See Tree.stored_kind"""1457 """See Tree.stored_kind"""
1458 inv, inv_file_id = self._path2inv_file_id(path)1458 return self._path2ie(path).kind
1459 if inv_file_id is None:
1460 raise errors.NoSuchFile(self, path)
1461 return inv.get_entry(inv_file_id).kind
14621459
1463 def extras(self):1460 def extras(self):
1464 """Yield all unversioned files in this WorkingTree.1461 """Yield all unversioned files in this WorkingTree.

Subscribers

People subscribed via source and target branches