threads / discuss / 43206

stgit: No patches to pop

Subject: stgit: No patches to pop

## tl;dr

6 messages between Dec 11, 2006 and Dec 12, 2006.

replies: 5people: 3as markdown or json

Bahadir Balban· Dec 11, 2006, 14:32 UTC · lore
Hi,

I've just recently started using stgit (v0.11, git v1.4.3.4). On a test repository, I do:

% stg applied first second third

but when I pop I get:

% stg pop stg pop: No patches to pop

I also get things like:

% stg pop second popping patch "third"... done Now at patch "second"

Is this normal?
Thanks,
Catalin Marinas· Dec 11, 2006, 16:11 UTC · re: Bahadir Balban · lore

Re: stgit: No patches to pop

"Bahadir Balban" <bahadir.balban@gmail.com> wrote:
Show 12 quoted lines
> I've just recently started using stgit (v0.11, git v1.4.3.4). On a
> test repository, I do:
>
> % stg applied
> first
> second
> third
>
> but when I pop I get:
>
> % stg pop
> stg pop: No patches to pop

Can you write a list of commands or script so that I can easily reproduce this? It works OK for me.

Show 5 quoted lines
> I also get things like:
>
> % stg pop second
> popping patch "third"... done
> Now at patch "second"

In version 0.11, the "pop" command is equivalent to "goto". I changed this in the latest version (in the StGIT repository) so that "pop <patch>" tries to only extract that patch from the stack by popping all the patches to the given one and pushing them back without the one you specified. It also supports patch ranges (i.e. patch1..patch4).

Jakub Narebski· Dec 11, 2006, 16:20 UTC · re: Catalin Marinas · lore

Re: stgit: No patches to pop

Catalin Marinas wrote:
Show 11 quoted lines
>> I also get things like:
>>
>> % stg pop second
>> popping patch "third"... done
>> Now at patch "second"
> 
> In version 0.11, the "pop" command is equivalent to "goto". I changed
> this in the latest version (in the StGIT repository) so that "pop
> <patch>" tries to only extract that patch from the stack by popping
> all the patches to the given one and pushing them back without the one
> you specified. It also supports patch ranges (i.e. patch1..patch4).

That is kind of strange. Pop should work like pop does, for example the one in Perl or Python, removing n elements from the stack of applied patches. Not work as "float <patch>"...

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Bahadir Balban· Dec 11, 2006, 17:05 UTC · re: Jakub Narebski · lore

Re: stgit: No patches to pop

On 12/11/06, Jakub Narebski <jnareb@gmail.com> wrote:
Show 7 quoted lines
> That is kind of strange. Pop should work like pop does, for example
> the one in Perl or Python, removing n elements from the stack of applied
> patches. Not work as "float <patch>"...
> --
> Jakub Narebski
> Warsaw, Poland
> ShadeHawk on #git

As a new user my first expectation was as Catalin has revised. If it's going to stay as in 0.11 at least it would be nice to have it described in the wiki.

Thanks,
Catalin Marinas· Dec 12, 2006, 09:10 UTC · re: Bahadir Balban · lore

Re: stgit: No patches to pop

"Bahadir Balban" <bahadir.balban@gmail.com> wrote:
Show 12 quoted lines
> On 12/11/06, Jakub Narebski <jnareb@gmail.com> wrote:
>> That is kind of strange. Pop should work like pop does, for example
>> the one in Perl or Python, removing n elements from the stack of applied
>> patches. Not work as "float <patch>"...
>> --
>> Jakub Narebski
>> Warsaw, Poland
>> ShadeHawk on #git
>
> As a new user my first expectation was as Catalin has revised. If it's
> going to stay as in 0.11 at least it would be nice to have it
> described in the wiki.

It was already modified in the StGIT repository and I am won't revert it to the 0.11 functionality. Please feel free to modify the wiki (which is really out of date - "stg help <command>" has more up-to-date information).

Jakub Narebski· Dec 11, 2006, 22:54 UTC · lore

Re: stgit: No patches to pop

Catalin Marinas wrote:
Show 30 quoted lines
> On 11/12/06, Jakub Narebski <jnareb@gmail.com> wrote:
>> Catalin Marinas wrote:
>>
>>>> I also get things like:
>>>>
>>>> % stg pop second
>>>> popping patch "third"... done
>>>> Now at patch "second"
>>>
>>> In version 0.11, the "pop" command is equivalent to "goto". I changed
>>> this in the latest version (in the StGIT repository) so that "pop
>>> <patch>" tries to only extract that patch from the stack by popping
>>> all the patches to the given one and pushing them back without the one
>>> you specified. It also supports patch ranges (i.e. patch1..patch4).
>>
>> That is kind of strange. Pop should work like pop does, for example
>> the one in Perl or Python, removing n elements from the stack of applied
>> patches. Not work as "float <patch>"...
> 
> Probably I wasn't clear enough. The "pop" operations are as follows:
> 
> 1. "stg pop" only removes the top patch from the applied patches
> 2. "stg pop <patch>.." is equivalent to popping all patches to <patch>
> (including the latter)
> 3. "stg pop <patch>" is equivalent to "stg float <patch>; stg pop".
> 4. "stg pop <patch list or range>" is equivalent to "stg float <patch
> list or range>; stg pop <all the patches in the list or range>"
> 
> These feature was Yann's idea and I find it to be more in line with
> the "push" command.

Nice, and easy to understand. By the way, the same works with "stg push", doesn't it?

-- 
Jakub Narebski

← back to recent threads