[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] Use {git, hg, svn} commit id if available for xen_changeset
On Wed, 2013-05-08 at 12:17 +0100, Andrew Cooper wrote: > On 08/05/13 12:05, Ian Campbell wrote: > > On Wed, 2013-05-08 at 06:42 +0100, Marek Marczykowski wrote: > >> As Xen uses git as primary repository, get git commit id for > >> xen_changeset info. > > I applied this to an hg repo and: > > $ chmod +x xen/tools/scmversion > > $ rm xen/include/xen/compile.h > > $ make -C xen include/xen/compile.h > > make: Entering directory `/local/scratch/ianc/devel/xen-unstable.hg/xen' > > __ __ _ _ _____ _ _ _ > > \ \/ /___ _ __ | || | |___ / _ _ _ __ ___| |_ __ _| |__ | | ___ > > \ // _ \ '_ \ | || |_ |_ \ __| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ > > / \ __/ | | | |__ _| ___) |__| |_| | | | \__ \ || (_| | |_) | | __/ > > /_/\_\___|_| |_| |_|(_)____/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| > > > > make: Leaving directory `/local/scratch/ianc/devel/xen-unstable.hg/xen' > > $ grep CHANGESET xen/include/xen/compile.h > > #define XEN_CHANGESET " 2>/dev/null | tr -d n)" > > > > Same seems to happen for a git repo too so its not VCS specific. > > > > It also happens if I do an actual build rather than forcing things as > > above. > > > > Running scmversion by hand appears to produce good output. > > > > Indentation in svmversion seems a bit off though, e.g. > > + printf '%s %s%s' "$date" git: $head > > + > > + # Is this git on svn? > > + if git config --get svn-remote.svn.url >/dev/null; then > > + printf -- 'svn:%s' "`git svn find-rev $head`" > > + fi > > > > Seems to be tab vs space related, the printf is space indented and the > > rest is tab indented. > > > > Ian. > > Can I please re-request a merge of this change (which in itself is good > and fine) with > > http://lists.xen.org/archives/html/xen-devel/2012-07/msg01886.html I see that Ian J had a comment, was that addressed? > The reason is that the changeset information is *still broken* for an > out-of-scm builds such as RPMs and DEBs. > > I will happily rebase the above path on top of this one, if it is accepted. This patch includes handling of a ".scmversion" file in the tarball. I've no idea how to make git archive generate that but perhaps it would be possible for it to be created as part of our tarball generation process (Ian J CCd) and/or by RPM/DEB packaging. I did think git archive automatically added a .gitarchive file to the output, but my version doesn't seem to do that. If you want to address Ian's concern and rebase that may still be worthwhile. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |