Monticello: How to select/unselect changes to be committed?

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

Monticello: How to select/unselect changes to be committed?

Nick Chen
Hi

When I code, I usually make changes to multiple classes/methods/etc at a time. However, when I commit to Monticello, I would like to organize those changes by breaking them into logical chunks with meaningful commit messages.

Consider the following (trivial) example. Imagine that I would like to commit the change to buildMenuDockOn: in one commit and the change to buildStatusBarWith:on: in another commit. What is the easiest way to achieve this?

Monticello changes to be committed

Other version control systems allow you to selectively stage your changes before committing so I suspect that this should be doable with Monticello.

Thanks!

--
Nick
Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Lukas Renggli
You can't do it automatically from the GUI.

What I do sometimes as a workaround is to commit the package to a
temporary location (package cache), restore the old version, and
selectively load and commit the changes to the new location.

Lukas

On 9 May 2011 00:35, Nick Chen <[hidden email]> wrote:

> Hi
>
> When I code, I usually make changes to multiple classes/methods/etc at a
> time. However, when I commit to Monticello, I would like to organize those
> changes by breaking them into logical chunks with meaningful commit
> messages.
>
> Consider the following (trivial) example. Imagine that I would like to
> commit the change to buildMenuDockOn: in one commit and the change to
> buildStatusBarWith:on: in another commit. What is the easiest way to achieve
> this?
>
> http://forum.world.st/file/n3507981/Monticello.png
>
> Other version control systems allow you to selectively stage your changes
> before committing so I suspect that this should be doable with Monticello.
>
> Thanks!
>
> --
> Nick
>
> --
> View this message in context: http://forum.world.st/Monticello-How-to-select-unselect-changes-to-be-committed-tp3507981p3507981.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Lukas Renggli
Actually you don't need to save your code to a temporary location. It
is enough to opeb the changes dialog before you revert. Having the
temporary copy is only useful when you screw up.

Lukas

On Monday, 9 May 2011, Lukas Renggli <[hidden email]> wrote:

> You can't do it automatically from the GUI.
>
> What I do sometimes as a workaround is to commit the package to a
> temporary location (package cache), restore the old version, and
> selectively load and commit the changes to the new location.
>
> Lukas
>
> On 9 May 2011 00:35, Nick Chen <[hidden email]> wrote:
>> Hi
>>
>> When I code, I usually make changes to multiple classes/methods/etc at a
>> time. However, when I commit to Monticello, I would like to organize those
>> changes by breaking them into logical chunks with meaningful commit
>> messages.
>>
>> Consider the following (trivial) example. Imagine that I would like to
>> commit the change to buildMenuDockOn: in one commit and the change to
>> buildStatusBarWith:on: in another commit. What is the easiest way to achieve
>> this?
>>
>> http://forum.world.st/file/n3507981/Monticello.png
>>
>> Other version control systems allow you to selectively stage your changes
>> before committing so I suspect that this should be doable with Monticello.
>>
>> Thanks!
>>
>> --
>> Nick
>>
>> --
>> View this message in context: http://forum.world.st/Monticello-How-to-select-unselect-changes-to-be-committed-tp3507981p3507981.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Nick Chen
Lukas Renggli wrote
Actually you don't need to save your code to a temporary location. It
is enough to opeb the changes dialog before you revert. Having the
temporary copy is only useful when you screw up.

Lukas

On Monday, 9 May 2011, Lukas Renggli <[hidden email]> wrote:
> You can't do it automatically from the GUI.
>
> What I do sometimes as a workaround is to commit the package to a
> temporary location (package cache), restore the old version, and
> selectively load and commit the changes to the new location.
>
> Lukas
>

>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>

--
Lukas Renggli
www.lukas-renggli.ch
Hi Lukas

I opened the Changes dialog. And I made it unclossable just to be safe. So now I
have the list of all the changes. Then I revert back to an earlier version.

Can you elaborate more on what you mean by "selectively load and commit the
changes to the new location"? Do you mean copy-and-paste code from the Changes
dialog back to the reverted version? Or are you using some other tool to
selectively load those changes back in?

Thanks!


--
Nick
Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Lukas Renggli
In the context menu of each item there is the option to load the change.

Lukas

On 9 May 2011 18:06, Nick Chen <[hidden email]> wrote:

>
> Lukas Renggli wrote:
>>
>> Actually you don't need to save your code to a temporary location. It
>> is enough to opeb the changes dialog before you revert. Having the
>> temporary copy is only useful when you screw up.
>>
>> Lukas
>>
>> On Monday, 9 May 2011, Lukas Renggli &lt;[hidden email]&gt; wrote:
>>> You can't do it automatically from the GUI.
>>>
>>> What I do sometimes as a workaround is to commit the package to a
>>> temporary location (package cache), restore the old version, and
>>> selectively load and commit the changes to the new location.
>>>
>>> Lukas
>>>
>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>
> Hi Lukas
>
> I opened the Changes dialog. And I made it unclossable just to be safe. So
> now I
> have the list of all the changes. Then I revert back to an earlier version.
>
> Can you elaborate more on what you mean by "selectively load and commit the
> changes to the new location"? Do you mean copy-and-paste code from the
> Changes
> dialog back to the reverted version? Or are you using some other tool to
> selectively load those changes back in?
>
> Thanks!
>
>
> --
> Nick
>
> --
> View this message in context: http://forum.world.st/Monticello-How-to-select-unselect-changes-to-be-committed-tp3507981p3509665.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Nick Chen
Lukas Renggli wrote
In the context menu of each item there is the option to load the change.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
Hi Lukas

Ah, you must mean the "Install incoming version" item on the right-click menu!
Thanks.

There is a limitation with this approach that I discovered but it can be easily
overcome. Let me document it here in case other people stumbled upon this thread
in the future.

Installing incoming changes

Let's say that you have defined a new class and new methods for it. In the
screenshot above, I right-click on the change to the method. Then I select
"Install incoming version". However, this will throw a DNU error since the class
i.e. LanguageDesigner is new (notice the green tick by it). If you try to
install a class by right-clicking, you notice that none of the menu items are
available.

So you have the following situation: you want to install a new method but you
can't because the new class has not been defined yet. You can't install the new
class using the right-click menu because that option is not available.

The (simple) solution I have found is to copy the code to define a new class
i.e. "Object subclass: #..." and then DoIt. Now you have your new class defined
and you can do "Install incoming version" on the new method(s).

--
Nick
Reply | Threaded
Open this post in threaded view
|

Re: Monticello: How to select/unselect changes to be committed?

Lukas Renggli
> The (simple) solution I have found is to copy the code to define a new class
> i.e. "Object subclass: #..." and then DoIt. Now you have your new class
> defined
> and you can do "Install incoming version" on the new method(s).

I am using the old dialog, there you can install class definitions the
same way as you install method definitions.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch