You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Alexis Midon (JIRA)" <ji...@apache.org> on 2008/12/02 00:06:44 UTC

[jira] Created: (BUILDR-222) Support Git as a version control system

Support Git as a version control system
---------------------------------------

                 Key: BUILDR-222
                 URL: https://issues.apache.org/jira/browse/BUILDR-222
             Project: Buildr
          Issue Type: Improvement
          Components: Core features
            Reporter: Alexis Midon


The Release task uses Subversion to check for uncommitted files and tag the source repository.
Of course this fails when your project does not use Subversion but Git for instance.

The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
A method could instantiate the proper implementation.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by Alexis Midon <al...@gmail.com>.
Alexis


On Tue, Dec 9, 2008 at 1:39 PM, Alexis Midon <al...@gmail.com> wrote:

>
> On Tue, Dec 9, 2008 at 11:55 AM, Assaf Arkin (JIRA) <ji...@apache.org>wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926]
>>
>> Assaf Arkin commented on BUILDR-222:
>> ------------------------------------
>>
>> Awesome. A few comments:
>>
>> When you call Git.commit, it supers into a "common" commit (but only for
>> SVN and Git, not Hg) which then subs through a bin method to perform the
>> actual command, which doesn't mean the same thing in all VCS. In terms of
>> readability, there's more code to deal with than if the commit method was
>> never shared.
>
>
> ok, I will push down the super implementation.
>
>
>>
>> Git.commit is sometimes commit, but sometimes it's pushes, which happens
>> to be closer in spirit to an SVN commit, which just means the method name is
>> not self-describing.
>
>
> any suggestions?
>
>
>
>>
>> Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option,
>> which in turn is only used once by Git's uncommitted_files method. Everybody
>> gets to share that code path, though. Much simpler is to have
>> uncommited_files deal with its own personal issues, changing its first line
>> to:
>>
>> status = `git status`
>>
>
> Actually I evaluated this option and found it not so great for testing. I
> can't see how to mock this shell call. I'm a bit uncomfortable with that.
>
>
>>
>> Git.applies_to? should look for .git (or .git/config) in the current
>> directory instead of running git branch. As a result of this change, you'll
>> only be able to make a release from a buildfile at the root of the project,
>> a good restriction to have.
>>
>
> Same issue for me here: testing/mocking. And the restriction you mentioned
> will not be valid  for Svn.
>
>

read "the restriction you mentioned *will be* valid  for Svn."


>
>
>
>>
>> Are both vcs and guess_vcs method necessary?
>
>
> Actually not. I will merge them.
>
>
>>
>> > Support Git as a version control system
>> > ---------------------------------------
>> >
>> >                 Key: BUILDR-222
>> >                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>> >             Project: Buildr
>> >          Issue Type: Improvement
>> >          Components: Core features
>> >            Reporter: Alexis Midon
>> >         Attachments: BUILDR-222-0001-git-support-for-release.txt
>> >
>> >
>> > The Release task uses Subversion to check for uncommitted files and tag
>> the source repository.
>> > Of course this fails when your project does not use Subversion but Git
>> for instance.
>> > The improvement could be to provide a VCS abstraction with 2
>> implementations: Subversion and Git.
>> > A method could instantiate the proper implementation.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>

Re: [jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by Alexis Midon <al...@gmail.com>.
Thanks Assaf.
I'm improving the patch.

Alexis


On Tue, Dec 9, 2008 at 1:57 PM, Assaf Arkin <ar...@intalio.com> wrote:

> On Tue, Dec 9, 2008 at 1:39 PM, Alexis Midon <al...@gmail.com>
> wrote:
> > On Tue, Dec 9, 2008 at 11:55 AM, Assaf Arkin (JIRA) <ji...@apache.org>
> wrote:
> >
> >>
> >>    [
> >>
> https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926
> ]
> >>
> >> Assaf Arkin commented on BUILDR-222:
> >> ------------------------------------
> >>
> >> Awesome. A few comments:
> >>
> >> When you call Git.commit, it supers into a "common" commit (but only for
> >> SVN and Git, not Hg) which then subs through a bin method to perform the
> >> actual command, which doesn't mean the same thing in all VCS. In terms
> of
> >> readability, there's more code to deal with than if the commit method
> was
> >> never shared.
> >
> >
> > ok, I will push down the super implementation.
> >
> >
> >>
> >> Git.commit is sometimes commit, but sometimes it's pushes, which happens
> to
> >> be closer in spirit to an SVN commit, which just means the method name
> is
> >> not self-describing.
> >
> >
> > any suggestions?
> >
> >
> >
> >>
> >> Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option,
> >> which in turn is only used once by Git's uncommitted_files method.
> Everybody
> >> gets to share that code path, though. Much simpler is to have
> >> uncommited_files deal with its own personal issues, changing its first
> line
> >> to:
> >>
> >> status = `git status`
> >>
> >
> > Actually I evaluated this option and found it not so great for testing. I
> > can't see how to mock this shell call. I'm a bit uncomfortable with that.
>
> You can define a method specifically for stubbing, that's different
> from overloading execute. Other options:
>
> -  open('|git status').read
> -  mock command line executable, point to it by setting ENV['PATH'] =
> Dir.pwd
>
> >> Git.applies_to? should look for .git (or .git/config) in the current
> >> directory instead of running git branch. As a result of this change,
> you'll
> >> only be able to make a release from a buildfile at the root of the
> project,
> >> a good restriction to have.
> >>
> >
> > Same issue for me here: testing/mocking. And the restriction you
> mentioned
> > will not be valid  for Svn.
>
> To mock you just need to create a .git/config file in the current
> working directory. You can do anything you want there, it's a
> temporary directory created only to run the test
>
> If you check that the URL returned from svn info ends in /trunk or
> /branch/name, you're limiting release to the project root. svn info on
> a sub-directory will return a different URL.
>
> Assaf
>
> >
> >
> >
> >>
> >> Are both vcs and guess_vcs method necessary?
> >
> >
> > Actually not. I will merge them.
> >
> >
> >>
> >> > Support Git as a version control system
> >> > ---------------------------------------
> >> >
> >> >                 Key: BUILDR-222
> >> >                 URL: https://issues.apache.org/jira/browse/BUILDR-222
> >> >             Project: Buildr
> >> >          Issue Type: Improvement
> >> >          Components: Core features
> >> >            Reporter: Alexis Midon
> >> >         Attachments: BUILDR-222-0001-git-support-for-release.txt
> >> >
> >> >
> >> > The Release task uses Subversion to check for uncommitted files and
> tag
> >> the source repository.
> >> > Of course this fails when your project does not use Subversion but Git
> >> for instance.
> >> > The improvement could be to provide a VCS abstraction with 2
> >> implementations: Subversion and Git.
> >> > A method could instantiate the proper implementation.
> >>
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> You can reply to this email to add a comment to the issue online.
> >>
> >>
> >
>

Re: [jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by Assaf Arkin <ar...@intalio.com>.
On Tue, Dec 9, 2008 at 1:39 PM, Alexis Midon <al...@gmail.com> wrote:
> On Tue, Dec 9, 2008 at 11:55 AM, Assaf Arkin (JIRA) <ji...@apache.org> wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926]
>>
>> Assaf Arkin commented on BUILDR-222:
>> ------------------------------------
>>
>> Awesome. A few comments:
>>
>> When you call Git.commit, it supers into a "common" commit (but only for
>> SVN and Git, not Hg) which then subs through a bin method to perform the
>> actual command, which doesn't mean the same thing in all VCS. In terms of
>> readability, there's more code to deal with than if the commit method was
>> never shared.
>
>
> ok, I will push down the super implementation.
>
>
>>
>> Git.commit is sometimes commit, but sometimes it's pushes, which happens to
>> be closer in spirit to an SVN commit, which just means the method name is
>> not self-describing.
>
>
> any suggestions?
>
>
>
>>
>> Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option,
>> which in turn is only used once by Git's uncommitted_files method. Everybody
>> gets to share that code path, though. Much simpler is to have
>> uncommited_files deal with its own personal issues, changing its first line
>> to:
>>
>> status = `git status`
>>
>
> Actually I evaluated this option and found it not so great for testing. I
> can't see how to mock this shell call. I'm a bit uncomfortable with that.

You can define a method specifically for stubbing, that's different
from overloading execute. Other options:

-  open('|git status').read
-  mock command line executable, point to it by setting ENV['PATH'] = Dir.pwd

>> Git.applies_to? should look for .git (or .git/config) in the current
>> directory instead of running git branch. As a result of this change, you'll
>> only be able to make a release from a buildfile at the root of the project,
>> a good restriction to have.
>>
>
> Same issue for me here: testing/mocking. And the restriction you mentioned
> will not be valid  for Svn.

To mock you just need to create a .git/config file in the current
working directory. You can do anything you want there, it's a
temporary directory created only to run the test

If you check that the URL returned from svn info ends in /trunk or
/branch/name, you're limiting release to the project root. svn info on
a sub-directory will return a different URL.

Assaf

>
>
>
>>
>> Are both vcs and guess_vcs method necessary?
>
>
> Actually not. I will merge them.
>
>
>>
>> > Support Git as a version control system
>> > ---------------------------------------
>> >
>> >                 Key: BUILDR-222
>> >                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>> >             Project: Buildr
>> >          Issue Type: Improvement
>> >          Components: Core features
>> >            Reporter: Alexis Midon
>> >         Attachments: BUILDR-222-0001-git-support-for-release.txt
>> >
>> >
>> > The Release task uses Subversion to check for uncommitted files and tag
>> the source repository.
>> > Of course this fails when your project does not use Subversion but Git
>> for instance.
>> > The improvement could be to provide a VCS abstraction with 2
>> implementations: Subversion and Git.
>> > A method could instantiate the proper implementation.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>

Re: [jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by Alexis Midon <al...@gmail.com>.
On Tue, Dec 9, 2008 at 11:55 AM, Assaf Arkin (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926]
>
> Assaf Arkin commented on BUILDR-222:
> ------------------------------------
>
> Awesome. A few comments:
>
> When you call Git.commit, it supers into a "common" commit (but only for
> SVN and Git, not Hg) which then subs through a bin method to perform the
> actual command, which doesn't mean the same thing in all VCS. In terms of
> readability, there's more code to deal with than if the commit method was
> never shared.


ok, I will push down the super implementation.


>
> Git.commit is sometimes commit, but sometimes it's pushes, which happens to
> be closer in spirit to an SVN commit, which just means the method name is
> not self-describing.


any suggestions?



>
> Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option,
> which in turn is only used once by Git's uncommitted_files method. Everybody
> gets to share that code path, though. Much simpler is to have
> uncommited_files deal with its own personal issues, changing its first line
> to:
>
> status = `git status`
>

Actually I evaluated this option and found it not so great for testing. I
can't see how to mock this shell call. I'm a bit uncomfortable with that.


>
> Git.applies_to? should look for .git (or .git/config) in the current
> directory instead of running git branch. As a result of this change, you'll
> only be able to make a release from a buildfile at the root of the project,
> a good restriction to have.
>

Same issue for me here: testing/mocking. And the restriction you mentioned
will not be valid  for Svn.



>
> Are both vcs and guess_vcs method necessary?


Actually not. I will merge them.


>
> > Support Git as a version control system
> > ---------------------------------------
> >
> >                 Key: BUILDR-222
> >                 URL: https://issues.apache.org/jira/browse/BUILDR-222
> >             Project: Buildr
> >          Issue Type: Improvement
> >          Components: Core features
> >            Reporter: Alexis Midon
> >         Attachments: BUILDR-222-0001-git-support-for-release.txt
> >
> >
> > The Release task uses Subversion to check for uncommitted files and tag
> the source repository.
> > Of course this fails when your project does not use Subversion but Git
> for instance.
> > The improvement could be to provide a VCS abstraction with 2
> implementations: Subversion and Git.
> > A method could instantiate the proper implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment: BUILDR-222-0003-git-support-for-release.txt

Complete patch updated with the code review feedback.
This patch also fixes BUILDR-223.

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt, BUILDR-222-0003-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672886#action_12672886 ] 

Alexis Midon commented on BUILDR-222:
-------------------------------------

According to this article [1], the way tags are done in the current patch might need to be adjusted.

[1] http://www.gitready.com/beginner/2009/02/03/tagging.html

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: BUILDR-222-0001-git-support-for-release.txt, BUILDR-222-0003-git-support-for-release.txt, BUILDR-222-0004-git-support-fir-release.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment:     (was: 0001-buildr-222_v1.patch)

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: 0001-buildr-222.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment: BUILDR-222-0004-git-support-fir-release.patch

A patch incorporating the latest remarks.

Now the Release class is subclassed twice, for Git and Svn.


> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt, BUILDR-222-0003-git-support-for-release.txt, BUILDR-222-0004-git-support-fir-release.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926 ] 

Assaf Arkin commented on BUILDR-222:
------------------------------------

Awesome. A few comments:

When you call Git.commit, it supers into a "common" commit (but only for SVN and Git, not Hg) which then subs through a bin method to perform the actual command, which doesn't mean the same thing in all VCS. In terms of readability, there's more code to deal with than if the commit method was never shared.

Git.commit is sometimes commit, but sometimes it's pushes, which happens to be closer in spirit to an SVN commit, which just means the method name is not self-describing.

Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option, which in turn is only used once by Git's uncommitted_files method. Everybody gets to share that code path, though. Much simpler is to have uncommited_files deal with its own personal issues, changing its first line to:

status = `git status`

Git.applies_to? should look for .git (or .git/config) in the current directory instead of running git branch. As a result of this change, you'll only be able to make a release from a buildfile at the root of the project, a good restriction to have.

Are both vcs and guess_vcs method necessary?

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment: BUILDR-222-0001-git-support-for-release.txt


Path to support both Git and Svn.

The Release task uses an abstraction of a VCS. Two implementations are provided: one for Svn, one for Git. The relevant implementation is picked at runtime.



> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment:     (was: BUILDR-222-0001-git-support-for-release.txt)

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment: 0001-buildr-222_v1.patch

same patch is available at github:
http://github.com/alexism/buildr/commits/BUILDR-222_v1

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: 0001-buildr-222_v1.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673036#action_12673036 ] 

alexismidon edited comment on BUILDR-222 at 2/12/09 11:51 AM:
---------------------------------------------------------------

same patch is available at github:
http://github.com/alexism/buildr/commits/BUILDR-222_v1


This patch contains:
 . create a list of available Release implementation so new impl could be dynamically added
 . better tagging,  http://www.gitready.com/beginner/2009/02/03/tagging.html
 . bug fix: push only the current branch
 . factorize some code

      was (Author: alexismidon):
    same patch is available at github:
http://github.com/alexism/buildr/commits/BUILDR-222_v1
  
> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: 0001-buildr-222_v1.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654733#action_12654733 ] 

alexismidon edited comment on BUILDR-222 at 12/9/08 12:53 AM:
---------------------------------------------------------------


Patch to support both Git and Svn.

The Release task uses an abstraction of a VCS. Two implementations are provided: one for Svn, one for Git. The relevant implementation is picked at runtime.



      was (Author: alexismidon):
    
Path to support both Git and Svn.

The Release task uses an abstraction of a VCS. Two implementations are provided: one for Svn, one for Git. The relevant implementation is picked at runtime.


  
> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment:     (was: BUILDR-222-0004-git-support-fir-release.patch)

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment: 0001-buildr-222.patch

integrate feedback from early testers.

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: 0001-buildr-222.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon updated BUILDR-222:
--------------------------------

    Attachment:     (was: BUILDR-222-0003-git-support-for-release.txt)

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-222) Support Git as a version control system

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655878#action_12655878 ] 

