From: Richard Purdie Date: Tue, 21 Apr 2009 16:42:47 +0000 (+0100) Subject: bitbake: Fix a bug in the hg fetcher X-Git-Tag: 2011-1~7546^2~12 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=5264d4b9e2506f10a8084c4df9429855e7a03405;p=openembedded-core.git bitbake: Fix a bug in the hg fetcher Fix a bug in the hg fetcher where branch revisions are used with an initial checkout. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index b87fd0fbe5..7643e159ec 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/lib/bb/fetch/hg.py @@ -123,9 +123,6 @@ class Hg(Fetch): bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) runfetchcmd(updatecmd, d) - updatecmd = self._buildhgcommand(ud, d, "update") - bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) - runfetchcmd(updatecmd, d) else: fetchcmd = self._buildhgcommand(ud, d, "fetch") bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) @@ -134,6 +131,12 @@ class Hg(Fetch): os.chdir(ud.pkgdir) bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % fetchcmd) runfetchcmd(fetchcmd, d) + + # Even when we clone (fetch), we still need to update as hg's clone + # won't checkout the specified revision if its on a branch + updatecmd = self._buildhgcommand(ud, d, "update") + bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) + runfetchcmd(updatecmd, d) os.chdir(ud.pkgdir) try: