Exemple #1
0
def run(dest, force):
    if (not force and git.has_initial_commit(cwd=dest)
            and git.get_uncommitted_files(cwd=dest)):
        logging.error('Uncommitted files in %s, reset or pass --force' % dest)
        sys.exit(1)
    logging.info('Synchronizing open source tree at: ' + dest)
    submodule_paths = _add_and_sync_submodules(dest, force)
    sync_set = _find_sync_set('.', submodule_paths)
    _sync_files(dest, '.', sync_set)
    _purge_non_synced_ignored_files(dest, '.', sync_set, submodule_paths)
def run(dest, force):
  if (not force and git.has_initial_commit(cwd=dest) and
      git.get_uncommitted_files(cwd=dest)):
    logging.error('Uncommitted files in %s, reset or pass --force' % dest)
    sys.exit(1)
  logging.info('Synchronizing open source tree at: ' + dest)
  submodule_paths = _add_and_sync_submodules(dest, force)
  sync_set = _find_sync_set('.', submodule_paths)
  _sync_files(dest, '.', sync_set)
  _purge_non_synced_ignored_files(dest, '.', sync_set, submodule_paths)
Exemple #3
0
 def test_is_not_initial_commit(self):
   self.assertTrue(git.has_initial_commit())
Exemple #4
0
 def test_is_not_initial_commit(self):
     self.assertTrue(git.has_initial_commit())