From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>,
"Keir (Xen.org)" <keir@xen.org>,
Marek Marczykowski <marmarek@invisiblethingslab.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] Use {git, hg, svn} commit id if available for xen_changeset
Date: Wed, 8 May 2013 12:59:45 +0100 [thread overview]
Message-ID: <518A3E31.2000501@citrix.com> (raw)
In-Reply-To: <1368012397.26321.243.camel@zakaz.uk.xensource.com>
On 08/05/13 12:26, Ian Campbell wrote:
> 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?
It was addressed in so far as I stated that it didn't get executed
multiple times. The archives seem to have broken the thread of
conversation, which had an extra back-and-forth on it.
>
>> 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.
>
A sample .hg_archival.txt is:
repo: 6ed20573be52baab95207f52a8d28084f3a1967c
node: 3a180a46d747dddf77e9bc987f216aaeb84adea7
branch: default
latesttag: v2.3.0
latesttagdistance: 45
Which is sadly not enough to recreate the <rev>:<shorthash> changeset
string for HG.
For the background of this patch, XenServer uses a patchqueue. I have
specifically listed the base and pq versions separately, as the
changeset information for an `hg archive` of a base repo with a pushed
queue is functionally useless after either of the base or patch queue
gets changed.
~Andrew
next prev parent reply other threads:[~2013-05-08 11:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 5:42 [PATCH v2] Use {git, hg, svn} commit id if available for xen_changeset Marek Marczykowski
2013-05-08 11:05 ` Ian Campbell
2013-05-08 11:17 ` Andrew Cooper
2013-05-08 11:26 ` Ian Campbell
2013-05-08 11:59 ` Andrew Cooper [this message]
2013-05-08 12:05 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518A3E31.2000501@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=keir@xen.org \
--cc=linux@eikelenboom.it \
--cc=marmarek@invisiblethingslab.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.