How to integrate two un-submitted branches of Perforce? - branch

I have get this issue:
There are two branches, both have been changed and not been submit.Named Project-A and Project-B;
Now, I want to merge/integrate A to B. I have some ideas to do this.
Build a new branch and merge the older two.
build a new branch named Project-C
submit Project A; So I can check out A to C (copy A to C)
within C, use p4 integrate B; then A is integrated to B
Use changelist to integrate since Perforce use changelist(submit | shelve) for managing.
get newest changelist of A
within B, use p4 integrate A; now B is merged with the head version in depot
copy the changlist of A to B; so B can update with the change in A.
submit B
Use diff & patch
diff A to the version in depot
patch to B
I am a nieb of Perforce, so there will be some mistakes of the description. The three ideas haven't tested yet because I am afraid to break the branches of my team.
So, my problem is : Will one of the three solutions work? & Which one will be the best?
Thanks very much.
Cheers.

With the 2013.1 version of the Perforce server, you can unshelve through a branch spec, so the process for doing this is:
Shelve the changes for project A
Shelve the changes for project B (optional)
Create a branch view which maps project A to project B
Unshelve the shelf from step 1, using the branch view from step 3, into the workspace which has the project B files open.
The Server will schedule integrations and merges of the shelved content from step (1) against the opened files in the project B workspace.
After resolving the integration merges, you can diff all the changes and either proceed with them or make further changes.
The reason for shelving the changes for project B in step (2) is so that if you don't like the results of the integration and merge, you can revert everything and re-start the process from the shelved work.

Related

If feature 1 and feature 2 are using data driven and, feature 1 fails for one data, how to ignore the run for feature 2 for same data

In Karate API automation ,in Feature A , which is running through data driven , if the scenario fails for one data (say DATA ONE), how to stop a subsequent feature B, that has dependency on feature A(i.e,the functionality of what is done by feature A, for example,let's assume that feature A is for customer creation and feature B is for ticket booking, if Feature A fails for dataOne, I don't want the ticket booking to happen for dataOne), from running for the data (DATA ONE)
Feature A - should run first and uses Data driven
Sample data used in Feature A(EX: CustomerCreation.feature):
DATA ONE - Scenario fails
DATA TWO - Pass
DATA THREE - Pass
Feature B - should run second and uses Data driven
Sample data used in Feature B (EX: TicketBooking.feature):
DATA ONE - should not run
DATA TWO - Should Pass
DATA THREE - Should Pass
Regardless of what I explained in comment, since you edited your question, maybe I can give you some answer.
If you create Customers 1 2 and 3 in feature A.
Let's say Customer 1 isn't created, but 2 and 3 are
In feature B, before you try to book a ticket for each Customer, you should simply check if that Customer exists, with a GET request for example.

SQL one-to-many join - reject row if value is present at least once in right table

This is a rather specific issue for which I can't find the answer from existing tutorials and resources. I am trying to find relationships of audio files within our repository in order to perform triage for migration of the audio files. Ideally I want to find the Production Master files for every existing recording which will then be the source file for the migration. However, there are known examples of recordings for which no Production Master was generated. In these instances we want to be able to determine what types of files exist and what generation (Archival, Deliverable, or neither). To further complicate this, the relationships are not found within the audio files themselves but with the METS file that links them all together. In order to find this I must use a query that links three tables - TEXT_METADATA (for the METS record), OWNER_ACCESS_TO_OBJECTS (for the audio files and their designated roles and mimetypes), and RELATIONSHIP_MAP (for determining the relationship of parent and child files). METS files are parent files (B objects) and audio files are children (A objects).
So far, I have constructed this query in order to find all METS files and their related audio files based on a descriptor type of "AUDIO_SIP" (all audio-based METS files). The last line is an attempt to restrict the results based on METS records for which there is no related Production Master.
Select *
from
REPOSITORY.TEXT_METADATA rt,
REPOSITORY.RELATIONSHIP_MAP rm
where
rt.DESCRIPTOR_TYPE='AUDIO_SIP' and
rm.B_OBJECT_ID=rt.OBJECT_ID and
rm.A_OBJECT_ID in (select ro.OBJECT_ID
from REPOSITORY.OWNER_ACCESS_TO_OBJECTS ro
where ro.ROLE<>'PRODUCTION_MASTER)
Of course, the problem here is that it returns a row for which there is no Production Master regardless of its relationship to a METS file, so this is useless. I am absolutely stumped on how to proceed to say "return all B_OBJECT_IDS and associated A_OBJECT_IDS for which there is NO Production Master linked to the B_OBJECT_ID). Make sense? Please let me know if I need to clarify. Any help is much appreciated.

Can I create a branch in Perforce based on a historic point in time?

I would like to create a branch in Perforce that is based off of some point in the past, i.e. not the current state of the current branch, is this possible? If so, how?
Here is a picture of what I'm trying to do. The current branch is in blue, and the new desired branch is shown in green.
This will do it:
p4 copy //depot/project/dev/...#release_x_label //depot/project/release_x/...
The command tells Perforce to copy //depot/project/dev/... as of release_x_label to //depot/project/release_x/... You can run this command entirely server side using p4 copy -v. If you don't need a copy of the files locally it's much quicker.
You can do it in one go without needing a submit by using p4 populate
p4 populate //depot/project/dev/...#release_x_label //depot/project/release_x/...
I usually use copy though to make sure I don't have any typos. =)
You can do all of this with streams as well. It's a bit odd in that the revision specifier that you use to choose what to branch from gets put on the target path you're branching to.
p4 populate -rs //stream/dev2 //stream/dev2/...#1
This will populate dev2 from its parent as of changelist1.

TFS Cutomization using power tools

Friends
I have added 3 fields using the Power Tools in TFS->Test case work item. Now is it possible for me to do the below customization?
1st field a
2nd field b
3rd field c.
then c equals a plus b.
when i enter the values in the fields a & b, field c should be populated with the value a+b. Please help me.
As far as I know this isn't possible int he Work Item Definition schema language. If you want the UI to do math based on your work item values, you need to build a server side plugin. There is an open source solution available that handles these kinds of things which you might be able to use for your solution, or you could derive your own solution from that.
See also: TFS Aggregator project on Codeplex.

Rally - assign a parent project's iteration to an imported child project

searched for answers to this keyword set and don't see anything. There's a master project in my Rally implementation master with some child projects as so:
As-is:
Master Project 1(master iteration 1)
Child Project A (master iteration plan 1)
Child Project B (master iteration plan 1)
Master Project 2 (master iteration plan 2)
Now there's a request to move master project 2 under master project 1 as a child project, and for MP 2 to use master iteration plan 1 instead of master iteration plan 2.
To-be:
Master Project 1(master iteration 1)
Child Project A (master iteration 1)
Child Project B (master iteration 1)
Child Project C - (Master Project 2) (currently master iteration plan 2, desired to share master iteration plan 1)
My question:
How do I change the Child Project C's iteration from iteration 1 to iteration 2?
What effect will changing the iteration have on Child Project C (former master project 2) stories?
In answer to question 1 - you will need to update the current iteration in Child Project C that matches the settings from the iteration you already have created in your Master Project 1. This will ensure that all of the data rolls up properly. Going forward, when you create new iterations you can use the "Create Matching Iterations in all Child Projects" checkbox to create the iterations all the way down the hierarchy.
In answer to your second question - all of the data you currently have scheduled will be there, however making changes to the original iteration in Child Project C could affect your project burndown given that the dates were most likely changed. I recommend that you finish out the current iterations as they are. When they are compete you can then create a new iteration altogether that will be populated down the entire project hierarchy.