Пример #1
0
def startBranch(brname,remoteMap=list()):
	
	exists=branchExists(brname)
	if(exists):
		abort("Ack! The branch you wanted to create already exists. Please either synch, or destroy it.")
	
	cmd="git checkout -b "+brname
	simple_exec(cmd)

	for remote in remotes:
		cmd="git remote add "+remote[0]+" "+remote[1]
Пример #2
0
def gitSync(wrkdir=os.getcwd(),branches=dict(),create=True,trackMaster=True,rebase=True,greedy=True):
	OLDPWD=os.getcwd()

	#dir sanity check
	if (os.path.lexists(wrkdir)):
		os.chdir(wrkdir)	
	else:
		warn("wrkdir param to gitSync not a valid directory: Falling back to cwd")
		wrkdir=os.getcwd()

	contents=os.listdir(wrkdir)

	if (len(contents)!=0 and not create):
		abort("You are trying to synch something that does not contain a git repo. Pass create flag to init")
	elif(create):
		createRepo()	
			

	brdict=branches.items()
	gitBranchSync(brdict)
	

	os.chdir(OLDPWD)
Пример #3
0
def index():
  return abort(403)