comparison hgext/convert/subversion.py @ 6172:0cd6846e5200

convert: allow svn trunk/branches/tags detection to be skipped - eluding convert.svn.branches defaults to "branches" - convert.svn.branches= disables branches detection - convert.svn.branches=/ is equivalent to former convert.svn.branches=
author Patrick Mezard <pmezard@gmail.com>
date Sun, 24 Feb 2008 17:58:53 +0100
parents 4e87e785c5bf
children 963000ed8cac
comparison
equal deleted inserted replaced
6171:73b1de288801 6172:0cd6846e5200
234 234
235 def getheads(self): 235 def getheads(self):
236 236
237 def getcfgpath(name, rev): 237 def getcfgpath(name, rev):
238 cfgpath = self.ui.config('convert', 'svn.' + name) 238 cfgpath = self.ui.config('convert', 'svn.' + name)
239 if cfgpath is not None and cfgpath.strip() == '':
240 return None
239 path = (cfgpath or name).strip('/') 241 path = (cfgpath or name).strip('/')
240 if not self.exists(path, rev): 242 if not self.exists(path, rev):
241 if cfgpath: 243 if cfgpath:
242 raise util.Abort(_('expected %s to be at %r, but not found') 244 raise util.Abort(_('expected %s to be at %r, but not found')
243 % (name, path)) 245 % (name, path))
340 del self.commits[rev] 342 del self.commits[rev]
341 return commit 343 return commit
342 344
343 def gettags(self): 345 def gettags(self):
344 tags = {} 346 tags = {}
347 if self.tags is None:
348 return tags
349
345 start = self.revnum(self.head) 350 start = self.revnum(self.head)
346 try: 351 try:
347 for entry in get_log(self.url, [self.tags], 0, start): 352 for entry in get_log(self.url, [self.tags], 0, start):
348 orig_paths, revnum, author, date, message = entry 353 orig_paths, revnum, author, date, message = entry
349 for path in orig_paths: 354 for path in orig_paths: