git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* StGIT 0.13 recognizes but not list packed StGIT controlled branches
@ 2007-11-18 23:05 Jakub Narebski
  2007-11-19  0:00 ` Junio C Hamano
  2007-11-19 11:20 ` Catalin Marinas
  0 siblings, 2 replies; 8+ messages in thread
From: Jakub Narebski @ 2007-11-18 23:05 UTC (permalink / raw)
  To: Catalin Marinas, git

I use Stacked GIT 0.13 with git 1.5.3.5 (and Python 2.4.3).
StGIT does recognize old StGIT branches (and converts them),
but "stg branch -l" list only one branch. I guess that is
cause by the fact that all the rest of branches are packed.

So the question is: how to unpack branches, and how to prevent
branches from being packed by "git-gc"?

Another StGIT question: how to check if given branch is controlled
by StGIT (needed for my bash prompt)?

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-18 23:05 StGIT 0.13 recognizes but not list packed StGIT controlled branches Jakub Narebski
@ 2007-11-19  0:00 ` Junio C Hamano
  2007-11-19 11:20 ` Catalin Marinas
  1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2007-11-19  0:00 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Catalin Marinas, git

Jakub Narebski <jnareb@gmail.com> writes:

> So the question is: how to unpack branches, and how to prevent
> branches from being packed by "git-gc"?

I am afraid that is a wrong question.  How long have we had the
packed-refs anyway?

The question is "How to get the list of refs from a Porcelain if
it wants to be compatible with GIT v1.4.4-rc1 (Nov 7, 2006) and
later?", and the answer is for-each-ref.

Having said that, you could explode it by hand like this:

	git for-each-ref --format='%(objectname) %(refname)' refs/heads |
	while read sha1 refname
        do
        	test -f "$GIT_DIR/$refname" || 
               	git update-ref "$refname" "$sha1"
	done                

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-18 23:05 StGIT 0.13 recognizes but not list packed StGIT controlled branches Jakub Narebski
  2007-11-19  0:00 ` Junio C Hamano
@ 2007-11-19 11:20 ` Catalin Marinas
  2007-11-19 11:57   ` Jakub Narebski
  1 sibling, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2007-11-19 11:20 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

On 18/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
> I use Stacked GIT 0.13 with git 1.5.3.5 (and Python 2.4.3).
> StGIT does recognize old StGIT branches (and converts them),
> but "stg branch -l" list only one branch. I guess that is
> cause by the fact that all the rest of branches are packed.

Have you tried the latest StGIT snapshot. We added support for this
and it will be available in 0.14 (to be released pretty soon).

> Another StGIT question: how to check if given branch is controlled
> by StGIT (needed for my bash prompt)?

'stg branch -l' lists the branches and marks those controlled by
StGIT. For a simple test, just use a command which would fail on
non-stgit branches (stg id base). Yet another way is to check for the
presence of '.git/patches/<branch>'.

-- 
Catalin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-19 11:20 ` Catalin Marinas
@ 2007-11-19 11:57   ` Jakub Narebski
  2007-11-19 13:15     ` Catalin Marinas
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2007-11-19 11:57 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Catalin Marinas wrote:
> On 18/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
>
> > I use Stacked GIT 0.13 with git 1.5.3.5 (and Python 2.4.3).
> > StGIT does recognize old StGIT branches (and converts them),
> > but "stg branch -l" list only one branch. I guess that is
> > cause by the fact that all the rest of branches are packed.
> 
> Have you tried the latest StGIT snapshot? We added support for this
> and it will be available in 0.14 (to be released pretty soon).

Would it work with Python 2.4.3? Yes, I know I should upgrade my
Linux distribution (I use now Aurox 11.1, which is based on Fedora
Core 4)...
 
> > Another StGIT question: how to check if given branch is controlled
> > by StGIT (needed for my bash prompt)?
> 
> 'stg branch -l' lists the branches and marks those controlled by
> StGIT. For a simple test, just use a command which would fail on
> non-stgit branches (stg id base). Yet another way is to check for the
> presence of '.git/patches/<branch>'.

