Python program to push files into

Here I am going to show you a simple program, using which you can add files to your bibucket repository. If you are using Linux operating system, then go to terminal and run this program. When you are asked to input username and password please input your bitbucket username and password correspondingly. When you are asked to enter reponame give your bitbucket repository name as it is.

import shlex, subprocess
from subprocess import call

print 'Enter repository address :' 
repo = raw_input()
call("hg clone "+repo, shell=True)

print 'Enter filenames to copy :'
fnames = raw_input()

print'Enter reponame'
reponame = raw_input()

print 'copying to repository'
for i in range(len(files_list)):

subprocess.Popen(["hg", "add"],cwd=reponame)

print'Enter Username of bitbucket'
username = raw_input()
print'Enter a  passphrase'
passphrase = raw_input()

print 'committing added files'

print'Pushing files to repository'
print'Enter username'

print' program finishing...files are uploaded...'

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s