Skip to content
Snippets Groups Projects
Commit 5b702bbf078f authored by Ian Dees's avatar Ian Dees
Browse files

local git branches to remotes

parent 9dafb9ac24ff
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,7 @@
def push(self, remote_name):
self.ui.status(_("pushing to : %s\n") % remote_name)
self.export()
self.update_remote_references(remote_name)
self.upload_pack(remote_name)
def remote_add(self, remote_name, git_url):
......@@ -174,6 +175,13 @@
c = self.map_git_get(hex(self.repo.changelog.tip()))
self.git.set_ref('refs/heads/master', c)
def update_remote_references(self, remote_name):
def is_local_head(item): return item[0].startswith('refs/heads')
refs = self.git.get_refs()
heads = dict(filter(is_local_head, refs.items()))
self.git.set_remote_refs(heads, remote_name)
def export_git_objects(self):
self.ui.status(_("exporting git objects\n"))
total = len(self.repo.changelog)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment