After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345282 - Need support for non-default heads/tags in GIT
Need support for non-default heads/tags in GIT
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Frederic Peters
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2006-06-19 06:49 UTC by James Henstridge
Modified: 2007-12-18 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preliminary patch, XXX to be checked (3.00 KB, patch)
2007-12-18 11:39 UTC, Frederic Peters
needs-work Details | Review
support for branches (3.65 KB, patch)
2007-12-18 14:28 UTC, Frederic Peters
none Details | Review

Description James Henstridge 2006-06-19 06:49:36 UTC
GIT allows you to manage multiple heads in a single repository (essentially different branches using the same storage).

The current GIT code only handles building the default head of a repository, which is okay right now, but will be a problem when we e.g. need to use a branch of cairo.

We need support for:
 1. checking out a non-default head or tag
 2. updating a working tree for a non-default head or tag
 3. switching a working tree to a different head or tag
Comment 1 Frederic Peters 2007-12-18 11:39:24 UTC
Created attachment 101169 [details] [review]
preliminary patch, XXX to be checked

I left a few XXX in the file, where my (non-)knowledge of git is a problem.  Could someone look at them and fill the blanks ? :)
Comment 2 Frederic Peters 2007-12-18 14:28:00 UTC
Created attachment 101183 [details] [review]
support for branches

It seems to work now (tested with cairomm, switching between its master and cairomm-1.2 branches).  It doesn't have support for tags, and that would be useful.
Comment 3 Frederic Peters 2007-12-18 15:08:29 UTC
2007-12-18  Frederic Peters  <fpeters@0d.be>

        * jhbuild/versioncontrol/git.py, modulesets/moduleset.dtd: added
        support for git branches and tags (branches are handled by the revision
        attribute to mimic CVS and Subversion support, tags are handled by the
        new tag attribute).  (closes: #345282)

Examples of branch and tag support:

  <autotools id="cairomm">
    <branch repo="git.freedesktop.org" revision="cairomm-1.2" />
    <dependencies>
      <dep package="cairo"/>
    </dependencies>
  </autotools>

  <autotools id="cairomm">
    <branch repo="git.freedesktop.org" revision="v1.4.6" />
    <dependencies>
      <dep package="cairo"/>
    </dependencies>
  </autotools>