threads / discuss / 2608

still unclear on setting up a repository

Subject: still unclear on setting up a repository

## tl;dr

6 messages between Nov 20, 2005 and Nov 27, 2005.

replies: 5people: 3as markdown or json

Randal L. Schwartz· Nov 20, 2005, 00:40 UTC · lore
I'm really unclear here if it's me, the code, or the docs...
first, create the "remote"
        % cg-admin-setuprepo remote.git
that works fine, now set up the "local"
        % mkdir local.git
        % cd local-git
        % cg-init -m "junk message why should I have to do this one, it's dumb"

Now here's where I'm unclear. I need to "push" this into the remote, so I try this:

        % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"
        % cg-branch-ls

This seems to report the right thing. I have a branch "origin" that points at the remote repository. So far, I think I'm understanding what's happening. But now, go boom:

        % cg-push
        cg-push: where to push to?

Huh? How do I do the initial push? Not this way? Is it me, docs, or code that is broken here?

UPDATE...

aha... "cg-push origin" works. But "cg-push" is documented to default to "origin". Why doesn't it?

And then, another "go-boom" problem:
    % cg-fetch
    Hard links don't work - using copy
    Fetching head...
    cp: illegal option -- d
    usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target
           cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory
    cg-fetch: unable to get the head pointer of branch master

Any chance you could make this more POSIX-like? I know you have a big warning in README.osx, but are you *really* needing all those weird GNU-isms? Maybe you could fall back to using rsync to copy exactly what you need?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Andreas Ericsson· Nov 20, 2005, 01:07 UTC · re: Randal L. Schwartz · lore

Re: still unclear on setting up a repository

Randal L. Schwartz wrote:
Show 6 quoted lines
> And then, another "go-boom" problem:
> 
>     % cg-fetch
>     Hard links don't work - using copy
>     Fetching head...
>     cp: illegal option -- d

I think this was resolved some weeks ago. Perhaps you could try the latest cogito from git://git.kernel.org/pub/scm/cogito/cogito.git ?

Show 6 quoted lines
> 
> Any chance you could make this more POSIX-like?  I know you have a big
> warning in README.osx, but are you *really* needing all those weird
> GNU-isms?  Maybe you could fall back to using rsync to copy exactly
> what you need?
> 
There aren't that many. This particular one was a typo, iirc.

As for rsync; From the output you posted above, you were setting up both the repositories on your local machine. Using rsync for those cases would be pretty stupid.

On a side-note, could you please turn off your spamvertising auto-reply? It sends me some info about your perl-expertise and contact-numbers every now and then. It's getting a bit annoying.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Randal L. Schwartz· Nov 20, 2005, 01:14 UTC · re: Andreas Ericsson · lore

Re: still unclear on setting up a repository

>>>>> "Andreas" == Andreas Ericsson <ae@op5.se> writes:
Andreas> Randal L. Schwartz wrote:
Show 5 quoted lines
>> And then, another "go-boom" problem:
>> % cg-fetch
>> Hard links don't work - using copy
>> Fetching head...
>> cp: illegal option -- d

Andreas> I think this was resolved some weeks ago. Perhaps you could try the Andreas> latest cogito from git://git.kernel.org/pub/scm/cogito/cogito.git ?

I'm grabbing nearly hourly.
    localhost:~/MIRROR/cogito-GIT % cg-status
    Heads:
       >master      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
      R origin      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
Error with this version.

Andreas> As for rsync; From the output you posted above, you were setting up Andreas> both the repositories on your local machine. Using rsync for those Andreas> cases would be pretty stupid.

rsync instead of cp if you really need "-d".

Andreas> On a side-note, could you please turn off your spamvertising Andreas> auto-reply? It sends me some info about your perl-expertise and Andreas> contact-numbers every now and then. It's getting a bit annoying.

If you email me directly, you'll get that note no more than once per month. Some day, I'll create a system to whitelist people that never want to see it again. Damn TUIT shortage. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Andreas Ericsson· Nov 20, 2005, 02:10 UTC · re: Randal L. Schwartz · lore

Re: still unclear on setting up a repository

Randal L. Schwartz wrote:
Show 19 quoted lines
>>>And then, another "go-boom" problem:
>>>% cg-fetch
>>>Hard links don't work - using copy
>>>Fetching head...
>>>cp: illegal option -- d
> 
> 
> Andreas> I think this was resolved some weeks ago. Perhaps you could try the
> Andreas> latest cogito from git://git.kernel.org/pub/scm/cogito/cogito.git ?
> 
> I'm grabbing nearly hourly.
> 
>     localhost:~/MIRROR/cogito-GIT % cg-status
>     Heads:
>        >master      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
>       R origin      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
> 
> Error with this version.
> 

You're right. It was the '-b' option that was removed earlier (which you reported as well, ten days ago).

Show 6 quoted lines
> Andreas> As for rsync; From the output you posted above, you were setting up
> Andreas> both the repositories on your local machine. Using rsync for those
> Andreas> cases would be pretty stupid.
> 
> rsync instead of cp if you really need "-d".
> 

There are other problems with rsync. It would actually be faster to use the git-daemon on localhost than using rsync for operations between two local repositories.

Show 8 quoted lines
> Andreas> On a side-note, could you please turn off your spamvertising
> Andreas> auto-reply? It sends me some info about your perl-expertise and
> Andreas> contact-numbers every now and then. It's getting a bit annoying.
> 
> If you email me directly, you'll get that note no more than once per
> month.  Some day, I'll create a system to whitelist people that never
> want to see it again.  Damn TUIT shortage. :)
> 

It's not the amount of mail that annoys me. It's the principle of the thing. Perhaps you can use a different email when participating in list discussions? It's not exactly right to ask others to tell you they don't want your spam after all.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Petr Baudis· Nov 27, 2005, 14:50 UTC · re: Randal L. Schwartz · lore

Re: still unclear on setting up a repository

Dear diary, on Sun, Nov 20, 2005 at 02:14:47AM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 21 quoted lines
> >>>>> "Andreas" == Andreas Ericsson <ae@op5.se> writes:
> 
> Andreas> Randal L. Schwartz wrote:
> >> And then, another "go-boom" problem:
> >> % cg-fetch
> >> Hard links don't work - using copy
> >> Fetching head...
> >> cp: illegal option -- d
> 
> 
> Andreas> I think this was resolved some weeks ago. Perhaps you could try the
> Andreas> latest cogito from git://git.kernel.org/pub/scm/cogito/cogito.git ?
> 
> I'm grabbing nearly hourly.
> 
>     localhost:~/MIRROR/cogito-GIT % cg-status
>     Heads:
>        >master      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
>       R origin      22ff47e9b3c5fc8aa2efbc5ac8690b06b868ef6f
> 
> Error with this version.

Hmm, right. I changed the -d to -P, which is basically equivalent for our situation, and -P is supposed to be POSIX. Thanks.

Show 7 quoted lines
> Andreas> On a side-note, could you please turn off your spamvertising
> Andreas> auto-reply? It sends me some info about your perl-expertise and
> Andreas> contact-numbers every now and then. It's getting a bit annoying.
> 
> If you email me directly, you'll get that note no more than once per
> month.  Some day, I'll create a system to whitelist people that never
> want to see it again.  Damn TUIT shortage. :)

If you don't want to receive mailing list traffic related to your mails directly, you can setup your mailer to adjust the 'mail-followup-to' header appropriately and you should stop getting it twice.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Petr Baudis· Nov 27, 2005, 23:15 UTC · re: Randal L. Schwartz · lore

Re: still unclear on setting up a repository

Dear diary, on Sun, Nov 20, 2005 at 01:40:20AM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 9 quoted lines
> This seems to report the right thing.  I have a branch "origin"
> that points at the remote repository.  So far, I think I'm understanding
> what's happening.  But now, go boom:
> 
>         % cg-push
>         cg-push: where to push to?
> 
> Huh?  How do I do the initial push?  Not this way?  Is it me, docs, or
> code that is broken here?

The code was broken, cg-push wouldn't default to origin unless you already had an origin head, which you obviously can't have when you are going to push for the first time. Thanks, fixed.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

← back to recent threads