return 0
def __tree_status(files = None, tree_id = 'HEAD', unknown = False,
- noexclude = True):
+ noexclude = True, verbose = False):
"""Returns a list of pairs - [status, filename]
"""
+ if verbose:
+ print 'Checking for changes in the working directory...',
+ sys.stdout.flush()
+
refresh_index()
if not files:
if fs[1] not in conflicts:
cache_files.append(fs)
+ if verbose:
+ print 'done'
+
return cache_files
def local_changes():
"""Return true if there are local changes in the tree
"""
- return len(__tree_status()) != 0
+ return len(__tree_status(verbose = True)) != 0
# HEAD value cached
__head = None
if not files:
files = []
- cache_files = __tree_status(files)
+ cache_files = __tree_status(files, verbose = False)
# everything is up-to-date
if len(cache_files) == 0:
if __run(config.get('stgit', 'pullcmd'), args) != 0:
raise GitException, 'Failed "git-pull %s"' % repository
+def repack():
+ """Repack all objects into a single pack
+ """
+ __run('git-repack -a -d -f')
+
def apply_patch(filename = None, diff = None, base = None,
fail_dump = True):
"""Apply a patch onto the current or given index. There must not