Jump to content


Sambwise's Content

There have been 242 items by Sambwise (Search limited from 29-October 19)


By content type

See this member's


Sort by                Order  

#26990 Revert question

Posted by Sambwise on Today, 03:07 PM in P4V

Quote

there's a message "Out of date: Get latest revision to set up a resolve (this will not overwrite your local copy of the file).". If I do this, my file is overwritten with the latest on the server.

Your file only gets overwritten if you "accept theirs" when you resolve (which will be the default option when you haven't modified your file, since the default is always to preserve all changes).  Instead, "accept yours" when you resolve to permanently keep your local file, "ignoring" the later revisions ("theirs").

If you use the command line, you can do the sync + edit + sync + resolve in a single step with the "p4 undo" command, which will also leave a record in the file history that the new revision undid specific earlier revisions:

C:\Perforce\test\undo>p4 have foo
//stream/main/undo/foo#6 - c:\Perforce\test\undo\foo

C:\Perforce\test\undo>p4 undo foo#5,6
//stream/main/undo/foo#6 - opened for integrate
... undid //stream/main/undo/foo#5,#6

C:\Perforce\test\undo>p4 submit -d "roll back to revision 4"
Submitting change 201.
Locking 1 files ...
integrate //stream/main/undo/foo#7
Change 201 submitted.

C:\Perforce\test\undo>p4 filelog foo#=7
//stream/main/undo/foo
... #7 change 201 integrate on 2020/10/28 by Samwise@Samwise-dvcs-1509687817 (text) 'roll back to revision 4'
... ... undid //stream/main/undo/foo#5,#6



#26980 Mapping subfolders to different depots?

Posted by Sambwise on 26 October 2020 - 09:14 PM in General

Set up your client like:

View:
	//depot/SomeProject/... //myclient/...
	//plugins/Foo/... //myclient/Plugins/Foo/...

With streams the syntax would be:

Paths:
	share ...
	import Plugins/Foo/... //plugins/Foo/...



#26969 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 04:29 PM in P4V

It doesn't look like your server connection info is set up correctly.  I recommend checking with your office's IT folks to make sure everything is pointed at the right place; it's hard for me to really suggest anything when I don't know what the server name is supposed to be, but this seems more like a basic setup issue than a networking problem.



#26967 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 04:07 PM in P4V

Okay, so you're using streams.  That was important information.  :)

Could you set up the merge the way you would do it in P4V, and take a screenshot of the "Merge/integrate" dialog before you hit OK?



#26965 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 03:56 PM in P4V

Maybe a screenshot of P4V's depot tree (the place where you see all the depots and folders) would help -- I'm not sure what "Name>Main>Project" is supposed to refer to.

Reinstalling P4V won't help (all of this information is stored on the server, not in your local P4V installation -- reinstalling your web browser won't make Google return different search results, right?), but double-check your connection settings (the server you're connected to and the workspace you're using).



#26963 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 03:36 PM in P4V

View PostAlexP, on 23 October 2020 - 03:34 PM, said:

Our depots is actually not named depots we have change the names

This is important information!  What's the name of your depot, and what are the names of the two branches you're trying to integrate?  You'll need to use the actual two depot paths in the integrate command instead of just making them up; that's why you're getting error messages.  :)



#26961 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 03:19 PM in P4V

First let's get you set up so you don't need to take screenshots.  :)  In your command prompt window, click the upper left icon, then click "Properties".  Check the "QuickEdit mode" checkbox and click OK.  Now you can just select text with your mouse and copy/paste like you could in a text editor!

Your very first integrate command didn't work because your files aren't actually in a depot called "depot".  Maybe you aren't even connected to the right server?  Run "p4 info" and check the "Server address" info.  If it doesn't look right, run:

p4 set P4PORT=(whatever the right server address is, the same one you use in P4V)

Then run "p4 info" again and check that it connects successfully this time.  Then retry your "p4 integrate" command and copy+paste what you get!



#26958 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 03:07 PM in P4V

The "error in change specification" makes it sound like there was a problem with what you did in the editor when you ran "p4 submit".  What if you just do:

p4 submit -d "Integrate FILE from main to r1.0." FILE

where FILE is one of the files?



#26956 Time out & Disconections

Posted by Sambwise on 23 October 2020 - 02:34 PM in P4V

What you say "nothing happens" do you mean that the initial "p4 integrate" command returns no output and just hangs forever?



#26937 Client map too twisted for directory list

Posted by Sambwise on 22 October 2020 - 03:10 PM in P4V

