Mercurial > hg-git
changeset 147:366052cae03c
started tag support
author | Scott Chacon <schacon@gmail.com> |
---|---|
date | Wed, 13 May 2009 13:54:54 -0700 |
parents | b3be536e3f50 |
children | 201d30003120 |
files | README.md __init__.py git_handler.py |
diffstat | 3 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Mon May 11 16:03:57 2009 -0700 +++ b/README.md Wed May 13 13:54:54 2009 -0700 @@ -1,6 +1,6 @@ *Warning: This plugin is not yet stabilized. Use to help me identify bugs, but it will be a few weeks before its fully stable.* -*Project status as of 5/11:* Pretty solid, but a bit slow - can losslessly convert most major scenarios and can handle projects up to several thousand commits. Encodings, submodules and octopus merges in Git are not handled well, nor are tags in either system. See TODO.txt for full list of things I'm working on. +*Project status as of 5/11:* Pretty solid, but a bit slow - can losslessly convert most major scenarios and can handle projects up to several thousand commits. Submodules and octopus merges in Git are not handled, nor are tags in either system. See TODO.txt for full list of things I'm working on. Hg-Git Mercurial Plugin
--- a/__init__.py Mon May 11 16:03:57 2009 -0700 +++ b/__init__.py Wed May 13 13:54:54 2009 -0700 @@ -80,14 +80,17 @@ git = GitHandler(repo, ui) git.fetch(remote_name) +def gtest(ui, repo): + print repo.tags() + commands.norepo += " gclone" cmdtable = { "gclone": (gclone, [], _('Clone a git repository into an hg repository.'), ), - "gpush": - (gpush, [], _('hg gpush remote')), + "gtest": + (gtest, [], _('testing')), "gexport": (gexport, [], _('hg gexport')), "gfetch":
--- a/git_handler.py Mon May 11 16:03:57 2009 -0700 +++ b/git_handler.py Wed May 13 13:54:54 2009 -0700 @@ -118,6 +118,7 @@ def export(self): self.export_git_objects() + self.export_hg_tags() self.update_references() self.save_map() @@ -158,6 +159,9 @@ c = self.map_git_get(hex(self.repo.changelog.tip())) self.git.set_ref('refs/heads/master', c) + def export_hg_tags(self): + pass + def export_git_objects(self): self.ui.status(_("exporting git objects\n")) total = len(self.repo.changelog) @@ -465,6 +469,7 @@ if not self.map_hg_get(csha): # it's already here self.import_git_commit(commit) else: + # we need to get rename info for further upstream self.pseudo_import_git_commit(commit) self.update_hg_bookmarks(remote_name) @@ -534,10 +539,6 @@ def import_git_commit(self, commit): self.ui.debug(_("importing: %s\n") % commit.id) - # TODO : find and use hg named branches - # TODO : add extra Git data (committer info) as extras to changeset - - # TODO : (?) have to handle merge contexts at some point (two parent files, etc) # TODO : Do something less coarse-grained than try/except on the # get_file call for removed files