I have a repo I'm having trouble pushing to... I've followed the instructions...
My repo contains a hgrc...
/repo/.hg/hgrc
[web]
push_ssl = false
hgwebdir.config
[paths]
/ = /path/to/folder/*
[web]
baseurl = /
push_ssl = false
allow_archive = zip
When I try to push I still get abort: cannot lock static-http repository
https://www.mercurial-scm.org/wiki/PublishingRepositories#Allowing_push
Looks similar to many other posts, but see if section 7 doesn't help you.
Related
I'm facing problems fetch HG/Mercurial repo in Bitbake recipe.
can't fetch the source URL reported in logs
tested with env hg clone repo_url works fine
testet with hg:// and http:// headers
The right format of SRC_URI is:
SRCREV = "tip"
SRCMODULE = "myapp"
SRC_URI = "hg://hg_server_url;rev=${SRCREV};protocol=http;branch=${SRCBRANCH};module=${SRCMODULE}"
The key is that hg_server_url shouldn't include target repo subname, but include it as SRCMODULE !
Also you could pull latest commit not with AUTOREV as per git repo but SRCREV = "tip"
Edit: Working 100% tip
Due to logic of bitbake classes and nature of Mercurial repo above statement should work but just once. It's that way cause when bitbake checks for cached files it finds "tip" already in cache instead git's HEAD wich is translatet to uniq hash.
To avoid that behaviour we should avoid completly (Mercurial repo) cache when fetch hg repo. This is simple as put in recipe:
do_install[nostamp] = "1"
That way bitbake always think the recipe is executed for the first time. We not useing cache but always get latest repo commit.
I'm trying to use 2 set of rules for the ACL of my repos. I was thinking that maybe the action name could be useful from the hooks section but that not the case.
The rules are :
1) Only be able to commit on a specific branch (ex: acceptance)
2) Only be able to pull a specific branch. (Ex: bigNewFeature)
The second rule can look strange for a repo. We are in middle of releasing a big project where all the branches related to it had been merge under bigNewFeature for months on it. We are pushing it on our acceptance server and want to freeze the repos of any new branches except for bigNewFeature. That pretty much to avoid any mistake from one of the dev.
[extensions]
hgext.acl=
[hooks]
pretxncommit.acl = python:hgext.acl.hook
# Was expecting to be able to use any action name
pretxncommit.aclpull = python:hgext.acl.hook
# OR
pretxnchangegroup.aclpull = python:hgext.acl.hook
[acl]
sources = commit
[acl.allow.branches]
acceptance = *
[aclpull]
sources = pull
[aclpull.allow.branches]
bigNewFeature = *
My first rule work like usual but the second one don't look to be run at all. I have no error or what ever.
I have a distant repository called http://myrepo
I also have 3 projects with 3 distinct packages (1 in each) stored in D:/Projects/Project[ABC]/src/pack[ABC].
I would like to create a local repo in D:/Mercurial which will reference the packages pack[ABC] as subrepositories, which are to be pushed to my distant repo.
Finally, I would like to have my packages stored in my distant repo so you read http://myrepo/pack[ABC], and they should reflect the changes made in D:/Projects/Project[ABC]/src/pack[ABC].
I can't manage tu push my subrepositories to my distant one. How to set-up such a thing?
You should be able to configure your subrepos in your top repo's .hgsub as:
LocalPathA = http://server/A
LocalPathB = http://server/B
LocalPathC = http://server/C
Then, on Server, you will have to create empty repositories (with appropriate permissions) A, B, C
Your local repositories A,B,C will need their [paths] default=http://server/A, etc set up.
hgrc for the subs
[paths]
default = source repo
hgsub for the surrounding repo
protocol://servername//absolute/path/to/repo = relative/path/from/surrounding/repo/root
I would like to be able to control access to some mercurial repositories on my server. I thought an easy solution would be to have all limited users have a username that ends with "_external". I would then change the deny_push and deny_read on some .hgrc files to give them access as needed. I setup up my hgweb.config file like below, but the deny_push and deny_read lines are ignored. Is this the correct syntax? Is there a better way to accomplish my goal (I looked into Rhodecode, but it seems to be pretty crashy on Windows).
[web]
style = gitweb
baseurl = /hg
allow_push = *
push_ssl = false
deny_push = *_external
deny_read = *_external
The best option you have is to setup a list with the usernames:
allow_push = user1, user2
deny_push = user3, user5
deny_read = user4
The problem with your syntax is that, you are first allowing push for everybody and then trying to limit the users.
mercurial-server can do this for you. This means connecting to your repository over ssh rather than over http, and authenticating using ssh keypairs, but in my experience that's far more convenient anyway.
I have about 100 Mercurial repositories served by hgweb. The repositories are stored in a folder hierarchy, but hgweb displays the structure in a "flat" manner. This doesn't scale. Is there a way to display the repositories in a tree-like hierarchy instead?
I like to organize my repos by type, this is what my hgweb config looks like:
[web]
baseurl =
[paths]
/apps = /var/hg/apps/*
/config = /var/hg/config/*
/design = /var/hg/design/*
/music = /var/hg/music/*
/projects = /var/hg/projects/*
/scripts = /var/hg/scripts/*
You can also use ** to make it display directories recursively.
[paths]
/ = /var/hg/**
Check out the docs for other details/options: http://www.selenic.com/mercurial/hgrc.5.html#web.
You might also be interested in RhodeCode which is a more feature-rich web interface for mercurial.
I'm not sure if this was an option at the time of the question, but there's now an option that enables descending into directories.
[web]
descend = True
You then have two options for how to configure your paths. If you specify a path with a single asterisk, it will descend into subdirectories until it finds repositories.
[paths]
/ = /var/hg/*
If you specify a path with two asterisks, it will also descend into repositories to see if there are nested repositories or subrepositories.
[paths]
/ = /var/hg/**
You can find more details on the Mercurial wiki at PublishingRepositories.
(It sounds as if you may also be looking to have the hierarchy displayed in a tree-like fashion. This solution only impacts which repositories will be detected. It will not change how they are displayed. I'm not aware of any built-in way to accomplish a hierarchical display.)
I had the same problem, and I solved by enabling the collapse option:
[web]
collapse = yes