mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +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()
|
head = repo.getHeadRev()
|
||||||
logging.debug('head = %s' % head)
|
logging.debug('head = %s' % head)
|
||||||
rjavarevs = repo.getRevsBetween(head, stringsHash, rPath)
|
rjavarevs = repo.getRevsBetween(head, stringsHash, rPath)
|
||||||
assert( 1 >= len(rjavarevs) )
|
if rjavarevs:
|
||||||
assert( stringsHash == rjavarevs[-1] )
|
assert( 1 >= len(rjavarevs) )
|
||||||
if 1 == len(rjavarevs):
|
assert( stringsHash == rjavarevs[-1] )
|
||||||
firstPossible = head
|
if 1 == len(rjavarevs):
|
||||||
else:
|
firstPossible = head
|
||||||
firstPossible = rjavarevs[-2] + '^'
|
else:
|
||||||
# get actual number for rev^
|
firstPossible = rjavarevs[-2] + '^'
|
||||||
firstPossible = repo.getRevsBetween( firstPossible, firstPossible )[0]
|
# get actual number for rev^
|
||||||
logging.debug('firstPossible: %s' % firstPossible)
|
firstPossible = repo.getRevsBetween( firstPossible, firstPossible )[0]
|
||||||
|
logging.debug('firstPossible: %s' % firstPossible)
|
||||||
|
|
||||||
for entry in params:
|
for entry in params:
|
||||||
curVers = entry[k_XLATEVERS]
|
curVers = entry[k_XLATEVERS]
|
||||||
if not curVers == firstPossible:
|
if not curVers == firstPossible:
|
||||||
locale = entry[k_LOCALE]
|
locale = entry[k_LOCALE]
|
||||||
|
|
||||||
data = mk_for_download.getXlationFor( repo, rDotJava, locale, \
|
data = mk_for_download.getXlationFor( repo, rDotJava, locale, \
|
||||||
firstPossible )
|
firstPossible )
|
||||||
if data: result.append( { k_LOCALE: locale,
|
if data: result.append( { k_LOCALE: locale,
|
||||||
k_OLD: curVers,
|
k_OLD: curVers,
|
||||||
k_NEW: firstPossible,
|
k_NEW: firstPossible,
|
||||||
k_PAIRS: data,
|
k_PAIRS: data,
|
||||||
} )
|
} )
|
||||||
|
|
||||||
if 0 == len(result): result = None
|
if 0 == len(result): result = None
|
||||||
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
logging.debug( "getXlate=>%s" % (json.dumps(result)) )
|
||||||
|
|
Loading…
Add table
Reference in a new issue