write_config = False
# parse ls-tree output and get a blob id for path
- blob = g.git.ls_tree('HEAD', path).split(' ')[2].split("\t")[0]
+ try:
+ blob = g.git.ls_tree('HEAD', path).split(' ')[2].split("\t")[0]
+ except IndexError:
+ print "%s may be a stale file in your workspace." % path
+ return None
# translate that to a commit id
if not CONFIG.has_option('BlobToCommit', blob):
info_dict = {}
if not options.clean:
- info_dict.update(get_path_info(g, path))
+ update_dict = get_path_info(g, path)
+ if not update_dict:
+ continue
+ info_dict.update(update_dict)
info_dict['URL'] = '/'.join([url_base, path])
info_dict['Name'] = os.path.basename(path)
info_dict['Revision'] = str(max(kw_rev, info_dict['Revision']))