Thanks. 'stg id base' is quite a lot slower than 
'test -e "$(git rev-parse --git-dir)/patches/$branch"', and it _does_
matter in prompt creating.

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-19 11:57   ` Jakub Narebski
@ 2007-11-19 13:15     ` Catalin Marinas
  2007-11-19 17:43       ` Jakub Narebski
  0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2007-11-19 13:15 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

On 19/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
> Catalin Marinas wrote:
> > On 18/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
> >
> > > I use Stacked GIT 0.13 with git 1.5.3.5 (and Python 2.4.3).
> > > StGIT does recognize old StGIT branches (and converts them),
> > > but "stg branch -l" list only one branch. I guess that is
> > > cause by the fact that all the rest of branches are packed.
> >
> > Have you tried the latest StGIT snapshot? We added support for this
> > and it will be available in 0.14 (to be released pretty soon).
>
> Would it work with Python 2.4.3? Yes, I know I should upgrade my
> Linux distribution (I use now Aurox 11.1, which is based on Fedora
> Core 4)...

Yes, it works with Python 2.4. We deprecated the Python 2.3 support.

-- 
Catalin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-19 13:15     ` Catalin Marinas
@ 2007-11-19 17:43       ` Jakub Narebski
  2007-11-19 17:51         ` Catalin Marinas
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2007-11-19 17:43 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

On Mon, 19 November 2007, Catalin Marinas wrote:
> On 19/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
>> Catalin Marinas wrote:
>>>
>>> Have you tried the latest StGIT snapshot? We added support for this
>>> and it will be available in 0.14 (to be released pretty soon).
>>
>> Would it work with Python 2.4.3? Yes, I know I should upgrade my
>> Linux distribution (I use now Aurox 11.1, which is based on Fedora
>> Core 4)...
> 
> Yes, it works with Python 2.4. We deprecated the Python 2.3 support.

I was worried that it would require Python 2.5 (IIRC some stgit RPM
had it in requires)


By the way, does StGIT write something meaningful by default in reflog
messages? Because now my reflog looks like this:

2162:[autoconf@git]# git reflog
407d6dc... HEAD@{0}: 
5a46eb5... HEAD@{1}: 
[...]
ea55960... HEAD@{15}: 
8f5d6b4... HEAD@{16}: 
15bb3f6... HEAD@{17}: checkout: moving from master to autoconf
8aff795... HEAD@{18}: pull origin: Merge made by recursive.

It would be really nice if StGIT wrote something meaningfull when
updating ref, like "stg refresh: <something>", or "stg rebase: <sth>"...

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-19 17:43       ` Jakub Narebski
@ 2007-11-19 17:51         ` Catalin Marinas
  2007-11-19 18:26           ` Jakub Narebski
  0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2007-11-19 17:51 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

On 19/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
> By the way, does StGIT write something meaningful by default in reflog
> messages? Because now my reflog looks like this:

No, it leaves it up to GIT to write whatever it finds appropriate.

> It would be really nice if StGIT wrote something meaningfull when
> updating ref, like "stg refresh: <something>", or "stg rebase: <sth>"...

There is the 'stg log [<patch>]' command which shows the changes to a
specific patch. You can run it with -d (for the diff) or -g (to invoke
gitk).

-- 
Catalin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches
  2007-11-19 17:51         ` Catalin Marinas
@ 2007-11-19 18:26           ` Jakub Narebski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2007-11-19 18:26 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Catalin Marinas wrote:
> On 19/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:
>>
>> By the way, does StGIT write something meaningful by default in reflog
>> messages? Because now my reflog looks like this:
> 
> No, it leaves it up to GIT to write whatever it finds appropriate.

But StGIT uses plumbing (or in the future perhaps PyGIT library).
And plumbing does not write by itself reflog messages. It is left
for porcelain (and StGIT being patch management interface is
porcelain) to provide reflog message in GIT_REFLOG_ACTION.

>> It would be really nice if StGIT wrote something meaningfull when
>> updating ref, like "stg refresh: <something>", or "stg rebase: <sth>"...
> 
> There is the 'stg log [<patch>]' command which shows the changes to a
> specific patch. You can run it with -d (for the diff) or -g (to invoke
> gitk).

If I remember correctly StGIT is made to be more friendly to and with
core-git. Providing reflog messages for "git reflog" / "git log -g"
would be nice.

Besides 'stg log [<patch>]' is a bit orthogonal: it describes history
of a patch, and I want history of HEAD or of branch head (with things
like refresh, new (!), goto, float / sink, rebase (!)).

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-19 18:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 23:05 StGIT 0.13 recognizes but not list packed StGIT controlled branches Jakub Narebski
2007-11-19  0:00 ` Junio C Hamano
2007-11-19 11:20 ` Catalin Marinas
2007-11-19 11:57   ` Jakub Narebski
2007-11-19 13:15     ` Catalin Marinas
2007-11-19 17:43       ` Jakub Narebski
2007-11-19 17:51         ` Catalin Marinas
2007-11-19 18:26           ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).