Find the branch tag for all the changes against a feature - branch

We use JIRA in our organisation. I am unable to find the branch tag/commit-id against particular feature. Is there something I'm missing?
To understand a feature I want to understand all the changes that were made for this feature. How do I go about finding them?

Assuming your JIRA is connected to some kind of source code management (Bitbucket or Github). The branch / commit name must contain the JIRA issue key.
Jira: assign an existing git branch to an issue
Creating the branch though the UI is just a convenience. The important thing is that the name contains the JIRA key. If only one developer is working on the branch, it's fairly easy to just rename (delete + add) a branch with the appropriate name.
To find all branches / commits related to an issue, there's the Development Panel on the sidebar right.

The jira key in the git commit message we found needs to be in uppsercase, well case senstive depending on what you set in the integration.

Related

Managing checkouts of same binary file in different branches in Perforce

How to prevent checking out / changing one binary file in different branches of the same content. Situations like: designers have edited some game level (*.umap binary file) in their branch. Programmes changed same file in their branch (for example - added some blueprint on this game level). So now we have three different versions of this file, one in master branch before all changes, one in designers branch without programmes changes, one in programmes branch without designers changes. And now we must merge designers changes and programmes changes into master branch, but we cant.
So the question is - how to organise right this situations? Maybe we can setup perforce to checkout binary file in multiply branches at the same time, or something like this? Thanks...
There are a couple of different ways to think about this.
If you don't want work to continue/begin in one branch, until changes from another branch have been merged in to it, you can use Helix (Perforce) Protections, to give users read-only access to the branch.
This means they will be able to open files for edit, but won't be able to submit their changes.
More info about protections is here:
https://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.security.html
The protections would need to be changed, when you are ready for work on the other branches to start.
If you want a file to be automatically checked out on all branches, each time someone checks it out on any branch where it exists, you would currently have to script this.
You could do it using the broker and a workspace for every branch, that has a view that just includes the files you want to be checked out everywhere.
The files would then need to be checked out in these workspaces and locked, so that other users can't submit to these branches until the locks are removed.
This is not trivial and may have a performance impact.
You might also be able to do it using pre-command triggers, if your server version is new enough.
If you want to go in to more detail about any of the above, I recommend you contact Perforce Technical Support.
Hope this helps,
Jen.

TortoiseGit Branches and tags - Confused

I am trying to understand about branches and tags with TortoiseGit.
I have read a few good tutorials and have managed to create a branch and I can commit changes to that branch and push to BitBucket. And in the tutorial it shows me how to later merge to the master root.
But I don't quite understand the concept of tags. I know how to create tags. But it is getting it all to work.
What I had in my head was that I create a branch XYZ. But this branch is associated with tag 1.2.3 (a version). I thought that I could tie a set of commits (or the whole branch) to a version number. Then when it is merged later I still know what version those changes were for. Can't work it out.
I tried the "Include Tags" when pushing but that created the tag but seems to have applied it to the whole repository.
Am I going about this wrong?

How to remove a repository from Launchpad?

Specifically I have a repository setup in Launchpad. I need to remove this repository but didn't find any link to do that from launchpad website. I am wondering whether I could do it on my local branch using "bzr". Or I am missing something from the launchpad website to remove it.
To have your entire project deleted from Launchpad, you have to post a "question" on this page:
https://answers.launchpad.net/launchpad/+addquestion
Yeah it's weird. But this seems to be the official way. If you search for the keywords "delete project" on this page you will find many many similar requests:
https://answers.launchpad.net/launchpad
Make sure to include a detailed explanation why you want to do this and that you are aware of the consequences. Otherwise you will get a response along the lines "the community might still use the source code you want to delete" and so on.
Of course they are right, and you should carefully consider whether you really want to remove code that other folks might be using and linking to.
If you are sure you want the project gone, then you can reduce the turnaround time with the Launchpad team by first deleting all your branches. You might not be able to delete the trunk, in that case you can try to force-overwrite it with an empty branch, using these steps:
bzr init empty
cd empty
touch empty.txt
bzr add
bzr commit -m 'dummy commit'
bzr push lp:PROJECT --overwrite
Of course, replace PROJECT with the name of your project. All these steps are necessary to empty the branch. You cannot simply push an empty branch, Bazaar will tell you that No new revisions or tags to push. and the branch will be untouched. You need a completely new revision, like the dummy revision in this example.
If your project has no meaningful source code in it, the Launchpad team should not have any objections to delete it, so you can reduce the turnaround time.

