How not to change revision in Git

36 views
Skip to first unread message

Takafumi Arakaki

unread,
Apr 19, 2013, 12:03:17 PM4/19/13
to sumatr...@googlegroups.com
Hi,

It seems that sumatra changes revision of git repository to head of master unconditionally.  Is there a way to suppress this behavior?

I quickly went through this thread but I can't find how the discussion ended:
https://groups.google.com/d/msg/sumatra-users/ZiGGwCN9m1g/MAx3r1JHyZ8J

--
Takafumi

Andrew Davison

unread,
Apr 22, 2013, 7:15:36 AM4/22/13
to sumatr...@googlegroups.com


On Friday, 19 April 2013 18:03:17 UTC+2, Takafumi Arakaki wrote:
It seems that sumatra changes revision of git repository to head of master unconditionally.  Is there a way to suppress this behavior?

This behaviour can be avoided using the Python API, but not using "smt run".

I've been thinking about changing this for some time, but I've held off since it is a backwards incompatible change. However, I think it is time to change this. I've created a ticket: http://neuralensemble.org/trac/sumatra/ticket/171

Essentially, this involves changing the default from "latest" to "current", i.e. Sumatra will not change the working copy, but will use whatever version is currently checkout out (and will return to this version after "smt repeat").

Can anyone see any potential problems with this change?

Cheers,

Andrew

Daniel Wheeler

unread,
Apr 22, 2013, 10:14:27 AM4/22/13
to sumatr...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "sumatra-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sumatra-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Wheeler

Daniel Wheeler

unread,
Apr 22, 2013, 10:32:10 AM4/22/13
to sumatr...@googlegroups.com
On Mon, Apr 22, 2013 at 7:15 AM, Andrew Davison <andrew....@unic.cnrs-gif.fr> wrote:


On Friday, 19 April 2013 18:03:17 UTC+2, Takafumi Arakaki wrote:
It seems that sumatra changes revision of git repository to head of master unconditionally.  Is there a way to suppress this behavior?

Can you set Sumatra to just store the diff "smt configure -c store-diff". That seems to prevent the checkout of master and use whichever is the working branch.


This behaviour can be avoided using the Python API, but not using "smt run".

I've been thinking about changing this for some time, but I've held off since it is a backwards incompatible change. However, I think it is time to change this. I've created a ticket: http://neuralensemble.org/trac/sumatra/ticket/171

Essentially, this involves changing the default from "latest" to "current", i.e. Sumatra will not change the working copy, but will use whatever version is currently checkout out (and will return to this version after "smt repeat").

Can anyone see any potential problems with this change?

No. I think you're right. Should use whatever working version is checked out.
 

--
Daniel Wheeler

Takafumi Arakaki

unread,
Apr 22, 2013, 11:00:15 AM4/22/13
to sumatr...@googlegroups.com
On Mon, Apr 22, 2013 at 4:32 PM, Daniel Wheeler
<daniel....@gmail.com> wrote:
>
>
>
> On Mon, Apr 22, 2013 at 7:15 AM, Andrew Davison
> <andrew....@unic.cnrs-gif.fr> wrote:
>>
>>
>>
>> On Friday, 19 April 2013 18:03:17 UTC+2, Takafumi Arakaki wrote:
>>>
>>> It seems that sumatra changes revision of git repository to head of
>>> master unconditionally. Is there a way to suppress this behavior?
>
>
> Can you set Sumatra to just store the diff "smt configure -c store-diff".
> That seems to prevent the checkout of master and use whichever is the
> working branch.

Thank you, this is a nice idea. I am wrapping "smt run" by my own CLI
so I can check if the working copy is dirty or not in this CLI. I
like this idea than using Python API because I want my program to be
well-separated from Sumatra (i.e., it should be runnable without
Sumatra).

>
>>
>> This behaviour can be avoided using the Python API, but not using "smt
>> run".
>>
>> I've been thinking about changing this for some time, but I've held off
>> since it is a backwards incompatible change. However, I think it is time to
>> change this. I've created a ticket:
>> http://neuralensemble.org/trac/sumatra/ticket/171
>>
>> Essentially, this involves changing the default from "latest" to
>> "current", i.e. Sumatra will not change the working copy, but will use
>> whatever version is currently checkout out (and will return to this version
>> after "smt repeat").
>>
>> Can anyone see any potential problems with this change?
>
>
> No. I think you're right. Should use whatever working version is checked
> out.
>
>
> --
> Daniel Wheeler
>

Daniel Wheeler

unread,
Apr 23, 2013, 10:39:00 AM4/23/13
to sumatr...@googlegroups.com
On Mon, Apr 22, 2013 at 11:00 AM, Takafumi Arakaki <aka...@gmail.com> wrote:


Thank you, this is a nice idea.  I am wrapping "smt run" by my own CLI
so I can check if the working copy is dirty or not in this CLI.  I
like this idea than using Python API because I want my program to be
well-separated from Sumatra (i.e., it should be runnable without
Sumatra).

Agreed. It is generally better not to use the API if possible.

--
Daniel Wheeler

Andrew Davison

unread,
Apr 30, 2013, 11:04:17 AM4/30/13
to sumatr...@googlegroups.com
On Monday, 22 April 2013 13:15:36 UTC+2, Andrew Davison wrote:
On Friday, 19 April 2013 18:03:17 UTC+2, Takafumi Arakaki wrote:
It seems that sumatra changes revision of git repository to head of master unconditionally.  Is there a way to suppress this behavior?

This behaviour can be avoided using the Python API, but not using "smt run".

I've been thinking about changing this for some time, but I've held off since it is a backwards incompatible change. However, I think it is time to change this. I've created a ticket: http://neuralensemble.org/trac/sumatra/ticket/171

I've now implemented this change. As of rev 9e5fd6c46ea3, "smt run" will never change the working copy.
Reply all
Reply to author
Forward
0 new messages