Gofer git

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Gofer git

Stéphane Ducasse
Hi guys

I do not know if you noticed that with the latest version of Gofer you can get a full git behavior

Gofer new
        squeaksource: 'PharoTaskForces';
        addPackage: 'RPackage';
        pull

to pull all the packages pubslihed and fill up your local cache

Gofer new
        squeaksource: 'PharoTaskForces';
        addPackage: 'RPackage';
        push

to push your local saved versions to the repository....

Of course it means that you can build a database and when you run your script
the cache is checked first.... so yes you can work in the train :)

Tx lukas



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

SeanTAllen


On Wed, Dec 9, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]> wrote:
Hi guys

I do not know if you noticed that with the latest version of Gofer you can get a full git behavior

Gofer new
       squeaksource: 'PharoTaskForces';
       addPackage: 'RPackage';
       pull

to pull all the packages pubslihed and fill up your local cache

Gofer new
       squeaksource: 'PharoTaskForces';
       addPackage: 'RPackage';
       push

to push your local saved versions to the repository....

Of course it means that you can build a database and when you run your script
the cache is checked first.... so yes you can work in the train :)

Tx lukas

 
That is awesome. 

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Lukas Renggli
In reply to this post by Stéphane Ducasse
> I do not know if you noticed that with the latest version of Gofer you can get a full git behavior

Not full, but at least it mimics that Git syncs the local and remote
repositories.

> Gofer new
>        squeaksource: 'PharoTaskForces';
>        addPackage: 'RPackage';
>        pull

This operation is called #fetch in the latest Gofer, I renamed it
recently. This is how it is called originally in Git and it downloads
all versions to the local package cache.

> to pull all the packages pubslihed and fill up your local cache
>
> Gofer new
>        squeaksource: 'PharoTaskForces';
>        addPackage: 'RPackage';
>        push
>
> to push your local saved versions to the repository....

There is updated documentation in the class comment and on my blog
article at <http://www.lukas-renggli.ch/blog/gofer>.

> Of course it means that you can build a database and when you run your script
> the cache is checked first.... so yes you can work in the train :)

The reason why I didn't announce this, is because the current
implementation has serious problems that need to be fixed.

For example, reading from a remote repository that is not available
silently fails. Furthermore, to determine the latest version all
available versions from all repositories are merged, that is often not
desired.

I probably need to introduce some kind of a repository object where
the user can specify these things (consider cache or not, fail
silently or not, ...). Also there are no tests for any of this, so use
it at your own risk.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Adrian Kuhn
In reply to this post by Stéphane Ducasse
Stéphane Ducasse <stephane.ducasse@...> writes:

> I do not know if you noticed that with the latest version
> of Gofer you can get a full git behavior
>
> Tx lukas
>

Lukas, this is just plain awesome!

--AA


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Lukas Renggli
The latest version of Gofer should be more stable. I've rewritten most
internal implementation details, the tests should run faster and they
do not depend on an external repository anymore. Most of the core
functionality is now tested, not just things that are easy to test. I
did the following changes:

1. I've renamed #addPackage: and #addVersion: to #package: and
#version:. The #add: caused some confusion and people asked me what
was done at this point. Since this is just a plain specification of a
package or a version it is now called like that. It is also shorter.

2. Gofer doesn't support any longer to work on different repository
groups in one operation. I've never used it and it made the
implementation more complicated than necessary. The order in which
things are defined in Gofer doesn't matter anymore. The following
specification would try to operate on the packages Seaside2.8a1,
Scriptaculous and RSRSS2 in the repositories of Seaside and rsrss.

    Gofer new
        squeaksource: 'Seaside';
        package: 'Seaside2.8a1';
        package: 'Scriptaculous';
        squeaksource: 'rsrss';
        package: 'RSRSS2'

The above snipped is the same as the one below (which is the preferred
way of writing it):

    Gofer new
        squeaksource: 'Seaside';
        squeaksource: 'rsrss';
        package: 'Seaside2.8a1';
        package: 'Scriptaculous';
        package: 'RSRSS2'

3. Gofer prefers to load versions from faster repositories. The
package-cache and local file-directories have higher priority than
remote repositories.

4. Gofer implicitly declares the local package cache as a repository.
To disable this, send the message #disablePackageCache to the Gofer
instance.

5. Gofer throws errors if a repository is not reachable. To disable
this, send the message #disableRepositoryErrors to the Gofer instance.
The example below will silently load the latest Seaside version from
the package-cache, if the remote repository is not reachable (network
error, squeaksource down, invalid repositor):

    Gofer new
        disableRepositoryErrors;
        squeaksource: 'Seaside';
        package: 'Seaside2.8a1';
        load

6. The following command fetches all versions of SomePackage into the
local package-cache that are not downloaded yet:

    Gofer new
        squeaksource: 'repository';
        package: 'SomePackage';
        fetch

7. The following command commits all versions of SomePackage into the
remote repository that are not uploaded yet:

    Gofer new
        squeaksource: 'repository';
        package: 'SomePackage';
        fetch

8. Gofer has better support for FTP repositories:

    Gofer new
        url: 'ftp://wtf-is-ftp.com/code';
        ...

9. And local directories:

    Gofer new
        directory: '/home/renggli/repository';
        ...

10. And local directories with subdirectories:

    Gofer new
        directory: '/home/renggli/repository/*';
        ...

With all this new functionality there might be bugs :-)

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Peter Hugosson-Miller
Hmmm... Examples 6 and 7 look the same to me, care to explain further?

--
Cheers,
Peter.

On 14 dec 2009, at 09.11, Lukas Renggli <[hidden email]> wrote:

> The latest version of Gofer should be more stable. I've rewritten most
> internal implementation details, the tests should run faster and they
> do not depend on an external repository anymore. Most of the core
> functionality is now tested, not just things that are easy to test. I
> did the following changes:
>
> 1. I've renamed #addPackage: and #addVersion: to #package: and
> #version:. The #add: caused some confusion and people asked me what
> was done at this point. Since this is just a plain specification of a
> package or a version it is now called like that. It is also shorter.
>
> 2. Gofer doesn't support any longer to work on different repository
> groups in one operation. I've never used it and it made the
> implementation more complicated than necessary. The order in which
> things are defined in Gofer doesn't matter anymore. The following
> specification would try to operate on the packages Seaside2.8a1,
> Scriptaculous and RSRSS2 in the repositories of Seaside and rsrss.
>
>    Gofer new
>        squeaksource: 'Seaside';
>        package: 'Seaside2.8a1';
>        package: 'Scriptaculous';
>        squeaksource: 'rsrss';
>        package: 'RSRSS2'
>
> The above snipped is the same as the one below (which is the preferred
> way of writing it):
>
>    Gofer new
>        squeaksource: 'Seaside';
>        squeaksource: 'rsrss';
>        package: 'Seaside2.8a1';
>        package: 'Scriptaculous';
>        package: 'RSRSS2'
>
> 3. Gofer prefers to load versions from faster repositories. The
> package-cache and local file-directories have higher priority than
> remote repositories.
>
> 4. Gofer implicitly declares the local package cache as a repository.
> To disable this, send the message #disablePackageCache to the Gofer
> instance.
>
> 5. Gofer throws errors if a repository is not reachable. To disable
> this, send the message #disableRepositoryErrors to the Gofer instance.
> The example below will silently load the latest Seaside version from
> the package-cache, if the remote repository is not reachable (network
> error, squeaksource down, invalid repositor):
>
>    Gofer new
>        disableRepositoryErrors;
>        squeaksource: 'Seaside';
>        package: 'Seaside2.8a1';
>        load
>
> 6. The following command fetches all versions of SomePackage into the
> local package-cache that are not downloaded yet:
>
>    Gofer new
>        squeaksource: 'repository';
>        package: 'SomePackage';
>        fetch
>
> 7. The following command commits all versions of SomePackage into the
> remote repository that are not uploaded yet:
>
>    Gofer new
>        squeaksource: 'repository';
>        package: 'SomePackage';
>        fetch
>
> 8. Gofer has better support for FTP repositories:
>
>    Gofer new
>        url: 'ftp://wtf-is-ftp.com/code';
>        ...
>
> 9. And local directories:
>
>    Gofer new
>        directory: '/home/renggli/repository';
>        ...
>
> 10. And local directories with subdirectories:
>
>    Gofer new
>        directory: '/home/renggli/repository/*';
>        ...
>
> With all this new functionality there might be bugs :-)
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Lukas Renggli
Obviously a copy and paste error. It should be like this:

6. The following command downloads all versions of SomePackage from
the remote repository to the local package-cache, if not present yet:

   Gofer new
       squeaksource: 'repository';
       package: 'SomePackage';
       fetch

7. The following command uploads all versions of SomePackage from the
local package-cache to the remote repository, if not present yet:

   Gofer new
       squeaksource: 'repository';
       package: 'SomePackage';
       push

Better?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Gofer git

Peter Hugosson-Miller
Thanks, Lukas. Just checking that I hadn't missed something - not  
impossible before I've had my first coffee of the day ;-)

--
Cheers,
Peter.

On 14 dec 2009, at 09.27, Lukas Renggli <[hidden email]> wrote:

> Obviously a copy and paste error. It should be like this:
>
> 6. The following command downloads all versions of SomePackage from
> the remote repository to the local package-cache, if not present yet:
>
>   Gofer new
>       squeaksource: 'repository';
>       package: 'SomePackage';
>       fetch
>
> 7. The following command uploads all versions of SomePackage from the
> local package-cache to the remote repository, if not present yet:
>
>   Gofer new
>       squeaksource: 'repository';
>       package: 'SomePackage';
>       push
>
> Better?
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project