From: Brendan Cully Subject: Re: Can the qemu-xen git repository be moved to a 'git://' protocol? It can save a lot of time... Date: Mon, 21 Sep 2009 19:00:10 -0700 Message-ID: <20090922020010.GB5022@kremvax.cs.ubc.ca> References: <8686c3cd0907160136n5ce18d54ncb2dbeecd3bcae1c@mail.gmail.com> <20090716230314.GC64261@zanzibar.kublai.com> <20090717171113.GA81140@zanzibar.ICSI.Berkeley.EDU> <4A78CB71.2080002@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7iMSBzlTiPOCCT2k" Return-path: Content-Disposition: inline In-Reply-To: <4A78CB71.2080002@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: tom.rotenberg@gmail.com, xen-devel@lists.xensource.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 04 August 2009 at 16:59, Jeremy Fitzhardinge wrote: > On 07/17/09 10:11, Brendan Cully wrote: > > Ah, wonderful. Would it make sense to use this tree by default? We can > > assume users already have hg working to pull the master tree, and it > > means one less confusing build tool. The git tree doesn't seem to me > > to offer any advantages over an hg mirror for the majority of users, > > but it does increase the number of complicated moving parts in an > > already difficult build system. > > > > +1. Presumably using something like the forest extension would help here. Mercurial 1.3 introduces subrepositories [1], which are ideal for this. You'd just create a .hgsub file in the xen root like ioemu-remote = http://xenbits.xensource.com/ext/qemu-xen-unstable.hg and whenever you commit in the main xen tree, hg records the version of the qemu tree in use automatically, and checks out the appropriate version whenever you hg update. Of course, this only works with 1.3+. In the meantime, here's a patch that imitates the qemu git Make logic for hg. [1] http://mercurial.selenic.com/wiki/subrepos --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hg-ioemu.patch" # HG changeset patch # User Brendan Cully # Date 1253584504 25200 # Node ID e9965de05705739487036b00039b8a7ee6ac5df5 # Parent 72d130772f36284b904da2369410de795237f712 Update Makefile to allow use of hg ioemu mirror. HG vs ioemu is controlled by setting QEMU_GIT to y or n. diff --git a/Config.mk b/Config.mk --- a/Config.mk +++ b/Config.mk @@ -142,18 +142,31 @@ # near the place in the Xen Makefiles where the file is used. # GIT protocol can be faster than HTTP, if your firewall lets it through. -# QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git -QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git +QEMU_GITURL=git://xenbits.xensource.com/qemu-xen-unstable.git +QEMU_HGURL ?= http://xenbits.xensource.com/ext/qemu-xen-unstable.hg + +# set to y to use the git tree +QEMU_GIT ?= n # Specify which qemu-dm to use. This may be `ioemu' to use the old -# Mercurial in-tree version, or a local directory, or a git URL. +# Mercurial in-tree version, or a local directory, or an HG URL, +# or a git URL if QEMU_GIT is y # CONFIG_QEMU ?= ../qemu-xen.git +ifeq (y,$(QEMU_GIT)) + QEMU_REMOTE ?= $(QEMU_GITURL) +else + QEMU_REMOTE ?= $(QEMU_HGURL) +endif CONFIG_QEMU ?= $(QEMU_REMOTE) -QEMU_TAG ?= 3de6cb51b19c46967cbc88ceb202b240c736eeca +QEMU_GIT_TAG ?= 3de6cb51b19c46967cbc88ceb202b240c736eeca # Fri Sep 11 18:34:25 2009 +0100 # Merge branch 'latara' +QEMU_HG_TAG ?= 586c7b21b88a +# Fri Sep 04 16:21:25 2009 +0100 +# graphics passthrough with VT-d + OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg # Build OCAML version of xenstored instead of the in-tree C version? diff --git a/config/StdGNU.mk b/config/StdGNU.mk --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -13,8 +13,9 @@ MSGFMT = msgfmt MSGMERGE = msgmerge -# Allow git to be wrappered in the environment +# Allow git/hg to be wrappered in the environment GIT ?= git +HG ?= hg INSTALL = install INSTALL_DIR = $(INSTALL) -d -m0755 -p diff --git a/tools/Makefile b/tools/Makefile --- a/tools/Makefile +++ b/tools/Makefile @@ -84,13 +84,20 @@ if [ ! -d ioemu-remote ]; then \ rm -rf ioemu-remote ioemu-remote.tmp; \ mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \ - $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \ - if [ "$(QEMU_TAG)" ]; then \ - cd ioemu-remote.tmp; \ - $(GIT) branch -D dummy >/dev/null 2>&1 ||:; \ - $(GIT) checkout -b dummy $(QEMU_TAG); \ - cd ..; \ - fi; \ + if [ "$(QEMU_GIT)" = y ]; then \ + $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \ + if [ "$(QEMU_GIT_TAG)" ]; then \ + cd ioemu-remote.tmp; \ + $(GIT) branch -D dummy >/dev/null 2>&1 ||:; \ + $(GIT) checkout -b dummy $(QEMU_GIT_TAG); \ + cd ..; \ + fi; \ + else \ + $(HG) clone $(CONFIG_QEMU) ioemu-remote.tmp; \ + if [ "$(QEMU_HG_TAG)" ]; then \ + $(HG) -R ioemu-remote.tmp update $(QEMU_HG_TAG); \ + fi; \ + fi; \ mv ioemu-remote.tmp ioemu-remote; \ fi; \ rm -f ioemu-dir; \ --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --7iMSBzlTiPOCCT2k--