diff git_handler.py @ 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 (2009-05-27)
parents 4b63e8425565
children 4d2cc26a6e51
line wrap: on
line diff
--- a/git_handler.py
+++ b/git_handler.py
@@ -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('/')