The error is confusing, but IIRC the general rule is that it happens when you run p4 dirs on a client directory that does not map perfectly 1:1 to a depot directory.  In your example, the Assets directory in the client (i.e. in your own stream) maps to different depot directories, so the command that's failing might be something like p4 dirs //your-client/Assets.

The solution is generally "don't run that command" -- p4 dirs was built for traversing the depot tree and doesn't actually seem to do great at traversing the client-mapped version of it (the easiest way to traverse the client tree is to sync and then traverse the local filesystem), but it's hard to tell P4V that.  Switching to the "depot" tab might fix the problem, but I'm not sure.



#26929 Copying/Renaming a branch spec to a new branch spec OR a new branch spec name

Posted by Sambwise on 20 October 2020 - 07:19 PM in General


p4 --field Branch=specB branch -o specA | p4 branch -i
p4 branch -d specA

The first command copies specA to specB, and the second command deletes specB (completing the rename operation).



#26916 List streams by date modified

Posted by Sambwise on 19 October 2020 - 05:11 PM in P4V

If you want to get the dates in human-readable form rather than Unix timestamps, you can do it by combining "p4 streams" with "p4 stream -o" (since the formatted date is part of the output for individual specs):

C:\Perforce\test>p4 -F "stream -o %stream%" streams | p4 -Ztag -F "%Update% %Stream%" -x - run | sort
2019/04/16 08:31:42 //stream/main
2019/07/24 23:57:31 //Widget/main
2019/07/25 00:02:31 //Sprocket/main
2020/01/18 08:27:11 //stream/baleeted
2020/01/19 09:21:25 //stream/foo
2020/07/12 17:41:06 //collaborators/main



#26915 List streams by date modified

Posted by Sambwise on 19 October 2020 - 04:54 PM in P4V

Use the "p4 streams" command, using "-Ztag" to get the Update time and "-F" to format it into a single sortable line, and then pipe to "sort":

C:\Perforce\test>p4 -Ztag streams
... Stream //Sprocket/main
... Update 1564038151
... Access 1564038151
... Owner Samwise
... Name main
... Parent none
... Type mainline
... desc Created by Samwise.

... Options allsubmit unlocked toparent fromparent mergedown
... firmerThanParent n/a
... changeFlowsToParent true
... changeFlowsFromParent true
... baseParent none

... Stream //Widget/main
... Update 1564037851
... Access 1564037123
... Owner Samwise
... Name main
... Parent none
... Type mainline
... desc Created by Samwise.

... Options allsubmit unlocked toparent fromparent mergedown
... firmerThanParent n/a
... changeFlowsToParent true
... changeFlowsFromParent true
... baseParent none

... Stream //collaborators/main
... Update 1594600866
... Access 1594600776
... Owner Samwise
... Name main
... Parent none
... Type mainline
... desc Created by Samwise.

... Options allsubmit unlocked notoparent nofromparent mergedown
... firmerThanParent n/a
... changeFlowsToParent false
... changeFlowsFromParent false
... baseParent none

... Stream //stream/baleeted
... Update 1579364831
... Access 1579364805
... Owner Samwise
... Name //stream/baleeted
... Parent //stream/main
... Type development
... desc Autocreated by switch command

... Options allsubmit unlocked toparent fromparent mergeany
... firmerThanParent false
... changeFlowsToParent true
... changeFlowsFromParent true
... baseParent //stream/main

... Stream //stream/foo
... Update 1579454485
... Access 1579364891
... Owner Samwise
... Name foo
... Parent //stream/main
... Type development
... desc Created by Samwise.

... Options allsubmit unlocked toparent fromparent mergedown
... firmerThanParent false
... changeFlowsToParent true
... changeFlowsFromParent true
... baseParent //stream/main

... Stream //stream/main
... Update 1555428702
... Access 1509687817
... Owner Samwise
... Name //stream/main
... Parent none
... Type mainline
... desc Autocreated by switch command

... Options allsubmit unlocked notoparent nofromparent mergeany
... firmerThanParent n/a
... changeFlowsToParent false
... changeFlowsFromParent false
... baseParent none


C:\Perforce\test>p4 -Ztag -F "%Update% %Stream%" streams | sort
1555428702 //stream/main
1564037851 //Widget/main
1564038151 //Sprocket/main
1579364831 //stream/baleeted
1579454485 //stream/foo
1594600866 //collaborators/main



#26888 Processes hanging for days

Posted by Sambwise on 08 October 2020 - 02:33 PM in General

If it happens only with p4convert, I'm suspicious that it might be a client-side problem -- IIRC you can get "zombie" processes like this if the client opens a connection and holds it open forever without closing it.  P4V used to do this once upon a time and clog p4d with zombies, although AFAIK that got fixed years ago.



#26884 Export user list?

