diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -439,8 +439,9 @@ class svn_source(converter_source): pendings = [] tagspath = self.tags start = svn.ra.get_latest_revnum(self.ra) + stream = self._getlog([self.tags], start, self.startrev) try: - for entry in self._getlog([self.tags], start, self.startrev): + for entry in stream: origpaths, revnum, author, date, message = entry copies = [(e.copyfrom_path, e.copyfrom_rev, p) for p, e in origpaths.iteritems() if e.copyfrom_path] @@ -509,9 +510,8 @@ class svn_source(converter_source): pass pendings = remainings tagspath = srctagspath - - except SubversionException: - self.ui.note(_('no tags found at revision %d\n') % start) + finally: + stream.close() return tags def converted(self, rev, destrev): diff --git a/tests/svn/branches.svndump b/tests/svn/branches.svndump --- a/tests/svn/branches.svndump +++ b/tests/svn/branches.svndump @@ -1,6 +1,6 @@ SVN-fs-dump-format-version: 2 -UUID: 3c3c228a-b3dd-467c-a766-896f4b7cd0af +UUID: 644ede6c-2b81-4367-9dc8-d786514f2cde Revision-number: 0 Prop-content-length: 56 @@ -9,7 +9,7 @@ Content-length: 56 K 8 svn:date V 27 -2009-06-21T12:38:53.023457Z +2010-05-19T20:16:07.429098Z PROPS-END Revision-number: 1 @@ -27,7 +27,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:38:53.111986Z +2010-05-19T20:16:07.461283Z PROPS-END Node-path: branches @@ -39,15 +39,6 @@ Content-length: 10 PROPS-END -Node-path: tags -Node-kind: dir -Node-action: add -Prop-content-length: 10 -Content-length: 10 - -PROPS-END - - Node-path: trunk Node-kind: dir Node-action: add @@ -72,7 +63,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:38:54.182594Z +2010-05-19T20:16:08.121436Z PROPS-END Node-path: branches/notinbranch @@ -164,7 +155,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:38:57.166484Z +2010-05-19T20:16:11.113124Z PROPS-END Node-path: branches/old @@ -197,7 +188,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:38:59.084420Z +2010-05-19T20:16:13.060877Z PROPS-END Node-path: trunk/a @@ -227,7 +218,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:00.093201Z +2010-05-19T20:16:14.066212Z PROPS-END Node-path: branches/old/b @@ -257,7 +248,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:02.078633Z +2010-05-19T20:16:16.069449Z PROPS-END Node-path: branches/old/c @@ -295,7 +286,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:03.065537Z +2010-05-19T20:16:17.070868Z PROPS-END Node-path: branches/old/b @@ -326,7 +317,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:06.070275Z +2010-05-19T20:16:20.063098Z PROPS-END Node-path: branches/old2 @@ -355,7 +346,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:08.082539Z +2010-05-19T20:16:22.062931Z PROPS-END Node-path: branches/old @@ -384,7 +375,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:09.073290Z +2010-05-19T20:16:23.075562Z PROPS-END Node-path: trunk/a @@ -413,7 +404,7 @@ pmezard K 8 svn:date V 27 -2009-06-21T12:39:11.070264Z +2010-05-19T20:16:25.107655Z PROPS-END Node-path: branches/old3 diff --git a/tests/svn/svndump-branches.sh b/tests/svn/svndump-branches.sh --- a/tests/svn/svndump-branches.sh +++ b/tests/svn/svndump-branches.sh @@ -10,7 +10,6 @@ mkdir project-orig cd project-orig mkdir trunk mkdir branches -mkdir tags cd .. svnadmin create svn-repo