Exemplo n.º 1
0
def gitBranchSync(brdict=dict()):
	for br in brdict:
		k=0
		v=1

		brname=brdict[k]
		remotelist=brdict[v]	

		print_console("Adding branch "+brname+", with the following remotes:")
		for remote in remotelist:
			print ("\tAdding remote "+remote)
Exemplo n.º 2
0
def syncBranch(brname,commitmsg="Incremental Commit",remotes=list(),greedy=True):
	exists=branchExists(brname)
	
	if(exists):
		print_console("Branch "+brname+" exists synching with remotes")

		
	else:
		print_console("Branch "+brname+" does not exist, synching from remotes")

	if (len(remotes)==0):
		remotes=readRemotes()		

	for remote in remotes:

		check=checkRemote(remote)
		if(not check):
			print_console("Synching from with new remote")
			addRemote(remote)
		gitStashPush()
		pullRebase(brname,remote[1])
		gitStashPop()

		if(greedy==True):
			gitCommitAll(commitmsg)

		gitPush(brname,remote[0])