On Mon, Feb 11, 2013 at 04:34:13PM -0800, krishna chaitanya kurnala wrote:

> I am trying to setup replication of git notes between 2 gerrit 
> servers(central server + remote mirror). The remote mirror currently works 
> fine in keeping the repo branches in sync. I am trying to add git notes 
> replication as well to repliation.config file. Here is what i have on the 
> central gerrit server in the site/etc/replication.config file:
> [remote "RemoteMirrorHostName"]
>   url = git@RemoteMirrorHostName:/
> home/git/repositories/${name}.git
>   push = +refs/heads/*:refs/heads/*
>   push = +refs/tags/*:refs/tags/*
>   *push = +refs/notes/*:refs/notes/*
>   push = +refs/notes/commits:refs/notes/commits*
>   threads = 3
>   authGroup = MNI replication
> I thought, the above lines in bold will do the trick. But, looks like the 
> Notes objects are not getting in-sync even after re-start.
> I have tried   *push = +refs/notes/*:refs/notes/* *alone first, doesnt seem 
> to work, hence, i tried* **push = +refs/notes/commits:refs/notes/commits as 
> well. No Luck !*

(Note that I'm just guessing as I have no time to verify my guesses.)

First, are you absolutely positive that Git accepts several
remote.<name>.push variables and does not stop after reading just the
first one?  I tried to find anything on this in both `git push` and
`git config` manual pages, and failed.  `git config --add` does really
allow you to set several variables, and you can read them back with
`git config --get-all`, but this still does not imply `git push` behaves
this way.  Hence I would first try to run `git push` with the GIT_TRACE
environment variable set to 1 and see what refspecs are really passed to
`git send-pack` (or to a lower level commands, if any).

Second, why don't you just use '+refs/*:refs/*'?  This is a perfectly
valid sytnax which means "yes, I do really mean *all* references".

Third, there's the remote.<name>.mirror configuration variable whose
effect is to make `git push` behave as if --mirror is passed to it.
I think you could try using it as well.  (One caveat: "--mirror" does
really make `git push` mirror *everything,* so if your source repo
contains truely local things like remote branches, they will be pushed
as well which might not be what's intended.  I'm not familiar with
Gerrit, so I'm not sure if this applies to your case though.)

And the last: please refrain from using ill-consieved markup provided by
the (new crappy) google groups interface: what you say is "in bold"
appears in the mail readers of those who are subscribed to this
group and does not read it via the web interface as strings enclosed in
asterisks.  Asterisks are okay and are used since the dawn of e-mail for
emphasising (as I did in this message) but this is purely by convention.
Asterisks in your configuration file citation look odd -- for instance I
had a difficulty understanding that "*push" is not a special form of a
remote.<name>.push variable ;-)

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to