
import sys

import recipe_util  # pylint: disable=F0401


# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
class WebRTC(recipe_util.Recipe):
  """Basic Recipe class for WebRTC."""

  @staticmethod
  def fetch_spec(props):
    url = 'https://chromium.googlesource.com/external/webrtc.git'
    spec = {
      'solutions': [
        {
          'name': 'src',
          'url': url,
          'deps_file': 'DEPS',
          'managed': False,
          'custom_deps': {},
          'safesync_url': '',
        },
      ],
      'auto': True,  # Runs git auto-svn as a part of the fetch.
      'with_branch_heads': True,
    }

    if props.get('target_os'):
      spec['target_os'] = props['target_os'].split(',')

    return {
      'type': 'gclient_git_svn',
      'gclient_git_svn_spec': spec,
    }

  @staticmethod
  def expected_root(_props):
    return 'src'


def main(argv=None):
  return WebRTC().handle_args(argv)


if __name__ == '__main__':
  sys.exit(main(sys.argv))


import sys

import recipe_util  # pylint: disable=F0401


# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
class WebRTC(recipe_util.Recipe):
  """Basic Recipe class for WebRTC."""

  @staticmethod
  def fetch_spec(props):
    url = 'https://chromium.googlesource.com/external/webrtc.git'
    spec = {
      'solutions': [
        {
          'name': 'src',
          'url': url,
          'deps_file': 'DEPS',
          'managed': False,
          'custom_deps': {},
          'safesync_url': '',
        },
      ],
      'with_branch_heads': True,
    }

    if props.get('target_os'):
      spec['target_os'] = props['target_os'].split(',')

    return {
      'type': 'gclient_git',
      'gclient_git_spec': spec,
    }

  @staticmethod
  def expected_root(_props):
    return 'src'


def main(argv=None):
  return WebRTC().handle_args(argv)


if __name__ == '__main__':
  sys.exit(main(sys.argv))

Switch WebRTC recipe to Git.
Switch WebRTC recipe to Git.

BUG=412012

Review URL: https://codereview.chromium.org/765373002

git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@294546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

  
  import sys
  
  import recipe_util  # pylint: disable=F0401
  
  
  # This class doesn't need an __init__ method, so we disable the warning
  # pylint: disable=W0232
  class WebRTC(recipe_util.Recipe):
    """Basic Recipe class for WebRTC."""
  
    @staticmethod
    def fetch_spec(props):
      url = 'https://chromium.googlesource.com/external/webrtc.git'
      spec = {
        'solutions': [
          {
            'name': 'src',
            'url': url,
            'deps_file': 'DEPS',
            'managed': False,
            'custom_deps': {},
            'safesync_url': '',
          },
        ],
-       'auto': True,  # Runs git auto-svn as a part of the fetch.
        'with_branch_heads': True,
      }
  
      if props.get('target_os'):
        spec['target_os'] = props['target_os'].split(',')
  
      return {
-       'type': 'gclient_git_svn',
+       'type': 'gclient_git',
-       'gclient_git_svn_spec': spec,
+       'gclient_git_spec': spec,
      }
  
    @staticmethod
    def expected_root(_props):
      return 'src'
  
  
  def main(argv=None):
    return WebRTC().handle_args(argv)
  
  
  if __name__ == '__main__':
    sys.exit(main(sys.argv))
  
Switch WebRTC recipe to Git.
## Code Before:

import sys

import recipe_util  # pylint: disable=F0401


# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
class WebRTC(recipe_util.Recipe):
  """Basic Recipe class for WebRTC."""

  @staticmethod
  def fetch_spec(props):
    url = 'https://chromium.googlesource.com/external/webrtc.git'
    spec = {
      'solutions': [
        {
          'name': 'src',
          'url': url,
          'deps_file': 'DEPS',
          'managed': False,
          'custom_deps': {},
          'safesync_url': '',
        },
      ],
      'auto': True,  # Runs git auto-svn as a part of the fetch.
      'with_branch_heads': True,
    }

    if props.get('target_os'):
      spec['target_os'] = props['target_os'].split(',')

    return {
      'type': 'gclient_git_svn',
      'gclient_git_svn_spec': spec,
    }

  @staticmethod
  def expected_root(_props):
    return 'src'


def main(argv=None):
  return WebRTC().handle_args(argv)


if __name__ == '__main__':
  sys.exit(main(sys.argv))

## Instruction:
Switch WebRTC recipe to Git.
## Code After:

import sys

import recipe_util  # pylint: disable=F0401


# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
class WebRTC(recipe_util.Recipe):
  """Basic Recipe class for WebRTC."""

  @staticmethod
  def fetch_spec(props):
    url = 'https://chromium.googlesource.com/external/webrtc.git'
    spec = {
      'solutions': [
        {
          'name': 'src',
          'url': url,
          'deps_file': 'DEPS',
          'managed': False,
          'custom_deps': {},
          'safesync_url': '',
        },
      ],
      'with_branch_heads': True,
    }

    if props.get('target_os'):
      spec['target_os'] = props['target_os'].split(',')

    return {
      'type': 'gclient_git',
      'gclient_git_spec': spec,
    }

  @staticmethod
  def expected_root(_props):
    return 'src'


def main(argv=None):
  return WebRTC().handle_args(argv)


if __name__ == '__main__':
  sys.exit(main(sys.argv))