How to prevent Trac to show some commits in the Timeline?

I'm trying to configure a trac server we are using in my team, in order to avoid an undesired behaviour. We are mainly developing free and open-source software in the team, but we sometimes need to be able to build our early prototypes as completely private.
Because of our first constraint, we want our timeline to be visible for anonymous users. But because of the seconde constraints, we want some commits to be completely hidden from the external world, i.e. we don't want anybody else than us to be able to read the message and content of some commits in the timeline.
Unfortunately, I've been unable to configure Trac the proper way to reach this behaviour untli now. I wan't find a configuration that would let me manage the Timeline content with enough accuracy.
Consequently, I would like to know if such a configuration is possible with trac.
For information, I'm using Trac 0.12.2. The installed plugins are :
Trac 0.12.2
TracAccountManager 0.2.1dev-r7731
TracNav 4.1
The only permission I can see that is related to Timeline is TIMELINE_VIEW.
EDIT :
I have forgot to mention something. We don't want to loose the private commits. And we want them to display for registered users. Consequently, it's not a solution for us to remove them from the database.
EDIT 2 :
Ideally, we would like the commits' message to be displayed according to the right to read the content of our Subversion repository. The idea is that, if a commit is made on a part someone can't access, this person is not supposed to be able to read the message of the commit either.
EDIT 3 :
If we have a look in the configuration file of trac, we already can find :
permission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
and the authz_file variable is properly set too. Moreover, svn access to the private folders of the svn repositories can't be accessed by anonymous users.
You should set up authz checking for both your Subversion repository and your Trac installation. You can use the same permission file for both. For Subversion, see Path-based authorization in the SVN book. For Trac, enable and configure the trac.versioncontrol.svn_authz.AuthzSourcePolicy component.
This will allow you to have a very fine-grained control over who can access which part of the repository. Note that the implementation of AuthzSourcePolicy in Trac 0.12.2 has a few bugs that will be fixed in 0.12.3.
There are two ways of going about this :
1) You can directly edit the plugins that are running in trac, and add a module that helps you to filter these out at the code level (i.e. you can edit the behavior of the script to , say, only include commits which exclude certain key words). The timeline script is here (trac 2.4) : /usr/local/lib/python2.4/site-packages/trac/Timeline.py (here is an online diff snapshot of the source code : http://trac.edgewall.org/attachment/ticket/890/Timeline.py.diff)
2) You can remove the commits entirely - trac commits are derived from the sqlLite database (the schema is here http://trac.edgewall.org/wiki/TracDev/DatabaseSchema).
Of course, there also might be some fancy tools out there that provide a nice interface for editing the way the timeline looks.
Finally - temporarily, you can remove the timeline/roadmap entirely from the trac.ini file : http://www.gossamer-threads.com/lists/trac/users/28079
I confess that I've virtually no experience with the repository part of Trac, even less with using a repository with a variety of permissions across it's contents.
On the subject: Configuration is certainly not enough, see rblanks answer. While I've never seen the code for that functionality, I was wrong to suggest it doesn't exist. Because it is a central place and developed/supported in Trac core this is definitely the way to go.

How do I prevent a branch from being pushed to another branch in BZR?

We use a dev-test-prod branching scheme with bzr 2. I'd like to setup a bzr hook on the prod branch that will reject a push from the test branch. Looking at the bzr docs, this looks doable, but I'm kinda surprised that my searches don't turn up any one having done it, at least not via any of the keywords I've thought to search by. I'm hoping someone has already gotten this working and can share their path to success.
My current thought is to use the pre_change_branch_tip hook to check for the presence of a file on the test branch. If it's present, fail the commit.
You may ask, why test for a file, why not just test the branch name? Because I actually need to handle the case where our developers have branched their devel branch, pulled in the shared test branch and are now (erroneously) pushing that test branch to production instead of pushing their feature branch to production. And it seems a billion times easier to look for a file in the new branch than to try to interrogate the sending branch's lineage.
So has someone done this? seen it done? or do I get to venture out into the uncharted wasteland that is hook development with bzr? :)
your approach should work and the plugin will be quite simple: just raise an exception if the file is present.
(For some sample code you can look at a plugin I wrote that can prevent commits on some conditions https://launchpad.net/bzr-text-checker)