Kaydet (Commit) 80e794b6 authored tarafından Eray Özkural's avatar Eray Özkural

fix: get the largest old build number not the smallest!

üst f0e016f0
...@@ -463,9 +463,10 @@ class Builder: ...@@ -463,9 +463,10 @@ class Builder:
a = filter(lambda (x,y): y != None, found) a = filter(lambda (x,y): y != None, found)
ctx.ui.debug(str(a)) ctx.ui.debug(str(a))
if a: if a:
# sort in order of increasing build number
a.sort(lambda x,y : cmp(x[1],y[1])) a.sort(lambda x,y : cmp(x[1],y[1]))
old_package_fn = a[0][0] old_package_fn = a[-1][0] # get the last one
old_build = a[0][1] old_build = a[-1][1]
else: else:
old_build = None old_build = None
...@@ -492,6 +493,7 @@ class Builder: ...@@ -492,6 +493,7 @@ class Builder:
if fo.hash != fn.hash: if fo.hash != fn.hash:
changed = True changed = True
break break
ctx.ui.debug('old build number: %s' % old_build)
# set build number # set build number
if old_build is None: if old_build is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment