<commit_before>#!/usr/bin/python

"""gl-push - Push changes upstream.

Implements the gl-push command, part of the Gitless suite.
"""

import argparse

import cmd
import pprint
import sync_lib


def main():
  ret, out = sync_lib.push()
  errors_found = False

  if ret is sync_lib.SUCCESS:
    print out
  elif ret is sync_lib.UPSTREAM_NOT_SET:
    pprint.err('Current branch has no upstream set')
    pprint.err_exp('to set an upstream branch do gl branch --set-upstream remote/remote_branch')
    errors_found = True
  elif ret is sync_lib.NOTHING_TO_PUSH:
    pprint.err('Nothing to push')
    errors_found = True
  elif ret is sync_lib.PUSH_FAIL:
    pprint.err('Push failed, there are conflicting changes you need to converge')<commit_msg>Cleanup<commit_after>#!/usr/bin/python

"""gl-push - Push changes upstream.

Implements the gl-push command, part of the Gitless suite.
"""

import argparse

import cmd
import pprint
import sync_lib


def main():
  ret, out = sync_lib.push()
  errors_found = False

  if ret is sync_lib.SUCCESS:
    print out
  elif ret is sync_lib.UPSTREAM_NOT_SET:
    pprint.err('Current branch has no upstream set')
    pprint.err_exp(
        'to set an upstream branch do gl branch --set-upstream '
        'remote/remote_branch')
    errors_found = True
  elif ret is sync_lib.NOTHING_TO_PUSH:
    pprint.err('Nothing to push')
    errors_found = True
  elif ret is sync_lib.PUSH_FAIL:
    pprint.err(
        'Push failed, there are conflicting changes you need to converge')
{'fraction_non_alphanumeric': 0.08603573792190602, 'fraction_numerical': 0.0, 'mean_word_length': 3.5269461077844313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6902419', 'n_tokens_mistral': 502, 'n_tokens_neox': 492, 'n_words': 161}