Mercurial > hg
changeset 4949:2f0f9528e77b
convert/subversion: rehandle the no-tags case
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 19 Jul 2007 15:33:21 -0700 |
parents | c8d1aa1822d5 |
children | 90be978c9d3d |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Thu Jul 19 15:29:33 2007 -0700 +++ b/hgext/convert/subversion.py Thu Jul 19 15:33:21 2007 -0700 @@ -206,6 +206,7 @@ strict_node_history, receiver) except SubversionException, (_, num): + self.ui.print_exc() pickle.dump(num, fp, protocol) else: pickle.dump(None, fp, protocol) @@ -238,16 +239,20 @@ def gettags(self): tags = {} - for entry in self.get_log(['/tags'], 0, self.revnum(self.head)): - orig_paths, revnum, author, date, message = entry - for path in orig_paths: - if not path.startswith('/tags/'): - continue - ent = orig_paths[path] - source = ent.copyfrom_path - rev = ent.copyfrom_rev - tag = path.split('/', 2)[2] - tags[tag] = self.revid(rev, module=source) + start = self.revnum(self.head) + try: + for entry in self.get_log(['/tags'], 0, start): + orig_paths, revnum, author, date, message = entry + for path in orig_paths: + if not path.startswith('/tags/'): + continue + ent = orig_paths[path] + source = ent.copyfrom_path + rev = ent.copyfrom_rev + tag = path.split('/', 2)[2] + tags[tag] = self.revid(rev, module=source) + except SubversionException, (_, num): + self.ui.note('no tags found at revision %d\n' % start) return tags # -- helper functions --