From c009172f77549e385b9d79f15f181581c55e9909 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 11 May 2009 22:59:35 +0100 Subject: bitbake-dev: Sync with upstream Signed-off-by: Richard Purdie --- bitbake-dev/lib/bb/fetch/hg.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bitbake-dev/lib/bb/fetch/hg.py') diff --git a/bitbake-dev/lib/bb/fetch/hg.py b/bitbake-dev/lib/bb/fetch/hg.py index b87fd0fbe..f53be8b20 100644 --- a/bitbake-dev/lib/bb/fetch/hg.py +++ b/bitbake-dev/lib/bb/fetch/hg.py @@ -24,7 +24,7 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg). # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import sys import bb from bb import data @@ -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: -- cgit v1.2.3