Posted by Sambwise on 07 October 2020 - 02:59 PM in Administration

Use the command line:

% p4 -F %user%,%email% users
Samwise,Samwise@host
bob,bob@Samwise-dvcs-1509687817



#26878 Processes hanging for days

Posted by Sambwise on 06 October 2020 - 03:17 PM in General

View Postadams_s, on 06 October 2020 - 10:21 AM, said:

Submits were done from the command line, sometimes on the server itself.

Like Miles, I'm curious what stage the submits were "stuck" on.  What was the last thing printed to the command line?  Submit goes through multiple phases and looking at what output you've gotten from the server so far is a good clue as to where specifically it might have gotten stuck.

If it seems like nothing at all got printed, like Miles said, it's likely just stuck at the "edit the spec" stage -- double-check P4EDITOR to make sure it's set to something reasonable.

Are there any triggers configured?  Other than waiting on a response from the client, that's the most likely way for a command to get "stuck" that doesn't involve lock contention.



#26864 Open Perforce checklists during move to a new server

Posted by Sambwise on 28 September 2020 - 04:45 PM in Administration

Nope!  Server-side information about pending changelists is safely stored in the database that you migrate as part of the move, just like submitted changelists.  When the clients connect to the new server, they'll see the exact same pending changelists (and depots, and workspaces, and everything else) that they saw before the move.



#26855 Search for the revision the branch is based on

Posted by Sambwise on 23 September 2020 - 08:11 PM in APIs

The exact revision specifier used to branch the files isn't stored in the changelist; each individual file tracks the revision it was branched from, so you can sort of reverse-engineer a changelist out of all those records by doing something like "p4 changes -m2 -i @=CHANGE" where CHANGE is the changelist that branched all the files.  The Java API should have some sort of "get changelists" function that mimics that command, although I'm not sure if the exact syntax for it.



#26854 Retrieving files from 'change-content' from jenkins

Posted by Sambwise on 23 September 2020 - 05:37 PM in General

In a change-content trigger, the in-flight changelist is accessible as something very much like a shelf.  I'm not sure offhand if you can actually "p4 unshelve" the changelist while it's in that state, but I'm positive that commands like "p4 print @=CHANGE" will work.



#26853 Question about folders/workspaces inside depot

Posted by Sambwise on 23 September 2020 - 05:35 PM in P4V

Could you share the actual client spec(s) that are involved in this scenario?  If the root for the first client is Project1, then nothing you add to Project2 is part of that workspace (and hence it will not be added to the depot).  Is the actual Root one folder higher?



#26832 p4 print but output in the format that was used for calculating digest

Posted by Sambwise on 15 September 2020 - 07:33 PM in General

If you can do this in a workspace (i.e. use "p4 sync" instead of "p4 print"), it's much easier, because then you have access to commands like "p4 diff -se" and "p4 clean" that will do the checksum comparison in a LineEnd-aware way.

If you're forced to use "p4 print", I think the easiest option is to do the CRLF->LF normalization yourself after doing the print command, either doing it on disk or doing it in-memory as you compute the checksum.



#26828 Issues with C++ API

Posted by Sambwise on 14 September 2020 - 03:05 PM in APIs

https://swarm.worksh...rce_software-p4



#26824 Issues with C++ API

Posted by Sambwise on 14 September 2020 - 01:12 AM in APIs

The client library is open source (available at workshop.perforce.com); you might have an easier time just building it from source than getting an "official" build that matches the specific environment/settings you need.



#26819 Revert Command takes a lot time on Mac

Posted by Sambwise on 11 September 2020 - 04:37 PM in General

What error did the previous command report?

Does this only happen within your script, or does it happen if you run the revert from a normal p4 client?  If you can reproduce it from the CLI, what does the "-Ztrack" performance tracking show that it's spending its time on?



#26802 Is it possible to "soft ignore" files in a workspace?

Posted by Sambwise on 07 September 2020 - 03:34 PM in General

If you're using streams, you can do this within a single workspace fairly easily -- do most of your work in a filtered virtual stream, and switch to the parent when you want a wider view, being careful which files you sync while you're in the parent (use "p4 client -s -S stream" to switch instead of "p4 switch stream" to avoid auto-syncing everything).

Another possibility for a "soft exclude" would be to "p4 flush" ("p4 sync -k") the files you want to exclude, so that a "p4 sync -f" is required to fetch them.  I'm not sure if this is one that I'd actually recommend using in practice because any time you're deliberately putting the workspace into an inconsistent state the odds of confusing yourself are high -- I'd much rather deal with accidentally syncing files and having to Ctrl-C them than having things break more quietly because I didn't have the files synced that I thought I did.