Skip to content

Commit

Permalink
Fix invalid reference issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Apr 10, 2015
1 parent 77d3d37 commit 38871e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion packthing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def checkout(self, refresh):

self.repos = {}
for a in self.config['repo']:
repo = v.Repo(a['url'],a['path'])

ref = None
if 'branch' in a:
Expand Down
12 changes: 7 additions & 5 deletions packthing/vcs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
from .. import util

class Repo:

@util.log
def __init__(self, url, path, ref=None):
self.url = url
self.path = path
self.version = self.set_version()
self.ref = ref
self.ref = 'master'

if self.ref == None:
self.ref = self.default_ref
if not ref == None:
self.ref = ref

self.version = self.set_version()

sys.stdout.write(" ( {:>10} ) {:<30} {}\n".format(self.version,self.path,self.url))

Expand All @@ -28,7 +30,7 @@ def update(self):
else:
self.clone()

self.checkout(ref=self.ref)
self.checkout(self.ref)
self.update_externals()

@util.log
Expand Down

0 comments on commit 38871e3

Please sign in to comment.