All of lore.kernel.org
 help / color / mirror / Atom feed
* StGIT (or guilt) + git-svn?
@ 2007-07-24 10:20 Steven Grimm
  2007-07-24 11:27 ` Steven Walter
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Grimm @ 2007-07-24 10:20 UTC (permalink / raw)
  To: 'git'

Anyone have experience mixing git-svn with either StGIT or guilt? A 
coworker of mine was asking if he could do local versioning of files he 
has no intention of committing to svn. He wanted a ".git-svnignore" kind 
of scheme but I think his use case sounds like the sort of thing StGIT 
and guilt are designed for. What I'm not sure about is whether git-svn 
will confuse those tools or vice versa. I don't think I've ever seen 
that combo discussed on the list.

-Steve

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-24 10:20 StGIT (or guilt) + git-svn? Steven Grimm
@ 2007-07-24 11:27 ` Steven Walter
  2007-07-24 12:19   ` Steven Grimm
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Walter @ 2007-07-24 11:27 UTC (permalink / raw)
  To: Steven Grimm; +Cc: 'git'

On Tue, Jul 24, 2007 at 06:20:41PM +0800, Steven Grimm wrote:
> Anyone have experience mixing git-svn with either StGIT or guilt? A 
> coworker of mine was asking if he could do local versioning of files he 
> has no intention of committing to svn. He wanted a ".git-svnignore" kind 
> of scheme but I think his use case sounds like the sort of thing StGIT 
> and guilt are designed for. What I'm not sure about is whether git-svn 
> will confuse those tools or vice versa. I don't think I've ever seen 
> that combo discussed on the list.
> 
> -Steve

Well, I can say that stgit and git-svn in no way interfere with each
other.  I tend to use stgit to clean up my patch sets before commiting
them, and have never had a problem.  Thinking about what the tools do, I
can't imagine that it would cause a problem.

That said, I'm not sure that stgit will help you with "local versioning"
of files (I'm not even sure what you mean).  Perhaps you can elaborate
on this point.
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
   -Robert Heinlein

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-24 11:27 ` Steven Walter
@ 2007-07-24 12:19   ` Steven Grimm
  2007-07-24 19:39     ` Josef Sipek
  2007-07-24 23:48     ` Steven Walter
  0 siblings, 2 replies; 7+ messages in thread
From: Steven Grimm @ 2007-07-24 12:19 UTC (permalink / raw)
  To: Steven Walter; +Cc: 'git'

Steven Walter wrote:
> That said, I'm not sure that stgit will help you with "local versioning"
> of files (I'm not even sure what you mean).  Perhaps you can elaborate
> on this point.
>   

He wants to create some files in his git-svn clone and use git to manage 
them -- checkpointing his work in progress, backing out changes, etc., 
without publishing those files to the svn repository. The files in 
question are not already in svn. But he does want to work on other files 
that *are* in the svn repository, and wants those changes to be 
committed back.

So my assumption was that he would do something like maintain his 
local-only changes as StGIT patches that never get committed to git. His 
other changes would get committed from StGIT to git, and from there he'd 
do his normal git-svn dcommit. Or maybe git-svn dcommit followed by stg 
rebase since git-svn dcommit creates new revision IDs.

In any event, now that I know it's working successfully for at least one 
person, I'll point him to stg and he can play with it a bit. Didn't want 
to lead him into a dead end. Thanks!

-Steve

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-24 12:19   ` Steven Grimm
@ 2007-07-24 19:39     ` Josef Sipek
  2007-07-24 23:48     ` Steven Walter
  1 sibling, 0 replies; 7+ messages in thread
From: Josef Sipek @ 2007-07-24 19:39 UTC (permalink / raw)
  To: Steven Grimm; +Cc: Steven Walter, 'git'

On Tue, Jul 24, 2007 at 08:19:23PM +0800, Steven Grimm wrote:
> Steven Walter wrote:
> >That said, I'm not sure that stgit will help you with "local versioning"
> >of files (I'm not even sure what you mean).  Perhaps you can elaborate
> >on this point.
> >  
> 
> He wants to create some files in his git-svn clone and use git to manage 
> them -- checkpointing his work in progress, backing out changes, etc., 
> without publishing those files to the svn repository. The files in 
> question are not already in svn. But he does want to work on other files 
> that *are* in the svn repository, and wants those changes to be 
> committed back.
> 
> So my assumption was that he would do something like maintain his 
> local-only changes as StGIT patches that never get committed to git. His 
> other changes would get committed from StGIT to git, and from there he'd 
> do his normal git-svn dcommit. Or maybe git-svn dcommit followed by stg 
> rebase since git-svn dcommit creates new revision IDs.
> 
> In any event, now that I know it's working successfully for at least one 
> person, I'll point him to stg and he can play with it a bit. Didn't want 
> to lead him into a dead end. Thanks!

If I understand your scenario correctly, guilt will work just as well.

Josef 'Jeff' Sipek.

-- 
All science is either physics or stamp collecting.
		- Ernest Rutherford

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-24 12:19   ` Steven Grimm
  2007-07-24 19:39     ` Josef Sipek
@ 2007-07-24 23:48     ` Steven Walter
  2007-07-25  6:35       ` Steven Grimm
  1 sibling, 1 reply; 7+ messages in thread
From: Steven Walter @ 2007-07-24 23:48 UTC (permalink / raw)
  To: Steven Grimm; +Cc: Steven Walter, 'git'

On Tue, Jul 24, 2007 at 08:19:23PM +0800, Steven Grimm wrote:
> He wants to create some files in his git-svn clone and use git to manage 
> them -- checkpointing his work in progress, backing out changes, etc., 
> without publishing those files to the svn repository. The files in 
> question are not already in svn. But he does want to work on other files 
> that *are* in the svn repository, and wants those changes to be 
> committed back.
> 
> So my assumption was that he would do something like maintain his 
> local-only changes as StGIT patches that never get committed to git. His 
> other changes would get committed from StGIT to git, and from there he'd 
> do his normal git-svn dcommit. Or maybe git-svn dcommit followed by stg 
> rebase since git-svn dcommit creates new revision IDs.

You certainly could do local versioning this way, but it isn't how I
accomplish the same thing.  I keep another branch on top of my "public"
svn commits for local stuff.  If I always run git-svn dcommit from the
public branch, the local changes will stay local.  After committing, I
just have to rebase the local branch on onto git-svn.
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
   -Robert Heinlein

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-24 23:48     ` Steven Walter
@ 2007-07-25  6:35       ` Steven Grimm
  2007-07-25 22:25         ` Steven Walter
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Grimm @ 2007-07-25  6:35 UTC (permalink / raw)
  To: Steven Walter; +Cc: 'git'

Steven Walter wrote:
> You certainly could do local versioning this way, but it isn't how I
> accomplish the same thing.  I keep another branch on top of my "public"
> svn commits for local stuff.  If I always run git-svn dcommit from the
> public branch, the local changes will stay local.  After committing, I
> just have to rebase the local branch on onto git-svn.

Do you mix your public and private commits on the private branch, then 
cherry-pick some of them over to the public branch before running 
dcommit? Or do you have some other workflow?

That was actually my first suggestion to him, but he pointed out (and I 
had to agree) that that would mean he's always just one mistake away 
from publishing his local changes. All it takes is getting interrupted 
for a moment and mistakenly thinking he already switched to the public 
branch. He wants some less human-error-prone way to tell the system that 
a particular change and/or a particular file is not intended for 
publication, and for the system to just honor that without further human 
intervention.

Actually, one could argue that the above isn't a git-svn issue at all. 
You could reasonably want the same thing from git-push too (and even 
from pull, though that'd be trickier.) I guess it'd take the form of 
marking a commit as local-only, and having the system automatically 
rebase all the local-only commits on top of the public ones.

Maybe a wrapper than maintains a pair of underlying git branches for 
each user-visible branch would work. If you have a branch "foo" with 
some public and some private changes (private ones in lower case here):

A---B---C---D---e---f---g   foo
            ^ foo-public

Now if you commit a new private revision, it's like normal:

A---B---C---D---e---f---g---h   foo
            ^ foo-public

But if you commit a new public revision, we do something like

git commit
git checkout foo-public
git cherry-pick foo
git checkout foo
git rebase foo-public

to get

A---B---C---D---H---e---f---g   foo
                ^ foo-public

Then, when it comes time to do the push / dcommit, we always switch to 
the foo-public branch first. We push / dcommit, then checkout foo and 
rebase it on foo-public again (since svn dcommit will leave foo-public 
pointing at a different revision.)

This seems like it should work in the context of git-svn with its 
mostly-linear history. Not sure if it'd fall flat on its face in the 
presence of lots of branching and merging.

I also suspect I've more or less just described StGIT and this would be 
a big waste of time to reinvent from scratch.

-Steve

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

* Re: StGIT (or guilt) + git-svn?
  2007-07-25  6:35       ` Steven Grimm
@ 2007-07-25 22:25         ` Steven Walter
  0 siblings, 0 replies; 7+ messages in thread
From: Steven Walter @ 2007-07-25 22:25 UTC (permalink / raw)
  To: Steven Grimm; +Cc: Steven Walter, 'git'

On Wed, Jul 25, 2007 at 02:35:16PM +0800, Steven Grimm wrote:
> Do you mix your public and private commits on the private branch, then 
> cherry-pick some of them over to the public branch before running 
> dcommit? Or do you have some other workflow?

Yes, what you describe is what I usually do.

> That was actually my first suggestion to him, but he pointed out (and I 
> had to agree) that that would mean he's always just one mistake away 
> from publishing his local changes. All it takes is getting interrupted 
> for a moment and mistakenly thinking he already switched to the public 
> branch. He wants some less human-error-prone way to tell the system that 
> a particular change and/or a particular file is not intended for 
> publication, and for the system to just honor that without further human 
> intervention.

If I wanted to be argumentative, you're still only one step from
disaster with stgit.  In order to build, you'd have to keep your local
changes applied.  If you forgot to pop them before a dcommit, they would
be published.

> Actually, one could argue that the above isn't a git-svn issue at all. 
> You could reasonably want the same thing from git-push too (and even 
> from pull, though that'd be trickier.) I guess it'd take the form of 
> marking a commit as local-only, and having the system automatically 
> rebase all the local-only commits on top of the public ones.
> 
> Maybe a wrapper than maintains a pair of underlying git branches for 
> each user-visible branch would work. If you have a branch "foo" with 
> some public and some private changes (private ones in lower case here):
> 
> A---B---C---D---e---f---g   foo
>            ^ foo-public
> 
> Now if you commit a new private revision, it's like normal:
> 
> A---B---C---D---e---f---g---h   foo
>            ^ foo-public
> 
> But if you commit a new public revision, we do something like
> 
> git commit
> git checkout foo-public
> git cherry-pick foo
> git checkout foo
> git rebase foo-public
> 
> to get
> 
> A---B---C---D---H---e---f---g   foo
>                ^ foo-public
> 
> Then, when it comes time to do the push / dcommit, we always switch to 
> the foo-public branch first. We push / dcommit, then checkout foo and 
> rebase it on foo-public again (since svn dcommit will leave foo-public 
> pointing at a different revision.)
> 
> This seems like it should work in the context of git-svn with its 
> mostly-linear history. Not sure if it'd fall flat on its face in the 
> presence of lots of branching and merging.
> 
> I also suspect I've more or less just described StGIT and this would be 
> a big waste of time to reinvent from scratch.

This actually sounds fairly useful, as it's mostly the automation of my
existing workflow.  Let me know if you follow up on this.
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
   -Robert Heinlein

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

end of thread, other threads:[~2007-07-25 22:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-24 10:20 StGIT (or guilt) + git-svn? Steven Grimm
2007-07-24 11:27 ` Steven Walter
2007-07-24 12:19   ` Steven Grimm
2007-07-24 19:39     ` Josef Sipek
2007-07-24 23:48     ` Steven Walter
2007-07-25  6:35       ` Steven Grimm
2007-07-25 22:25         ` Steven Walter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.