Mercurial > hg > hg-git
changeset 25:88e9e9e1caf1
will now set the current tip() as your git 'master' branch for packfile upload
author | Scott Chacon <schacon@gmail.com> |
---|---|
date | Mon, 27 Apr 2009 16:23:34 -0700 |
parents | 41f4e0a85d15 |
children | a1a5391bc3c3 |
files | git_handler.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/git_handler.py +++ b/git_handler.py @@ -126,9 +126,9 @@ return self._config['remote.' + remote_name + '.url'] def update_references(self): - # if bookmarks exist, add them as git branches - # if non of the bookmarks are tip(), add the tip as your master branch - pass + # TODO : if bookmarks exist, add them as git branches + c = self.map_git_get(hex(self.repo.changelog.tip())) + self.git.set_ref('refs/heads/master', c) def export_git_objects(self): print "exporting git objects" @@ -158,10 +158,11 @@ self.export_hg_commit(self, p_rev) ctx = self.repo.changectx(rev) - print ctx tree_sha = self.write_git_tree(ctx) # TODO : something with tags? + # TODO : explicit file renaming, copying? + commit = {} commit['tree'] = tree_sha (time, timezone) = ctx.date()