threads / discuss / 12666

git-svn clone duplicates content

Subject: git-svn clone duplicates content

## tl;dr

3 messages between Mar 13, 2008 and Mar 13, 2008.

replies: 2people: 2as markdown or json

martin f krafft· Mar 13, 2008, 09:52 UTC · lore
Hi list,
if I
  git-svn clone --stdlayout svn://svn.debian.org/svn/python-modules/packages/python-docutils
then I get
  drwx------ 3 madduck madduck 4096 2008-03-13 10:11 debian/
  drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/
  drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/debian/

and the diff between the two debian directories is equivalent to the last commit to the trunk. If I create a new branch off the remote 'trunk' branch, then the trunk/ directory will be gone, as it should.

I am a bit wary to dcommit off anything else than master though for I've already killed SVN repos with git-svn in the past. I'd rather not to that to Debian's python-modules repo, or else would have to spend the rest of my life hidden on some island.

It seems that master is branched off a tag in this case. Does anyone have an idea what's going on? Is this something weird in the svn or with git-svn?

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
what do you mean, it's not packaged in debian?
 
spamtraps: madduck.bogus@madduck.net
Björn Steinbrink· Mar 13, 2008, 11:30 UTC · re: martin f krafft · lore

Re: git-svn clone duplicates content

On 2008.03.13 10:52:15 +0100, martin f krafft wrote:
Show 25 quoted lines
> Hi list,
> 
> if I
> 
>   git-svn clone --stdlayout svn://svn.debian.org/svn/python-modules/packages/python-docutils
> 
> then I get
> 
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 debian/
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/debian/
> 
> and the diff between the two debian directories is equivalent to the
> last commit to the trunk. If I create a new branch off the remote
> 'trunk' branch, then the trunk/ directory will be gone, as it
> should.
> 
> I am a bit wary to dcommit off anything else than master though for
> I've already killed SVN repos with git-svn in the past. I'd rather
> not to that to Debian's python-modules repo, or else would have to
> spend the rest of my life hidden on some island.
> 
> It seems that master is branched off a tag in this case.
> Does anyone have an idea what's going on?
> Is this something weird in the svn or with git-svn?

The "fetch" part of git-svn will create a master branch if it doesn't exist(*) and makes it point to whatever branch was last fetched. In your case, it seems that the last change on the svn side was to create tag 0.4-5, so master pointed to that one.

As things are, a "git reset --hard remotes/trunk" (or wherever you want your master to descend from) is pretty mandatory after git svn clone. The example in the man page "kind of" mentions that. ;-)

Björn
(*) Which can be a bit "surprising", because even if you don't want a
    master branch and deleted the original one, the next fetch will
    create a new one.
martin f krafft· Mar 13, 2008, 11:36 UTC · re: Björn Steinbrink · lore

Re: git-svn clone duplicates content

also sprach Björn Steinbrink <B.Steinbrink@gmx.de> [2008.03.13.1230 +0100]:
> The "fetch" part of git-svn will create a master branch if it
> doesn't exist(*) and makes it point to whatever branch was last
> fetched. In your case, it seems that the last change on the svn
> side was to create tag 0.4-5, so master pointed to that one.
That makes sense.
> As things are, a "git reset --hard remotes/trunk" (or wherever you
> want your master to descend from) is pretty mandatory after git
> svn clone. The example in the man page "kind of" mentions that.
> ;-)
I saw that a bit later too. Thanks for the explanation regardless!
-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"and if the cloud bursts, thunder in your ear
 you shout and no one seems to hear
 and if the band you're in starts playing different tunes
 i'll see you on the dark side of the moon."
                                                   -- pink floyd, 1972
 
spamtraps: madduck.bogus@madduck.net

← back to recent threads