From: jean-luc malet <jeanluc.malet@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git <git@vger.kernel.org>
Subject: Re: git svn : some feedback and wonder...
Date: Tue, 12 May 2009 13:52:13 +0200 [thread overview]
Message-ID: <1de9d39c0905120452n167a8de2w378f39140946559d@mail.gmail.com> (raw)
In-Reply-To: <4A08A294.1060100@gmail.com>
ok now I get it... I understand what is happening
here is what I perform :
$git svn clone http://myurl/git-svn-test --prefix=svn/ -s
$git svn branch againnewtest
1) at the end of clone step the local tree is in the same state than
the last revision of svn repository
2) git's master branch isn't linked to the trunk (thus if you do a git
svn dcommit at this step after adding / modifying local files the
result is unexpected)
3) the git svn branch againnewtest perform a branch on the lastest
revision of svn repository (in my case a work on a branch) and not a
branch on the trunk
what I would have expected :
either the master branch created to track svn/trunk, or the master
branch to contain no file at all (thus obliging the user to create a
local traking branch on trunk) but not the current state that is
confusing (the user do an ls and see that there are file, do a git
branch and see that he is on master, then think that he's working on
the trunk, and that when do the git svn branch newbranch he think it
will branch the trunk, but in fact he branch the lastest revision
which can be anything according to the time the clone was performed
and the user commits)
best regards
JLM
On Tue, May 12, 2009 at 12:11 AM, MALET Jean-Luc
<jeanluc.malet@gmail.com> wrote:
> Michael J Gruber wrote:
>>
>> jean-luc malet venit, vidit, dixit 11.05.2009 17:52:
>>
>>>
>>> hi
>>> I'm just toying with git svn....
>>> so I have an svn repository and I do a git svn clone -s
>>> http://path.to/my/repository
>>> here all is fine it checkout my trunk into master branch
>>>
>>> 1) when I do a git branch -a, it show 2 branches : master and trunk,
>>> shouldn't it be master and svn/trunk?
>>>
>>
>> No. Not unless you said --prefix=svn during clone.
>>
>>
>>>
>>> 2) when I create a branch using git svn branch it create an empty
>>> directory and not as expected a branch from the current revision of
>>> trunk
>>>
>>
>> I get a branch as you expect. Can you repeat the commands which
>> generated an unexpected result for you?
>>
>>
>>>
>>> 3) the branch appears in git branch -a without a remote
>>> information.... not easy to track
>>>
>>
>> See 1)
>>
>>
>>>
>>> 4) you can't do git branch --track newbranch (where new branch is the
>>> svn branch), since the branch name isn't prefixed by svn/ you can't
>>> reuse the same name
>>>
>>
>> You certainly can create a local branch with the same name. I just did.
>> I always do. If b is that name, say
>>
>> git branch --track b remotes/b
>>
>> unless you have used --prefix, of course.
>>
>>
>>>
>>> 5) why having called dcommit instead of push? it would have been more
>>> understable (more coherent) git svn push would have pushed current
>>> branch on corresponding svn branch and git svn push somebranch would
>>> have do a git svn branch followed by the commits...
>>>
>>
>> The latter would be inconsistent with git push as well.
>>
>> Dcommit may be for historical reasons, but keep in mind that dcommit is
>> not simply pushing. It involves rebasing and a whole git-svn-git
>> roundtrip. It really is "do the commits" on the svn side.
>>
>>
>>>
>>> 6) why having called rebase instead of pull? git svn pull would have
>>> fetched svn/trackedbranch and merged into current branch, git svn pull
>>> somebranch would have merged into current branch the svn/somebranch
>>> (without traking info)
>>>
>>
>> Because pull does not rebase by default, it uses merge!
>>
>> Let me just add that with some more git experience, which includes
>> reading man pages and trying things out, there certainly will be more
>> insight into the why's and why not's of git-svn ;)
>>
>> Cheers,
>> Michael
>>
>
> hi,
> can't do it from here, will retry tomorrow
> I'll try 1) 2) and 3) again tomorrow, however why --prefix=svn isn't the
> default? that's odd behaviour and not really consitent with other remote
> operation I find
> for 4) I think that push works more like dcommit, the underlying process
> isn't the same because svn and git don't share the same tree, but if we look
> at the result we have the same : all commit made on host are visible on
> repository, git do it by transfering the content because all blob/tree are
> sha1 name and then can't conflict, on svn we can't because there are no
> uniqueness so you have to replay the commits one by ones... git just
> optimize the process because of the nature of the filetree...
> for rebase.... well I know that some people prefer it to merge, as well as
> some people prefer that a merge to be fast forward... I prefer to keep the
> branch information... it's hard to restart a dev from a branch that isn't
> visible anymore... fast forward merge and rebase sadely do lose those branch
> information... however I agree that in case of svn a rebase looks more like
> an svn update...
> and yes, sorry I forgot that the opposite of push is... fetch ;) so yes it's
> more clear now in my mind....
> thanks
> JLM
>
>
--
KISS! (Keep It Simple, Stupid!)
(garde le simple, imbécile!)
"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses
simples et qui marchent, espèce d'imbécile!"
-----------------------------
"Si vous pensez que vous êtes trop petit pour changer quoique ce soit,
essayez donc de dormir avec un moustique dans votre chambre." Betty
Reese
http://www.grainesdechangement.com/citations.htm
prev parent reply other threads:[~2009-05-12 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 15:52 git svn : some feedback and wonder jean-luc malet
2009-05-11 16:45 ` Michael J Gruber
2009-05-11 22:11 ` MALET Jean-Luc
2009-05-12 11:52 ` jean-luc malet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1de9d39c0905120452n167a8de2w378f39140946559d@mail.gmail.com \
--to=jeanluc.malet@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).