Patchwork [RFC] buildhistory: adapt to fetcher changes

login
register
mail settings
Submitter Martin Jansa
Date May 22, 2013, 5:59 p.m.
Message ID <1369245581-11492-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/50333/
State Accepted, archived
Headers show

Comments

Martin Jansa - May 22, 2013, 5:59 p.m.
* bitbake commit:
  commit fb068bee47bb1a06f02447daf16c2b2a79c03288
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Sun May 19 13:17:58 2013 +0300

    fetch2/git: Clean up sortable_revision

    Now we no longer try and provide increasing values from the fetcher,
    we can simplify the function structure for the sortable_revision
    pieces and move the AUTOINC handling directly into the function
    which needs it, simplifying the code.

  changed sortable_revision API and now it returns tuple. Maybe we should
  modify buildhistory to support both variants, this is just quick build-fix.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/buildhistory.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3b6ce99..0d74d7c 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -547,15 +547,12 @@  def _get_srcrev_values(d):
         if urldata[u].method.supports_srcrev():
             scms.append(u)
 
-    autoinc_templ = 'AUTOINC+'
     dict_srcrevs = {}
     dict_tag_srcrevs = {}
     for scm in scms:
         ud = urldata[scm]
         for name in ud.names:
-            rev = ud.method.sortable_revision(scm, ud, d, name)
-            if rev.startswith(autoinc_templ):
-                rev = rev[len(autoinc_templ):]
+            autoinc, rev = ud.method.sortable_revision(scm, ud, d, name)
             dict_srcrevs[name] = rev
             if 'tag' in ud.parm:
                 tag = ud.parm['tag'];