On 07/22/2016 07:11 AM, Peter Uhnak wrote:
On Fri, Jul 22, 2016 at 09:14:25PM +0800, Ben Coman wrote:
On Fri, Jul 22, 2016 at 3:11 PM, Peter Uhnak <i.uh...@gmail.com> wrote:
On Fri, Jul 22, 2016 at 11:55:46AM +0800, Ben Coman wrote:
I'm not sure what the roadmap is for git integration, but just a use case
that occurs to me while I work "a bit with git" for the first time from
Pharo.

I install a project via a Baseline from git and makes a small improvement.
What is the easiest way to contribute back?  I can't push back to the
personal repo I downloaded from, so the easiest thing would be a single
menu item to:
1. Fork original repository
2. Push current in-Image code to a new branch in that fork.

Maybe even...
3. Issue a pull request to the original repository.
This is indeed the idiomatic way to contribute on GitHub.

1. fork
2. install _your fork_ with gitfiletree/remote git repo
3. make an improvement (you can use master branch, since it's your repo, but 
that's a detail)
4. issue a pull request
That is how you do it if you *already* know you want to be contribute
to an application or package. But what if I was just planning to *use*
an application or package, only later I ended up tracing down a bug to
that application and fixed it.  What is the *easiest* for me to push
to my personal github account from where I make the Pull Request.
Something like this [1] from within Pharo (disclaimer, I've not
performed these action before, I had to hunt a bit to find it as an
example)...

This would depend a bit on how you installed the project to start with.

If you installed it with gitfiletree/remote git repo, then you can follow what 
you've just posted, because it's the same.

However if you installed it via the github:// protocol (or it was automatically 
pulled in via some other project's BaselineOf or ConfigurationOf),
then it's a bit of pain, because you can't just pull in another project with 
the same baseline (Metacello it thinks it's a different project).

Luckily, you should be able to explicitly permit the conflict:

Metacello new
        baseline: 'MyProject';
        repository: 'gitfiletree://wherever';
        onConflict: [:ex | ex allow ];
        load

We should be documenting these things somewhere…
Or create tools ... the Monticello Browser was created to manage Monticello packages and Pharo really needs a tool that manages projects --- not from the code browsing perspective, but from the Metacello project (baseline/configuration) management perspective --- I've mentioned this before and will probably mention it again:) ...

For tODE I've added a menu item to the `project list` that clones a `guthub://` project to the local disk, creates a new Metacello registration for the project, `locks` the project so that all references to the project moving forward will be mapped to your local clone, finally the working copy repository list is updated for each loaded package in the project so that it points to the git repo ... this is a hefty list of things that need to be done and a tool/gui is really needed to tie these kinds of operations up into a neat package ...

I've described this `project list` before and if you care you can probalby find an old email of mine where I go into a bit more detail about the types of things that you are going to need to do as you start doing serious development with git ...

I've been using git and Smalltalk for about 4 years now and there are a few lessons that I've learned along the way ... you'll want to take a slightly different route than what I've done, but it is really time to get serious about a 'Metacello Browser' of some kind ...

Dale

Reply via email to