* git-cvsimport newbie question
@ 2007-07-11 7:20 Scott Lamb
2007-07-11 15:45 ` Scott Lamb
0 siblings, 1 reply; 2+ messages in thread
From: Scott Lamb @ 2007-07-11 7:20 UTC (permalink / raw)
To: git
I'm trying to automatically maintain a git mirror of a (very) remote CVS
repository which is suitable for a few people to clone. I'm creating and
updating it now by running this periodically:
$ mkdir ~/git/racoon2.git; cd ~/git/racoon2.git && git-cvsimport -d
:pserver:anoncvs@anoncvs.racoon2.wide.ad.jp:/anoncvs/racoon2 -r wide -i
racoon2
and cloning/pulling it in the simplest possible way:
$ git clone racoon2.git myracoon2
$ cd myracoon2
$ stg init
...work work work...
$ stg pull
But my clones don't see all the upstream branches:
$ git remote show origin
* remote origin
URL: /home/slamb/git/racoon2.git/.git
Remote branch(es) merged with 'git pull' while on branch master
master
Tracked remote branches
master
In fact, the only branch I see is the one which isn't even updated,
which confused into thinking upstream wasn't changing. (I can't say the
manpage didn't warn me, though - "By default initial import will create
and populate a "master" branch from the CVS repository's main branch
which you're free to work with; after that, you need to git merge
incremental imports, or any CVS branches, yourself.")
Okay, it seems like what I actually want is this:
$ git-cvsimport -d $CVSROOT -o master -i racoon2
which essentially creates a repository that is a mirror of upstream
rather than one which pretends to be tracking a nonexistent upstream git
repository. Now on the cloned branches "git branch -r" does what I want,
as does a simple "git pull".
But from the manpage, it appears I'm reverting to a much older way of
doing things. Maybe I should be giving the newer way a shot? Was this
"-r" way meant to be used with cloning the mirrored repository? If so,
what's the workflow there? maybe I should reset racoon2.git's "master"
branch to the beginning of time (to avoid confusion), update head to
point to remotes/wide/master (so simple "git clone" and "git pull"
commands get CVS HEAD), and then update remote.origin.fetch on each
cloned repository to pull in other branches as needed? But even after
doing that, "git remote show origin" on a cloned repository still won't
give me the list of branches I want. So this seems doesn't seem as good
as the old way.
Is there any way to make a repository cloned from a new-style
cvsimported one show the list of branches? It looks like I can't have a
remote in one repository refer to a remote in another repository - it
wants a direct reference. Most things seem to ignore origin's remotes,
at least unless I explicitly name one like "git pull origin
refs/remotes/wide/master".
Best regards,
Scott
--
Scott Lamb <http://www.slamb.org/>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git-cvsimport newbie question
2007-07-11 7:20 git-cvsimport newbie question Scott Lamb
@ 2007-07-11 15:45 ` Scott Lamb
0 siblings, 0 replies; 2+ messages in thread
From: Scott Lamb @ 2007-07-11 15:45 UTC (permalink / raw)
To: git
Scott Lamb wrote:
> But from the manpage, it appears I'm reverting to a much older way of
> doing things. Maybe I should be giving the newer way a shot? Was this
> "-r" way meant to be used with cloning the mirrored repository? If so,
> what's the workflow there? maybe I should reset racoon2.git's "master"
> branch to the beginning of time (to avoid confusion), update head to
> point to remotes/wide/master (so simple "git clone" and "git pull"
> commands get CVS HEAD), and then update remote.origin.fetch on each
> cloned repository to pull in other branches as needed? But even after
> doing that, "git remote show origin" on a cloned repository still won't
> give me the list of branches I want. So this seems doesn't seem as good
> as the old way.
>
> Is there any way to make a repository cloned from a new-style
> cvsimported one show the list of branches? It looks like I can't have a
> remote in one repository refer to a remote in another repository - it
> wants a direct reference. Most things seem to ignore origin's remotes,
> at least unless I explicitly name one like "git pull origin
> refs/remotes/wide/master".
Hmm...I just saw in a git-svn howto [1] this text:
[FIXME] This is all very important information for people setting
up central tracking servers. This needs expansion, probably its own
section. Talk about tracking server symlink tricks
(eg refs/heads/svn -> ../remotes and
refs/ttags/svn -> ../remotes/tags)
Maybe I want to be doing something similar with git-cvsimport? I'm sure
there's *some* reason way to take advantage of the my named remote; I
just haven't figured out what it is yet. Could someone please fill in
details on this text?
Best regards,
Scott
[1] - http://utsl.gen.nz/talks/git-svn/intro.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-11 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 7:20 git-cvsimport newbie question Scott Lamb
2007-07-11 15:45 ` Scott Lamb
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).