/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/git/dir.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-05-15 18:47:57 UTC
  • mfrom: (6964.2.7 python3-git)
  • Revision ID: breezy.the.bot@gmail.com-20180515184757-xozniaj9gztgtom8
Port some of brz-git to python3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-git/+merge/345479

Show diffs side-by-side

added added

removed removed

Lines of Context:
654
654
            # directories and files are read-write for this user. This is
655
655
            # mostly a workaround for filesystems which lie about being able to
656
656
            # write to a directory (cygwin & win32)
657
 
            if (st.st_mode & 07777 == 00000):
 
657
            if (st.st_mode & 0o7777 == 0o0000):
658
658
                # FTP allows stat but does not return dir/file modes
659
659
                self._dir_mode = None
660
660
                self._file_mode = None
661
661
            else:
662
 
                self._dir_mode = (st.st_mode & 07777) | 00700
 
662
                self._dir_mode = (st.st_mode & 0o7777) | 0o0700
663
663
                # Remove the sticky and execute bits for files
664
 
                self._file_mode = self._dir_mode & ~07111
 
664
                self._file_mode = self._dir_mode & ~0o7111
665
665
 
666
666
    def _get_file_mode(self):
667
667
        """Return Unix mode for newly created files, or None.