git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org
Subject: Re: StGit: kha/{safe,experimental} updated
Date: Tue, 20 May 2008 18:19:02 +0100	[thread overview]
Message-ID: <b0943d9e0805201019x10bf87ecr1c11c8ee474f6138@mail.gmail.com> (raw)
In-Reply-To: <20080520070441.GB7324@diana.vm.bytemark.co.uk>

2008/5/20 Karl Hasselström <kha@treskal.com>:
> The system I built works like this at install time:
>
>  i1. Create stgit/builtin_version.py, populated with git-describe
>      output.
>
>  i2. Install as usual.

Fine (with some notes for releases, see below).

> And at runtime:
>
>  r1. If we have a .git directory, ask git what version we are.
>      (Actually, we just try to run git describe and see if it
>      succeeds.)
>
>  r2. Otherwise, go with the built-in version (only works if
>      stgit/builtin_version.py exists).

OK.

> Now, as to released versions, you could simply plop a suitably
> prepared stgit/builtin_version.py in the tarball, and it'll all work.
> i1 should fail silently when run from an unpacked tarball, so i2 will
> pick up the builtin_version.py from the tarball. And at runtime, r1
> will fail and we'll fall back to r2.

I build release tarball from the directory under Git control and I
always get a builtin_version.py generated. In my initial patch I had a
check in setup.py for a .release file. I could add a check in
write_builtin_version to ignore the extra .git stuff if I am making a
release (only keep the tag name).

Another alternative is to check for the number of commits from the
latest tag and, if this is 0, simply ignore the Git id.

BTW, Git seems to use 6 characters for the current commit id and StGIT
5. Should we change this for consistency?

> Oh, and please consider making annotated release tags in the future.
> As is, I had to ask git-describe to look at unannotated tags as well,
> which won't be so good in case a developer uses those as a scratch pad
> while developing.

I always thought annotated tags are created by default. I'll do this
from now on.

-- 
Catalin

  reply	other threads:[~2008-05-20 17:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  1:43 StGit: kha/{safe,experimental} updated Karl Hasselström
2008-05-14  1:44 ` [StGit PATCH 1/2] Import version to a separate namespace Karl Hasselström
2008-05-14  1:47 ` [StGit PATCH 2/2] Better StGit version tracking Karl Hasselström
2008-05-14  1:49 ` [StGit PATCH] Emacs mode: automatically cd up to root of worktree Karl Hasselström
2008-05-14  7:38   ` David Kågedal
2008-05-14  8:13     ` Karl Hasselström
2008-05-14  1:49 ` [StGit PATCH] New command: stg redo Karl Hasselström
2008-05-19 21:21 ` StGit: kha/{safe,experimental} updated Catalin Marinas
2008-05-20  7:04   ` Karl Hasselström
2008-05-20 17:19     ` Catalin Marinas [this message]
2008-05-20 21:02       ` Karl Hasselström
2008-05-20 21:39         ` [StGit PATCH] Try the built-in version string before git-describe Karl Hasselström
2008-05-21 14:38           ` Catalin Marinas
2008-05-21 15:00             ` Karl Hasselström
2008-05-21 14:07         ` StGit: kha/{safe,experimental} updated Catalin Marinas
2008-05-21 14:58           ` Karl Hasselström
  -- strict thread matches above, loose matches on Subject: below --
2008-05-21  5:19 Karl Hasselström

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=b0943d9e0805201019x10bf87ecr1c11c8ee474f6138@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /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;
as well as URLs for NNTP newsgroup(s).