Assaf Arkin commented on BUILDR-222:
------------------------------------

The release process should update_to_version rather than commit_new_snapshot, since the later was clearly written for SVN.  Each source control module could then do what it thinks is best as part of that version update. Git could then commit only (which is not equivalent to SVN commit), or it could commit and push (which should not be done from a method labeled commit).

Similarly, the check_release method does what each source control module thinks is best for that particular source control system.  That's another place where the forced commonality breaks.  SVN's uncommitted file check identifies when you have local modifications and forces you to synchronize those through the central repository.  A Git uncommitted file check doesn't pack the same punch (git status != git diff master/origin), so abstracting that method as common behavior hides the fact that it checks two different things.

Last, Git/Svn are classes but they don't define any instance methods and are never instantiated; shouldn't these be modules?



> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>            Reporter: Alexis Midon
>         Attachments: BUILDR-222-0001-git-support-for-release.txt, BUILDR-222-0003-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-222) Support Git as a version control system

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert resolved BUILDR-222.
----------------------------------

    Resolution: Fixed

Patch applied.  Many thanks!

boisvert@sixtine:~/svn/buildr-222$ svn commit                                     
Sending        CHANGELOG
Sending        lib/buildr/core/build.rb
Sending        spec/core/build_spec.rb
Transmitting file data ...
Committed revision 749429.


> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: 0001-buildr-222.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-222) Support Git as a version control system

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-222:
---------------------------------

        Fix Version/s: 1.3.4
    Affects Version/s: 1.3.3

> Support Git as a version control system
> ---------------------------------------
>
>                 Key: BUILDR-222
>                 URL: https://issues.apache.org/jira/browse/BUILDR-222
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Core features
>    Affects Versions: 1.3.3
>            Reporter: Alexis Midon
>             Fix For: 1.3.4
>
>         Attachments: BUILDR-222-0001-git-support-for-release.txt, BUILDR-222-0003-git-support-for-release.txt, BUILDR-222-0004-git-support-fir-release.patch
>
>
> The Release task uses Subversion to check for uncommitted files and tag the source repository.
> Of course this fails when your project does not use Subversion but Git for instance.
> The improvement could be to provide a VCS abstraction with 2 implementations: Subversion and Git.
> A method could instantiate the proper implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.