From patchwork Wed Nov 12 12:09:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mads_Dor=C3=A9_Hansen?= X-Patchwork-Id: 409957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 9210A14009B for ; Wed, 12 Nov 2014 23:10:01 +1100 (AEDT) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 2CE233F992 for ; Wed, 12 Nov 2014 13:09:57 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from ispc7.dotserv.com (ssl7.dotserv.com [178.20.217.17]) by hugin.dotsrc.org (Postfix) with ESMTPS id 1CE7D3F992 for ; Wed, 12 Nov 2014 13:09:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ispc7.dotserv.com (Postfix) with ESMTP id 1072932C58 for ; Wed, 12 Nov 2014 13:09:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispc7.dotserv.com Received: from ispc7.dotserv.com ([127.0.0.1]) by localhost (ispc7.dotserv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wd5KdKKGpA4i for ; Wed, 12 Nov 2014 13:09:48 +0100 (CET) Received: from mdh-Latitude-E6430.prevas.se (unknown [81.216.59.226]) (Authenticated sender: dore@madsdore.dk) by ispc7.dotserv.com (Postfix) with ESMTPSA id 27CEC346C9 for ; Wed, 12 Nov 2014 13:09:48 +0100 (CET) From: =?UTF-8?q?Mads=20Dor=C3=A9?= To: dev@oe-lite.org Subject: [core] Fixed problem with fetching dirty HEAD with Git fetcher. Date: Wed, 12 Nov 2014 13:09:48 +0100 Message-Id: <1415794188-13481-1-git-send-email-dore@madsdore.dk> X-Mailer: git-send-email 2.1.3 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- lib/oelite/fetch/git.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/oelite/fetch/git.py b/lib/oelite/fetch/git.py index 1559d8d..52f3505 100644 --- a/lib/oelite/fetch/git.py +++ b/lib/oelite/fetch/git.py @@ -53,6 +53,11 @@ class GitFetcher(): self.signature_name += ";tag=" + self.tag if "branch" in uri.params: self.branch = uri.params["branch"] + i = bool(self.commit) + bool(self.tag) + bool(self.branch) + if i == 0: + self.branch = "HEAD" + if self.is_local and not hasattr(self, 'dirty'): + self.dirty = True if "dirty" in uri.params: if uri.params["dirty"] == "1": if not self.is_local: @@ -63,12 +68,7 @@ class GitFetcher(): self.uri, "can only fetch git dirty content from HEAD") self.dirty = True else: - self.dirty = False - i = bool(self.commit) + bool(self.tag) + bool(self.branch) - if i == 0: - self.branch = "HEAD" - if self.is_local and not hasattr(self, 'dirty'): - self.dirty = True + self.dirty = False elif i != 1: raise oelite.fetch.InvalidURI( self.uri, "cannot mix commit, tag and branch parameters")