def git_debug_snapshot(args, name): """ Take a git snapshot for the debugging. """ if not args.gitdebug: return git.commit_all(name, tree=args.outdir)
def git_debug_snapshot(args, name): """ Take a git snapshot for the debugging. """ if not args.gitdebug: return git.commit_all(name, tree=args.bpid.project_dir)
def git_debug_init(args): """ Initialize a git repository in the output directory and commit the current code in it. This is only used for debugging the transformations this code will do to the output later. """ if not args.gitdebug: return git.init(tree=args.outdir) git.commit_all("Copied backport", tree=args.outdir)
def git_debug_snapshot(args, name): """ Take a git snapshot for the debugging. """ if not args.gitdebug: return global prevtime if prevtime is not None: name += "\n\n(took %.2f seconds)\n" % (time.time() - prevtime) prevtime = time.time() git.commit_all(name, tree=args.bpid.project_dir)
def git_debug_init(args): """ Initialize a git repository in the output directory and commit the current code in it. This is only used for debugging the transformations this code will do to the output later. """ if not args.gitdebug: return # Git supports re-initialization, although not well documented it can # reset config stuff, lets avoid that if the tree already exists. if not os.path.exists(os.path.join(args.bpid.project_dir, '.git')): git.init(tree=args.bpid.project_dir) git.commit_all("Copied backport", tree=args.bpid.project_dir)