perforce Tagging and labelling files - perforce

I have to preserve the state of a devel-branch till revision--123456.
For that, I have used p4 label and p4 tag commands to label and tag all the files in the branch. I did this in order to preserve the current state of devel-branch which at the moment is 'Stable' and allow the developers to continue working further. In case if anyone needed the stable-state of devel branch then he/she can get from Get Revision option in p4 client from the label.
I did it using command menu by giving following cmds:
p4 label -d CW32_MILESTONE
p4 tag -l CW32_MILESTONE //depot/dev/...#123456
2669 files added
But now when I view the label through p4 client, it's not displaying the revision no. under "Revision" textarea. If I try to explicitly add the revision no. in the textarea then it is showing me following msg:
The Revision field can only be added to empty labels.
I then created another label using p4 client and specified the Revision#: 123456. Now it is showing me the specified revision no. whenever I opened the label, however, the files are not tagged.
I wonder what could be a better approach to keep and maintain the devel-branch upto rev.123456?

The label you are creating with the 'p4 tag' command doesn't record the fact that it's sync'd to changelist 123456. Rather, it is recording:
//depot/file/a#3
//depot/file/b#2
//depot/file/c#7
and so forth, where those particular revisions (#3, #2, #7) are the revisions that were the head revisions at changelist 123456.
Instead, you could make what's called an "automatic label", by specifying revision 123456 in the "Revision" field of the label spec (using 'p4 label', not 'p4 client'). See: http://www.perforce.com/perforce/doc.current/manuals/cmdref/label.html#1040665
When you do this, it is true that "the files are not tagged", in the sense that the server doesn't compile a giant list of the precise file revision numbers. However, the net effect is the same, as you can use your development label for the same purposes: you can sync to that label, you can diff files between that label and other labels, etc.
Basically, an "automatic label" is like saving a query and re-executing the query whenever you reference it ("p4 files //depot/dev/...#123456"), while a traditional "tag label" is more like saving the results of that query in your label table.
Both techniques are effective, but before giving you more detailed guidance about one versus the other we'd need to know more about what you're trying to achieve, as given what you've said so far, both techniques are fine.

Related

Repository and Task input filepath

Is there a way to clear an input field in a task every-time the source directory/repository is changed?
Context:I am developing a custom VSTS task, and in it I have a input field type filepath.
I would like to clear the input field in my task every time the user changes the GetSource or Repository.
Existing behavior in "Copy Files to:" task:
eg: Consider in Get sources -->select a source I have selected GitHub, and a repository out of my account.
In the "Copy Files to: " task , input field "Source Folder" I go ahead and select a folder from my Repo (Browse Source Folder--> Select path).
If I return to the GetSource and change the "repository" or "selected source", then this input field in the "Copy Files to: " task is not relevant anymore. But it remains the same. I have to manually clear the field.
I would like to have this cleared automatically.
Is there a way we can accomplish this?
I checked the azure pipelines tasks samples and the task schema but did not find such a way. If you would like that feature, you can create a request for this feature in developer community.
That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and categorize your suggestions.

How can I shelve changes from all users in a workspace in perforce?

P4 info:
Server version: P4D/LINUX26X86_64/2013.2/938876 (2014/09/23)
How can I shelve changes made by all users/clients of a workarea ?
I have a work model where user A creates the workspace, populates with a P4 sync, then makes some changes in the default CL. Then user B goes to that same workarea and makes more changes. Apparent;y "p4 shelve" will only shelve changes made by user A. User A needs to be able to shelve his/her changes PLUS those of user B together in one shelve.
I wouldn't recommend users sharing the same workspace. That being said, you could still follow a procedure such as:
When finished with their work, User A shelves their files
When beginning their work, User B unshelves User A's shelved files (taking care to check the "Overwrite workspace files even if they are writable" box).
User B completes their work and shelves all of the files to this point.
Continue as necessary, like passing the baton in a relay race.

cognos 10.2.2 workspace auto submit

I have created a workspace dashboard, and the reprompt value on the widgets keeps defaulting to the last value the workspace was run on. Is there a way to keep that from autosubmitting on the last value or defaulting to null?
We setup a saved read-only version of the dashboard for users to view. It had all the preferred defaults saved. If users wanted to make changes they had to save a copy in their own space, so their prompt changes would only affect their personal copy.

How IMAP client can detact Gmail Label rename programmatically

I am working on Email client App and using GMAIL IMAP condstore capability for syncing label,read and unread changes.
My application flow looks like below.
1) Initially Selecting the "Gmail/All Mail"
2) Fetching the changes from the server since last sync with last modseq like
FETCH 1:* (X-GM-LABELS) (CHANGEDSINCE highestmodseq)
Here IMAP server returns the messages for which label,read and unread changes detected since last sync.
Suppose I have label "A" and it has got 100 emails. Now if Label A is deleted then server returns 100 messages as changes,it works as expected.
But in case if label "A" is renamed to Label "B" then server should return 100 messages as changes but it won't.
Can you please suggest how to sync messages which are under Label A previously and got renamed to Label B
PS: According to IMAP server standards uniqueness of a label is identified based on label name and uid validity.
Gmail labels are retrieving with 'LIST "" "*"'.
Suppose if Label is renamed to some thing else then how to find whether it was newly created label or the renamed label
Thanks
Subbi Reddy
PS: According to IMAP server standards uniqueness of a label is identified based on label name and uid validity.
This is not true. The IMAP protocol does not define a "label". It defines what a "mailbox" is, and that each message has a set of "flags" or "keywords".
When GMail decided to implement IMAP, they made an unfortunate choice to shoehorn their concept of labels on top of the mailboxes instead of reusing the existing flags metadata. (They had some reasons for that, some of them are valid, some of them are not, and that discussion is out-of-scope for stackoverflow.)
But in case if label "A" is renamed to Label "B" then server should return 100 messages as changes but it won't.
This understanding certainly makes sense. The fact that GMail behaves differently is disappointing from the IMAP client's perspective. I suggest to bring this up to GMail's developers; they do read the ietf-imapext mailing list.
You're correct that a label rename seems like it should result in updates to the MODSEQ of all messages whose label set was affected by the rename. But it doesn't. So you're going to have to fetch the list of folders/labels and correlate the old label list with the new one.
As you know, you get the list of Gmail labels by issuing a LIST command:
A001 LIST "" "*"
What happens when the response to this command differs from the previous set of folders that you knew about? Unfortunately, IMAP doesn't give you a folder identifier that you can use to track an individual folder through renames. Fortunately, Gmail kinda sorta does.
(NOTE: THIS SOLUTION IS NOT SANCTIONED BY GMAIL, BUT IT APPARENTLY WORKS, SO THERE'S THAT.)
Every IMAP folder has a UIDVALIDITY value associated with it. It's generally there to let you know if somethin has happened on the server such that the UID-to-message mapping you've cached is no longer valid. According to the IMAP RFC,
3) If the [folder] is deleted and a new [folder] with the
same name is created at a later date, the server must
either keep track of unique identifiers from the
previous instance of the [folder], or it must assign a
new UIDVALIDITY value to the new instance of the
[folder].
4) The combination of [folder] name, UIDVALIDITY, and UID
must refer to a single immutable message on that server
forever.
Every folder exposed by Gmail IMAP happens to have a distinct UIDVALIDITY value. When you rename a folder, its UIDVALIDITY does not change. So if you notice that the set of folders has changed and you grab the UIDVALIDITY for every label-folder in the Gmail store, you can match up folders from your old snapshot and from the current store by finding which ones have matching UIDVALIDITY values.
# before, label "blurdybloop" had UIDVALIDITY 32
A002 STATUS "mylabel" (UIDVALIDITY)
* STATUS "mylabel" (UIDVALIDITY 32)
A002 OK Success
# this indicates that "blurdybloop" has been renamed to "mylabel"
If you want to be extra-careful, you may want to do a STATUS on every label folder even if the folder list hasn't changed just to catch circular renames like A -> B, C -> A, B -> C (which results in swapping the names of labels A and C). But that's probably overkill.
No, You can't do this with the IMAP language. Gmail labels are exclusively handled with http(s) API produced by Google.
IMAP has been designed to be used a set of commands send over TCP port 143.
You can check the list of the available commands.

P4V(Perforce) filtering pending changelist with logical operators

With the latest P4V (Perforce) client, can we filter pending changelist with logical operators like AND/OR? So for example, filtering by "Owner=me", "Client=myClientA AND myClientB"? This will be convenient when unshelving from another client.
(beside wondering what GUI you are using, I see "User:" and "Workspace:" at "Pending" tab)
P4V supports only one entry or empty field for filtering, so if you do not have too many clients clearing the "Workspace:" field should list you the candidates to unshelve.

Resources