Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] support/download/cvs: add support to use a date instead of a tag
Date: Mon, 04 May 2015 18:47:24 +0200	[thread overview]
Message-ID: <5547A29C.4020306@mind.be> (raw)
In-Reply-To: <CAHkwnC-_LJu5SbLiBJsmYHNM-nobLEuJ=z5rEUSPX3UA+QuGgQ@mail.gmail.com>

On 04/05/15 09:53, Fabio Porcedda wrote:
> On Sat, May 2, 2015 at 12:20 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> On 27/04/15 01:40, Fabio Porcedda wrote:
>>> This is useful when a tag is not avaiable.
>>
>>  Actually, we currently only support a date. The cvs co -r option has the
>> following syntax: -r tag[:date] - so we currently always interpret the version
>> as a date, since we put a : in front of it.
> 
> Where have you found such documentation? I've checked the "man cvs"
> but I've found only this:
> 
>   -r tag
> 
>          Use the revision specified by the tag argument ....

 I guess my Debian sid has a different cvs version. Mine is
1.12.13-MirDebian-11 - which seems to indicate that there could be some
Debian-specific patches in there.

 So this means that the current code simply doesn't work at all for you, right?

> 
> 
>>  The :date extension is only valid when the tag is not a tag but a branch. If
>> the tag is empty, it refers to the trunk.
>>
>>  AFAICS, the -D option is completely equivalent to -r :date .
>>
>>  I applied just the third patch of this series and could build expect successfully.
> 
> Are you sure about that? I've tried to download the source without
> using this patch but it fails:

 Yes I'm sure,

[snip]
>>> +if [[ ${rev} =~ ^[0-9] ]]; then
>>> +    # Date, because a tag cannot begin with a number
>>> +    select="-D ${rev}"
>>> +else
>>> +    # Tag
>>> +    select=-"r :${rev}"
>>
>>  Note that this won't work, since the space will be interpreted as a tag name.
>> It should be
>>
>>         select="-r :\"${rev}\""
>>
>> and remove the quotes from where ${select} is used.
>>
> 
> It fails on my pc (Fedora 22):
>>>> expect expect_5_45 Downloading
> rev: expect_5_45
> cvs [checkout aborted]: tag `:"expect_5_45"' must start with a letter

 Which kind of proves my point - the current situation doesn't work on F22.

> 
> e.g. it's works using this:
>              select=-"r ${rev}"
> 
> IMHO the simplest solution is:
> 
> +if [[ ${rev} =~ ^[0-9] ]]; then
> +    # Date, because a tag cannot begin with a number
> +    select="-D"
> +else
> +    # Tag
> +    select="-r"
> +fi
> +
> +export TZ=UCT

 Small nit: UCT is correct, but I see more people use UTC (which is also what
e.g. LANG=C date -u prints) so let's stick to that.

>  ${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
> -       co -d "${basename}" -r ":${rev}" -P "${rawname}"
> +       co -d "${basename}" ${select} "${rev}" -P "${rawname}"

 Looks good to me. Will you cook up a proper patch?

 It would be nice if it would be possible to give _both_ a branch and a date,
but that is probably pushing it a little - especially for a VCS that is almost
dead...


 Regards,
 Arnout

> 
> Thanks for reviewing
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2015-05-04 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26 23:40 [Buildroot] [PATCH 0/4] Use a date for cvs and bump expect Fabio Porcedda
2015-04-26 23:40 ` [Buildroot] [PATCH 1/4] support/download/cvs: add support to use a date instead of a tag Fabio Porcedda
2015-05-02 10:20   ` Arnout Vandecappelle
2015-05-04  7:53     ` Fabio Porcedda
2015-05-04 16:47       ` Arnout Vandecappelle [this message]
2015-05-06  9:19         ` Fabio Porcedda
2015-04-26 23:40 ` [Buildroot] [PATCH 2/4] manual: cvs: document that a date can be used " Fabio Porcedda
2015-04-26 23:40 ` [Buildroot] [PATCH 3/4] expect: bump to version 5.45.3 Fabio Porcedda
2015-05-02 10:21   ` Arnout Vandecappelle
2015-04-26 23:40 ` [Buildroot] [PATCH 4/4] manual: don't use a comment at the end of the version variable assignment Fabio Porcedda
2015-04-27 21:31   ` Thomas Petazzoni

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=5547A29C.4020306@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox