/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/git/tests/__init__.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-01-24 02:15:54 UTC
  • mfrom: (7458.1.2 fix-submodule-import)
  • Revision ID: breezy.the.bot@gmail.com-20200124021554-jvnts81ex7g0ljvb
Support importing Git submodules as tree references.

Merged from https://code.launchpad.net/~jelmer/brz/fix-submodule-import/+merge/378021

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        self.commit_info.append(b'M %s :%d %s\n'
97
97
                                % (mode, mark, self._encode_path(path)))
98
98
 
 
99
    def set_submodule(self, path, commit_sha):
 
100
        """Create or update submodule at a given path."""
 
101
        mode = b'160000'
 
102
        self.commit_info.append(
 
103
            b'M %s %s %s\n' % (mode, commit_sha, self._encode_path(path)))
 
104
 
99
105
    def set_file(self, path, content, executable):
100
106
        """Create or update content at a given path."""
101
107
        mark = self._create_blob(content)