Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/subversion.py @ 5461:ab4d2e9f3b97
convert: svn -- fix 'exists'
Previously 'exists' erroneously returned False for empty dirictories. This is
wrong since we want to detect even empty 'branches/' or 'tags/'.
author | Kirill Smelkov <kirr@landau.phys.spbu.ru> |
---|---|
date | Sat, 13 Oct 2007 15:22:03 +0400 |
parents | 6fa5258be3d4 |
children | 91a522a69c13 |
comparison
equal
deleted
inserted
replaced
5460:fe9b0bb3eb1c | 5461:ab4d2e9f3b97 |
---|---|
156 lastrevs[module] = revnum | 156 lastrevs[module] = revnum |
157 self.lastrevs = lastrevs | 157 self.lastrevs = lastrevs |
158 | 158 |
159 def exists(self, path, optrev): | 159 def exists(self, path, optrev): |
160 try: | 160 try: |
161 return svn.client.ls(self.url.rstrip('/') + '/' + path, | 161 svn.client.ls(self.url.rstrip('/') + '/' + path, |
162 optrev, False, self.ctx) | 162 optrev, False, self.ctx) |
163 return True | |
163 except SubversionException, err: | 164 except SubversionException, err: |
164 return [] | 165 return False |
165 | 166 |
166 def getheads(self): | 167 def getheads(self): |
167 # detect standard /branches, /tags, /trunk layout | 168 # detect standard /branches, /tags, /trunk layout |
168 rev = optrev(self.last_changed) | 169 rev = optrev(self.last_changed) |
169 rpath = self.url.strip('/') | 170 rpath = self.url.strip('/') |