Browse Source

Merge branch 'develop'

tags/v0.3
Ben Kurtovic 9 years ago
parent
commit
946dc3219c
3 changed files with 12 additions and 4 deletions
  1. +1
    -1
      gitup/__init__.py
  2. +10
    -2
      gitup/update.py
  3. +1
    -1
      setup.py

+ 1
- 1
gitup/__init__.py View File

@@ -10,5 +10,5 @@ gitup: the git repository updater
__author__ = "Ben Kurtovic" __author__ = "Ben Kurtovic"
__copyright__ = "Copyright (C) 2011-2014 Ben Kurtovic" __copyright__ = "Copyright (C) 2011-2014 Ben Kurtovic"
__license__ = "MIT License" __license__ = "MIT License"
__version__ = "0.2.2"
__version__ = "0.2.3"
__email__ = "ben.kurtovic@gmail.com" __email__ = "ben.kurtovic@gmail.com"

+ 10
- 2
gitup/update.py View File

@@ -34,15 +34,23 @@ class _ProgressMonitor(RemoteProgress):
def update(self, op_code, cur_count, max_count=None, message=''): def update(self, op_code, cur_count, max_count=None, message=''):
"""Called whenever progress changes. Overrides default behavior.""" """Called whenever progress changes. Overrides default behavior."""
if op_code & (self.COMPRESSING | self.RECEIVING): if op_code & (self.COMPRESSING | self.RECEIVING):
cur_count = str(int(cur_count))
if max_count:
max_count = str(int(max_count))
if op_code & self.BEGIN: if op_code & self.BEGIN:
print("\b, " if self._started else " (", end="") print("\b, " if self._started else " (", end="")
if not self._started: if not self._started:
self._started = True self._started = True
if op_code & self.END: if op_code & self.END:
end = ")" end = ")"
else:
elif max_count:
end = "\b" * (1 + len(cur_count) + len(max_count)) end = "\b" * (1 + len(cur_count) + len(max_count))
print("{0}/{1}".format(cur_count, max_count), end=end)
else:
end = "\b" * len(cur_count)
if max_count:
print("{0}/{1}".format(cur_count, max_count), end=end)
else:
print(str(cur_count), end=end)




class _Stasher(object): class _Stasher(object):


+ 1
- 1
setup.py View File

@@ -19,7 +19,7 @@ setup(
name = "gitup", name = "gitup",
packages = find_packages(), packages = find_packages(),
entry_points = {"console_scripts": ["gitup = gitup.script:run"]}, entry_points = {"console_scripts": ["gitup = gitup.script:run"]},
install_requires = ["GitPython >= 0.3.2.RC1", "colorama >= 0.2.7"],
install_requires = ["GitPython >= 0.3.6", "colorama >= 0.3.3"],
version = __version__, version = __version__,
author = "Ben Kurtovic", author = "Ben Kurtovic",
author_email = "ben.kurtovic@gmail.com", author_email = "ben.kurtovic@gmail.com",


Loading…
Cancel
Save