# HG changeset patch # User Patrick Mezard # Date 1226761032 -3600 # Node ID f5f6b7dcd217ee22cb13bf496b0e190689b07751 # Parent 59f8f6f30630dbe8f8b00a64b136b29e82f6d6a6# Parent b965605dfb2ed188a54d4aca18ac3ae5b0726953 Merge with crew-stable diff -r 59f8f6f30630 -r f5f6b7dcd217 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Sat Nov 15 15:09:11 2008 +0100 +++ b/hgext/convert/subversion.py Sat Nov 15 15:57:12 2008 +0100 @@ -46,6 +46,9 @@ except ImportError: pass +class SvnPathNotFound(Exception): + pass + def geturl(path): try: return svn.client.url_from_path(svn.core.svn_path_canonicalize(path)) @@ -414,9 +417,15 @@ remainings.append([source, sourcerev, tagname]) continue # From revision may be fake, get one with changes - tagid = self.latest(source, sourcerev) - if tagid: - tags[tagname] = tagid + try: + tagid = self.latest(source, sourcerev) + if tagid: + tags[tagname] = tagid + except SvnPathNotFound: + # It happens when we are following directories we assumed + # were copied with their parents but were really created + # in the tag directory. + pass pendings = remainings tagspath = srctagspath @@ -474,7 +483,7 @@ except SubversionException: dirent = None if not dirent: - raise util.Abort(_('%s not found up to revision %d') % (path, stop)) + raise SvnPathNotFound(_('%s not found up to revision %d') % (path, stop)) # stat() gives us the previous revision on this line of development, but # it might be in *another module*. Fetch the log and detect renames down @@ -834,7 +843,7 @@ latest = self.latest(self.module, firstrevnum - 1) if latest: firstcset.parents.append(latest) - except util.Abort: + except SvnPathNotFound: pass except SubversionException, (inst, num): if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION: