changeset 210:9a27c618d0ed

remove broken tagging code (see issue 3 bb)
author Abderrahim Kitouni <a.kitouni@gmail.com>
date Sun, 05 Jul 2009 16:39:28 +0100
parents fbdacc889143
children f40d18ff59eb
files __init__.py git_handler.py hgrepo.py
diffstat 3 files changed, 3 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/__init__.py	Fri Jul 03 16:46:26 2009 +0100
+++ b/__init__.py	Sun Jul 05 16:39:28 2009 +0100
@@ -14,17 +14,13 @@
 
 '''
 
-from mercurial import commands
-from mercurial import hg
-from mercurial import util
-from mercurial import bundlerepo
+from mercurial import commands, extensions, hg
 from mercurial.i18n import _
-import os
+import gitrepo, hgrepo
 from git_handler import GitHandler
 
 # support for `hg clone git://github.com/defunkt/facebox.git`
 # also hg clone git+ssh://git@github.com/schacon/simplegit.git
-import gitrepo, hgrepo
 hg.schemes['git'] = gitrepo
 hg.schemes['git+ssh'] = gitrepo
 
@@ -45,7 +41,6 @@
     git = GitHandler(repo, ui)
     git.clear()
 
-commands.norepo += " gclone"
 cmdtable = {
   "gimport":
         (gimport, [], _('hg gimport')),
--- a/git_handler.py	Fri Jul 03 16:46:26 2009 +0100
+++ b/git_handler.py	Sun Jul 05 16:39:28 2009 +0100
@@ -689,7 +689,7 @@
 
     def export_hg_tags(self):
         for tag, sha in self.repo.tags().iteritems():
-            if self.repo.tagtype(tag) == 'git':
+            if self.repo.tagtype(tag) in ('global', 'git'):
                 self.git.set_ref('refs/tags/' + tag, self.map_git_get(hex(sha)))
 
     def local_heads(self):
--- a/hgrepo.py	Fri Jul 03 16:46:26 2009 +0100
+++ b/hgrepo.py	Sun Jul 05 16:39:28 2009 +0100
@@ -146,25 +146,6 @@
             else:
                 super(hgrepo, self).push(remote, force, revs)
 
-        def tag(self, names, node, message, local, user, date):
-            if local:
-                super(hgrepo, self).tag(names, node, message, local, user, date)
-                return
-
-            if isinstance(names, str):
-                names = (names,)
-
-            allchars = ''.join(names)
-            for c in self.tag_disallowed:
-                if c in allchars:
-                    raise util.Abort('%r cannot be used in a tag name' % c)
-
-            git = GitHandler(self, self.ui)
-            for name in names:
-                git.tags[name] = hex(node)
-
-            git.save_tags()
-
         def tags(self):
             if self.tagscache:
                 return self.tagscache