where is the project.config file stored?

825 views
Skip to first unread message

jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 11:25:19 AM4/5/17
to Repo and Gerrit Discussion
Hi,
have read thru' https://gerrit-documentation.storage.googleapis.com/Documentation/2.13.7/config-project-config.html and am still not sure where the project.config file.
I have looked in the refs/meta directory of a gerrit project git repository and there is a config file that contains a hash.
So bit confused.
Regards,

thomasmu...@yahoo.com

unread,
Apr 5, 2017, 11:29:32 AM4/5/17
to Repo and Gerrit Discussion
Hi, it's stored in refs/meta/config which should be accessible through All-Projects

Edwin Kempin

unread,
Apr 5, 2017, 11:40:22 AM4/5/17
to thomasmu...@yahoo.com, Repo and Gerrit Discussion
refs/meta/config is branch (not a directory) which should exist in every project.
You may need to grant READ permission on it, if you want to fetch it.

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 1:55:44 PM4/5/17
to Repo and Gerrit Discussion, thomasmu...@yahoo.com
many thanks Edwin and Thomas.
Still a bit unsure on this. This is what I did

 git fetch origin HEAD:refs/meta/config
From ssh://mint-rtc:29418/groovyTest
 * [new ref]                    -> refs/meta/config

$ git checkout refs/meta/config
Note: checking out 'refs/meta/config'.
You are in 'detached HEAD' state. You can......
HEAD is now at 1cdf1d3... comments for change

So where is project.config supposed to be / go?



 

Golan Davidovits

unread,
Apr 5, 2017, 2:23:50 PM4/5/17
to Repo and Gerrit Discussion, thomasmu...@yahoo.com
After you fetch it you still need to create the branch locally:

git fetch origin refs/meta/config:remotes/origin/meta/config
git checkout -b refs/meta/config remotes/origin/meta/config

Golan

jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 2:34:36 PM4/5/17
to Repo and Gerrit Discussion, thomasmu...@yahoo.com
Hi Golan,
when I try both commands above, I get a fatal error

$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

$ git fetch origin refs/meta/config:remotes/origin/meta/config
fatal: Couldn't find remote ref refs/meta/config

$ git checkout -b refs/meta/config remotes/origin/meta/config
fatal: Cannot update paths and switch to branch 'refs/meta/config' at the same time.
Did you intend to checkout 'remotes/origin/meta/config' which can not be resolved as commit?

Jonathan Nieder

unread,
Apr 5, 2017, 2:38:37 PM4/5/17
to jo...@norricorp.f9.co.uk, Repo and Gerrit Discussion, thomasmu...@yahoo.com
Hi,


The important thing is to have read permission.

Hope that helps,
Jonathan

--
--
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 2:53:03 PM4/5/17
to Repo and Gerrit Discussion, jo...@norricorp.f9.co.uk, thomasmu...@yahoo.com
Hi Jonathon,
yes that was the problem - my user was not in a group that had read permission on that. 
Having now run fetch and checkout, I have a project.config file.
Many thanks

jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 3:11:04 PM4/5/17
to Repo and Gerrit Discussion, thomasmu...@yahoo.com
 Still having problems .....
So I edited project.config, added it and committed. Then tried to push.

git push origin refs/meta/config:remotes/origin/meta/config
error: src refspec refs/meta/config matches more than one.
error: failed to push some refs to 'ssh://jnorris@mint-rtc:29418/groovyTest'

git branch -a
  master
* refs/meta/config
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/meta/config

I am in a group that has write permission to the branch.

What am I doing wrong?

Jonathan Nieder

unread,
Apr 5, 2017, 3:23:57 PM4/5/17
to jo...@norricorp.f9.co.uk, Repo and Gerrit Discussion, thomasmu...@yahoo.com
See https://gerrit-review.googlesource.com/Documentation/user-submodules.html#_ensure_the_subscription_is_allowed for an example of modifying the project.config file.

Filed http://crbug.com/5948 to document this better.

Martin Fick

unread,
Apr 5, 2017, 3:24:07 PM4/5/17
to repo-d...@googlegroups.com, jo...@norricorp.f9.co.uk, thomasmu...@yahoo.com
On Wednesday, April 05, 2017 12:11:04 PM
jo...@norricorp.f9.co.uk wrote:
> Still having problems .....
> So I edited project.config, added it and committed. Then
> tried to push.
>
> git push origin
> refs/meta/config:remotes/origin/meta/config error: src

You are pushing to a local ref spec, the remote one would
not have "remotes" in it. Try:

git push origin refs/meta/config:refs/meta/config

or simpler:

git push origin HEAD:refs/meta/config


-Martin

--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

Jonathan Nieder

unread,
Apr 5, 2017, 3:27:47 PM4/5/17
to jo...@norricorp.f9.co.uk, Repo and Gerrit Discussion, thomasmu...@yahoo.com
Jonathan Nieder wrote:
john wrote:
 
 Still having problems .....
So I edited project.config, added it and committed. Then tried to push.

git push origin refs/meta/config:remotes/origin/meta/config
error: src refspec refs/meta/config matches more than one.
error: failed to push some refs to 'ssh://jnorris@mint-rtc:29418/groovyTest'

See https://gerrit-review.googlesource.com/Documentation/user-submodules.html#_ensure_the_subscription_is_allowed for an example of modifying the project.config file.

Filed http://crbug.com/5948 to document this better.

Correction: that should be http://crbug.com/gerrit/5948.

Sorry for the confusion,
Jonathan

jo...@norricorp.f9.co.uk

unread,
Apr 5, 2017, 3:48:02 PM4/5/17
to Repo and Gerrit Discussion, jo...@norricorp.f9.co.uk, thomasmu...@yahoo.com
 git push origin HEAD:refs/meta/config
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 425 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Processing changes: refs: 1, done
To ssh://jnorris@mint-rtc:29418/groovyTest
   b9a69c6..fc5001a  HEAD -> refs/meta/config

that worked - many thanks Martin

Martin Fick

unread,
Apr 5, 2017, 4:25:59 PM4/5/17
to repo-d...@googlegroups.com, jo...@norricorp.f9.co.uk, thomasmu...@yahoo.com
On Wednesday, April 05, 2017 12:48:02 PM
Of course, even better create a change for review first
without needing write perms to refs/meta/config:

git push origin HEAD:refs/for/refs/meta/config
Reply all
Reply to author
Forward
0 new messages