mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
don't barf when something not found in git history -- just return nothing, as it's the dev case
This commit is contained in:
parent
f3daed2e12
commit
d54bbb3beb
1 changed files with 21 additions and 20 deletions
|
@ -302,28 +302,29 @@ def getXlate( params, name, stringsHash ):
|
|||
head = repo.getHeadRev()
|
||||
logging.debug('head = %s' % head)
|
||||
rjavarevs = repo.getRevsBetween(head, stringsHash, rPath)
|
||||
assert( 1 >= len(rjavarevs) )
|
||||
assert( stringsHash == rjavarevs[-1] )
|
||||
if 1 == len(rjavarevs):
|
||||
firstPossible = head
|
||||
else:
|
||||
firstPossible = rjavarevs[-2] + '^'
|
||||
# get actual number for rev^
|
||||
firstPossible = repo.getRevsBetween( firstPossible, firstPossible )[0]
|
||||
logging.debug('firstPossible: %s' % firstPossible)
|
||||
if rjavarevs:
|
||||
assert( 1 >= len(rjavarevs) )
|
||||
assert( stringsHash == rjavarevs[-1] )
|
||||
if 1 == len(rjavarevs):
|
||||
firstPossible = head
|
||||
else:
|
||||
firstPossible = rjavarevs[-2] + '^'
|
||||
# get actual number for rev^
|
||||
firstPossible = repo.getRevsBetween( firstPossible, firstPossible )[0]
|
||||
logging.debug('firstPossible: %s' % firstPossible)
|
||||
|
||||
for entry in params:
|
||||
curVers = entry[k_XLATEVERS]
|
||||
if not curVers == firstPossible:
|
||||
locale = entry[k_LOCALE]
|
||||
for entry in params:
|
||||
curVers = entry[k_XLATEVERS]
|
||||
if not curVers == firstPossible:
|
||||
locale = entry[k_LOCALE]
|
||||
|
||||
data = mk_for_download.getXlationFor( repo, rDotJava, locale, \
|
||||
firstPossible )
|
||||
if data: result.append( { k_LOCALE: locale,
|
||||
k_OLD: curVers,
|
||||
k_NEW: firstPossible,
|
||||
k_PAIRS: data,
|
||||
} )
|
||||
data = mk_for_download.getXlationFor( repo, rDotJava, locale, \
|
||||
firstPossible )
|
||||
if data: result.append( { k_LOCALE: locale,
|
||||
k_OLD: curVers,
|
||||
k_NEW: firstPossible,
|
||||
k_PAIRS: data,
|
||||
} )
|
||||
|
||||
if 0 == len(result): result = None
|
||||
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
||||
|
|
Loading…
Add table
Reference in a new issue