I want information about all commits done on my BitBucket repository.
I dont need an XML Feed. I want just a list of commits and the order in which they are committed and possibly information about merging.
On bitbucket websites information is shown in paginated form and is not sufficient for me. It would be nice if could obtain a pdf or something listing all my commits.
Is there a way to do so ?
Any help would be appreciated.
Thanks,
Pankaj.
You should make a local clone and then access the local repository using whatever tools you have that can generate such a PDF. That way you'll have full access to the information you need about commits and merges. Since Mercurial is a distributed version control system, this is really the way you're supposed to access it: locally, not via screen-scraping on Bitbucket.
If you're using Java or Python, then you can use JavaHg or python-hglib to access the repository. See the full list of libraries.
Related
I'm trying to build a website that supports git version control. I'm using libgit2 for the backend. But I think filesystem is not so easy to scale and to guarantee data integrity. I noticed that libgit2 has custom backend (https://github.com/libgit2/libgit2-backends) support where I can use a database for some storage.
Initially I hoped that I can completely get rid of filesystem by saving everything git related into a database. But after I tried the sqlite backend, It seems that libgit2 still need to generate a .git folder on my filesystem? Can I remove the .git folder when I use a database as the backend?
There are a few "limitations" to having a working, "in-memory" repository using libgit2, even though there's support for "some" in-memory-ness. As you found out, there are API endpoints for both custom object databases (.git/objects/) and the refdb (.git/refs/), and the config subsystem can work in-memory. But that is not the case for all other things that can go in .git/, because there's no customization point at the repo-level — and IMHO this is not git we're talking about anymore when you're completely fs-less — work isn't really going in this direction.
Feature-request: https://github.com/libgit2/libgit2/issues/4671
Discussion on a fix + some branches with "preparatory design work": https://github.com/libgit2/libgit2/pull/4967
Im currently working on a big project with more then one team.
Lets say in the project there are some modules that each team working on.
In addition we are using gerrit for sometime now and there is something i couldn't find out.
My question is the following:
Is there a way to tell Gerrit that only specific people/group(on Gerrit) will have permission to review code (+2) on specific path/module on the project?
This is possible, and can be achieved by using the Gerrit OWNERS Plugin. I haven't configured this plugin myself, but we use this in our codebase to protect certain areas of code.
Every folder that needs protection contains a file named OWNERS that has the following structure.
inherited: true
owners:
- user-a#example.com
- user-b#example.com
Here is the link to a readme for the plugin. Hope you can figure out how to configure it.
https://gerrit.googlesource.com/plugins/owners/+/refs/heads/master/README.md
I think you can do this by making two separate commits. You can later add the group that you want to review the code on that specific path using gerrit interface.
Im using gitlab, and I am wondering, is there a simple way to restrict access to a branch to only certain developers? This has to do with time varying disclosure and the ability for certain developers to see some objects models, while other cannot? Ideally this would happen in one repository, without a proliferation of forks.
No, it is not possible to have a read protection to certain git branches. That would also defeat how git works.
What you could do is forking a repository, creating a branch here and only grant restricted permission to the entire repository. Later it would always be possible to merge changes from this forked repository to the original repository.
You can only change read access to the entire repository as well as write permission to branches.
I have a "central" Mercurial repository, which configured to use HTTPS and requires authentication to clone-pull-push changes. Developers has their own repositories on their computers. They configure their local settings freely, and for example add section like
[ui]
username = anyname
to their local mercurial.ini file.
When a user try to push his changes to the "central" repository, he authenticates, but authentication info is not stored in Mercurial. Mercurial store locally configured username as revisions author in central repository. So I cannot find who really made changes in central repository, but I strongly wish to do it. Mercurial developers does not care about it and consider this behavior to be correct.
But I want to keep authentication info near changesets. I think the best way to do it is add one more additional field in revision description, like "pusher id" and store there authentication data.
Extensions I found do not implement similar functionality. Can you give me info about some third-party extensions, hooks, or just code templates or ideas how to do it? (I'm absolutly new in Python)
The fundamental problem that makes Mercurial developers (like myself) reject this is that changesets are immutable. It is impossible for a server to add extra information to the changesets when they are pushed.
More concretely: a changeset is identified by it's changeset hash. This hash is computed based on all the information the changeset contains, such as username, date, commit message, and the change itself. You cannot change any part of this, without also changing the changset hash — otherwise the integrity of the repository is destroyed.
This gives you security against accidental (or malicious!) changes made on the server: if Alice and Bob talk about "changeset X", then they can be sure they really mean the same thing. If the server (or someone else) could change the content of a changeset without affecting the ID, then Alice and Bob would not be guaranteed that "X" really means the same
thing in both their repositories. This property is of course also fundamental to the way Mercurial works when synchronizing repositories.
You have two options here:
You can let the server reject a push if Alice tries to push a changeset with Bob's name in it. This is can be done with a pretxnchangegroup hook on the server. It will inspect the HG_SOURCE environment variable and verify that the user listed there is also the committer of all pushed changesets between HG_NODE and tip.
You can let the server log the pusher. This is called a "pushlog". The Mozilla project uses one and the source appears to be here. There you make your server store information about who pushed what. This is done in a changegroup hook that logs the necessary information in a small database.
If you want a push log, then take a look at Kallithea, which has this functionality built in. Kallithea is in general a great way to host Mercurial repositories! It has much more functionality than the normal hgweb CGI script.
I'm using subversion to develop a website with a designer and I'm using a remote server to the Subversion database storage.
Now I need to make visible on the Apache(same machine that Subversion server) all the changes/commits that we make to the repository.
This is possible to do?
I have searched inside the repository files but nothing looks like the name of the files of the project(PHP Project).
Can someone give me a clue on how can I make visible the changes to the repository in a website? Is there a way to connect the changes that I do the the repository to the website?
Best Regards,
Assuming you can already browse the repository using HTTP, simply add something like Repos Style for a nice layout and folder/file history features.
You could shell out to svnadmin.