Skip to content

Commit

Permalink
More pending updates
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Oct 15, 2009
1 parent 2061f2b commit e7ce7e9
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions git-yui
Expand Up @@ -422,7 +422,12 @@ def showGalleryPending(id):
print_error("No YUI username or GitHub token in your git config.\nhttp://wiki.github.com/davglass/yui-git/yui-api-token")

url = "%s/gallery/api/pullpending" % server_name
req = urllib2.Request(url)
out = {}
out['nocache'] = 'nocache'
out['username'] = username
out['token'] = token
data = urllib.urlencode(out)
req = urllib2.Request(url, data)
data = simplejson.load(urllib2.urlopen(req))

if data['count'] > 0:
Expand All @@ -437,11 +442,19 @@ def showGalleryPending(id):

if not remote_name in git_config:
#call(['git', 'remote', 'add', gh, 'git://github.com/%s/%s.git' % (gh, master)])
print "git remote add %s git://github.com/%s/yui3-gallery.git" % (gh, gh)
print "git checkout -b %s" % i['sha1']
print "git pull %s %s" % (gh, i['branch'])
print "git reset %s" % i['sha1']
print "git yui lint build/%s/*.js src/%s/js/*" % (i['module'], i['module'])
#print "git remote add %s git://github.com/%s/yui3-gallery.git" % (gh, gh)
#Change when gallery is live!!
print "git remote add %s git@github.com:%s/yui3-gallery.git" % (gh, gh)
branch = "pending-%s" % i['sha1'][0:9]
#print "git checkout -b %s" % branch
call(['git', 'checkout', '-b', branch])
#print "git pull %s %s:%s" % (gh, i['branch'], branch)
call(['git', 'pull', gh, '%s:%s' % (i['branch'], branch)])
#print "git reset %s --hard" % i['sha1'][0:9]
call(['git', 'reset', '--hard', i['sha1'][0:9]])
print "Pull Complete:"
print "Lint all: git yui lint build/%s/*.js src/%s/js/*" % (i['module'], i['module'])
print "Reset back to master: git reset --hard master"
print '--------------------------------------------------------------------------'

else:
Expand Down

0 comments on commit e7ce7e9

Please sign in to comment.