comparison hgext/convert/git.py @ 5521:03496d4fa509

convert: display all errors if we couldn't open the source repo This should give the user a better hint of what's going wrong. Improve some error messages. In particular, mention "CVS checkout" instead of "CVS repo". Fixes issue822 and issue826.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 09 Nov 2007 20:21:35 -0200
parents 003d1f174fe1
children 6ffca2bf23da 9451a941c536
comparison
equal deleted inserted replaced
5520:cc3af86ab6fe 5521:03496d4fa509
28 super(convert_git, self).__init__(ui, path, rev=rev) 28 super(convert_git, self).__init__(ui, path, rev=rev)
29 29
30 if os.path.isdir(path + "/.git"): 30 if os.path.isdir(path + "/.git"):
31 path += "/.git" 31 path += "/.git"
32 if not os.path.exists(path + "/objects"): 32 if not os.path.exists(path + "/objects"):
33 raise NoRepo("couldn't open GIT repo %s" % path) 33 raise NoRepo("%s does not look like a Git repo" % path)
34 self.path = path 34 self.path = path
35 35
36 def getheads(self): 36 def getheads(self):
37 if not self.rev: 37 if not self.rev:
38 return self.gitcmd('git-rev-parse --branches').read().splitlines() 38 return self.gitcmd('git-rev-parse --branches').read().splitlines()