Bug 308493 - "tag" option doesn't work
Summary: "tag" option doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 14:39 UTC by David Faure
Modified: 2012-10-22 03:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2012-10-16 14:39:55 UTC
I want kdesrc-build to compile the 0.2.1 tag of zanshin, rather than the master branch.

I wrote this:

module-set
  repository kde-git
  use-modules [...] zanshin [...]
  branch master
end module-set

module zanshin
  tag 0.2.1
end module

Is this wrong because branch master then gets applied to zanshin?

Reproducible: Always

Steps to Reproduce:
I tried this too:


module-set
  repository kde-git
  use-modules zanshin
  tag 0.2.1
end module

What happens then is that it tries to get branch KDE/4.9 (from my global section).
I tried an empty branch line, then I get master.

Shouldn't tag and branch be mutually exclusive?
Am I wrong about the tag syntax? I saw "tag" in kdesrc-build's code, but maybe it's not supported with git?
Actual Results:  
The tag option seems to always be ignored

Expected Results:  
Should checkout the tag.
Comment 1 Michael Pyne 2012-10-16 23:13:52 UTC
Yes, in fact I thought this had been logged already (I "rediscovered" it when working on the HTTP proxy support by request).
Comment 2 Michael Pyne 2012-10-21 16:43:08 UTC
Git commit e3c41dafab0796cbf441c5dd52306db8e614dbf1 by Michael Pyne.
Committed on 21/10/2012 at 18:31.
Pushed by mpyne into branch 'master'.

Use 'tag' option when cloning git modules.

This partially implements bug 308493. To fully implement it will be
required to handle the case of an already-checked-out module (though
prepatory work is already complete).

M  +3    -0    doc/index.docbook
M  +8    -3    kdesrc-build

http://commits.kde.org/kdesrc-build/e3c41dafab0796cbf441c5dd52306db8e614dbf1
Comment 3 Michael Pyne 2012-10-22 03:47:33 UTC
Git commit c22b7b0653ae10fdb04b9991720ac5501c0b79c9 by Michael Pyne.
Committed on 22/10/2012 at 05:27.
Pushed by mpyne into branch 'master'.

Implement tag and revision options for git modules.

This makes the 'tag' option allow for checking out a given git tag for a
module (which is enforced by using refs/tags/$foo when passing to git).

Additionally, the 'revision' option has been adopted for git modules as
well, to allow for checking out any other git "tree-ish" that git
supports (i.e. anything supported by 'git checkout $foo').

Both options should leave the source directory in a detached HEAD state,
although kdesrc-build will adapt as necessary with each source update.

The auto-stashing is still attempted for both types, and a failure to
apply an auto-stashed change will cause the module to fail to build.
Ensure you're in a clean working directory if you want to avoid issues
due to this.

The test suite continues to pass (not that it's very extensive).
FIXED-IN:1.16

M  +9    -3    doc/index.docbook
M  +110  -35   kdesrc-build

http://commits.kde.org/kdesrc-build/c22b7b0653ae10fdb04b9991720ac5501c0b79c9