nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [patch] letting autoconf brand a build from SVN


From: Eitan Adler
Subject: Re: [Nano-devel] [patch] letting autoconf brand a build from SVN
Date: Tue, 7 Apr 2015 23:52:34 -0400

On 7 April 2015 at 16:12, Benno Schulenberg <address@hidden> wrote:
>
> On Tue, Apr 7, 2015, at 17:35, Eitan Adler wrote:
>> On 3 April 2015 at 07:02, Benno Schulenberg <address@hidden> wrote:
>> > Now that the compile time has disappeared from the version string,
>> > it would be nice if there were some other and better way to identify
>> > a build from SVN.  The patch below achieves this for me, but surely
>> > there are things wrong with it.  Mike, Kamil, Eitan, Jordi?  Is this
>> > portable enough?  And what can be improved?
>>
>> Overall this is a good idea.  I did not yet test the patch (my
>> development computer has some issues).  It would be nice to support
>> git-svn in addition to pure svn.
>
> Yes, that would be cool.  If you could tell me how, because I've never
> gotten around to running git on svn, as I'm quite used to svn.

I am not certain if this is the best way, but I think this will work:

[ -e $(git rev-parse --show-toplevel 2>/dev/null)/.git/svn ] && git
svn find-rev HEAD

>
>> >         /* Add a space after the version message, and account for both
>> >          * it and the two spaces before it. */
>> > -       mvwaddnstr(topwin, 0, 2, PACKAGE_STRING,
>> > -               actual_x(PACKAGE_STRING, verlen));
>> > +       mvwaddnstr(topwin, 0, 2, BRANDING, actual_x(BRANDING, verlen));
>>
>> I don't believe there is enough context here, but is verlen correct?
>
> Further up:
>     size_t verlen = strlenpt(PACKAGE_STRING) + 1;

I suspected as such, but wanted to verify.

> Hm, yes.  But who will do that?  Because a subsequent make
> will have to be done in the main dir of the source tree, and
> if you have to be there anyway...
>
> Also, the inclusion of the current version number (after an
> svn up) will only work if you first touch configure.ac.  So
> it's not foolproof, but on a fresh checkout and with the
> fully standard ./configure && ... it will work.

Good points.



-- 
Eitan Adler



reply via email to

[Prev in Thread] Current Thread [Next in Thread]