Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/subversion.py @ 5119:0751c25ea0c0
raise util.Abort again if specified revision is not an integer.
This was changed to NoRepo in 462cc56d898f, because specifying non-integer
revisions for e.g. the Mercurial backend caused Abort to be raised in the
subversion importer.
Now util.Abort is raised again, but the check is done after verifying if it
really is a subversion repository.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 07 Aug 2007 12:24:25 +0200 |
parents | 07735e2d24cb |
children | 585471802a01 |
comparison
equal
deleted
inserted
replaced
5118:07735e2d24cb | 5119:0751c25ea0c0 |
---|---|
106 | 106 |
107 self.encoding = locale.getpreferredencoding() | 107 self.encoding = locale.getpreferredencoding() |
108 self.lastrevs = {} | 108 self.lastrevs = {} |
109 | 109 |
110 latest = None | 110 latest = None |
111 if rev: | |
112 try: | |
113 latest = int(rev) | |
114 except ValueError: | |
115 raise NoRepo('svn: revision %s is not an integer' % rev) | |
116 try: | 111 try: |
117 # Support file://path@rev syntax. Useful e.g. to convert | 112 # Support file://path@rev syntax. Useful e.g. to convert |
118 # deleted branches. | 113 # deleted branches. |
119 at = url.rfind('@') | 114 at = url.rfind('@') |
120 if at >= 0: | 115 if at >= 0: |
134 self.commits = {} | 129 self.commits = {} |
135 self.paths = {} | 130 self.paths = {} |
136 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) | 131 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) |
137 except SubversionException, e: | 132 except SubversionException, e: |
138 raise NoRepo("couldn't open SVN repo %s" % self.url) | 133 raise NoRepo("couldn't open SVN repo %s" % self.url) |
134 | |
135 if rev: | |
136 try: | |
137 latest = int(rev) | |
138 except ValueError: | |
139 raise util.Abort('svn: revision %s is not an integer' % rev) | |
139 | 140 |
140 try: | 141 try: |
141 self.get_blacklist() | 142 self.get_blacklist() |
142 except IOError, e: | 143 except IOError, e: |
143 pass | 144 pass |