changeset 153:4e7c50f8b60a

dont export funky tags we import for convenience, dont push tags already on the server
author Scott Chacon <schacon@gmail.com>
date Wed, 27 May 2009 16:28:53 -0700
parents 240ec7b38f98
children 5c584f0bb8aa
files git_handler.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/git_handler.py	Wed May 27 16:15:46 2009 -0700
+++ b/git_handler.py	Wed May 27 16:28:53 2009 -0700
@@ -192,6 +192,8 @@
 
     def export_hg_tags(self):
         for tag, sha in self.repo.tags().iteritems():
+            if tag[-3:] == '^{}':
+                continue
             if tag == 'tip':
                 continue 
             self.git.set_ref('refs/tags/' + tag, self.map_git_get(hex(sha)))
@@ -408,7 +410,6 @@
     # takes a dict of refs:shas from the server and returns what should be
     # pushed up
     def get_changed_refs(self, refs):
-        print refs
         keys = refs.keys()
 
         changed = {}
@@ -421,7 +422,9 @@
 
         tags = self.git.get_tags()
         for tag, sha in tags.iteritems():
-            changed['refs/tags/' + tag] = sha
+            tag_name = 'refs/tags/' + tag
+            if tag_name not in refs:
+                changed[tag_name] = sha
 
         for ref_name in keys:
             parts = ref_name.split('/')