diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-09-23 18:14:08 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-09-24 11:24:36 +0000 |
commit | a751e4fc1ab7b00ae70f12f498d2050a5fb71445 (patch) | |
tree | 94bd038495f06a46ade459f72face80bf5ff7392 /morphlib/buildbranch.py | |
parent | f9c02205608356b4c57611509b574e3874d243a9 (diff) | |
download | morph-a751e4fc1ab7b00ae70f12f498d2050a5fb71445.tar.gz |
Allow Morph code to be run with Python 2.7 and Python 3.4sam/python3
PRETTY BROKEN!
Change-Id: I92545c821103eea1316383086e77e6b654f2321c
Diffstat (limited to 'morphlib/buildbranch.py')
-rw-r--r-- | morphlib/buildbranch.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/morphlib/buildbranch.py b/morphlib/buildbranch.py index 4c1baaa7..9bcba177 100644 --- a/morphlib/buildbranch.py +++ b/morphlib/buildbranch.py @@ -146,7 +146,7 @@ class BuildBranch(object): def add_uncommitted_changes(self, add_cb=lambda **kwargs: None): '''Add any uncommitted changes to temporary build GitIndexes''' changes_made = False - for gd, (build_ref, index) in self._to_push.iteritems(): + for gd, (build_ref, index) in self._to_push.items(): changed = [to_path for code, to_path, from_path in index.get_uncommitted_changes()] if not changed: @@ -190,7 +190,7 @@ class BuildBranch(object): morphs.add_morphology(morph) sb_info = {} - for gd, (build_ref, index) in self._to_push.iteritems(): + for gd, (build_ref, index) in self._to_push.items(): if gd == self._root: repo, ref = root_repo, root_ref else: @@ -255,7 +255,7 @@ class BuildBranch(object): author_email = committer_email = email with morphlib.branchmanager.LocalRefManager() as lrm: - for gd, (build_ref, index) in self._to_push.iteritems(): + for gd, (build_ref, index) in self._to_push.items(): tree = index.write_tree() try: parent = gd.resolve_ref_to_commit(build_ref) @@ -294,7 +294,7 @@ class BuildBranch(object): refs in the local checkouts match. ''' - for gd, (build_ref, index) in self._to_push.iteritems(): + for gd, (build_ref, index) in self._to_push.items(): head_ref = gd.HEAD upstream_ref = gd.get_upstream_of_branch(head_ref) if upstream_ref is None: @@ -309,7 +309,7 @@ class BuildBranch(object): '''Push all temporary build branches to the remote repositories. ''' with morphlib.branchmanager.RemoteRefManager(False) as rrm: - for gd, (build_ref, index) in self._to_push.iteritems(): + for gd, (build_ref, index) in self._to_push.items(): remote = gd.get_remote('origin') refspec = morphlib.gitdir.RefSpec(build_ref) push_cb(gd=gd, build_ref=build_ref, @@ -338,7 +338,7 @@ class BuildBranch(object): @property def root_local_repo_url(self): - return urlparse.urljoin('file://', self._root.dirname) + return urllib.parse.urljoin('file://', self._root.dirname) @property def root_build_ref(self): |