Is here a way to create a workspace with a root linked to OS temp folder?
Want to use the same workspace on both linux and windows clients.
Something like Root:%temp%/root_folder
No, env variable expansion is not supported in the client root.
Based on your description of your use case, I think you want to generate a (unique) temporary client for each operation and delete it when you’re done. Trying to reuse one client spec just opens you up to really unpleasant race conditions.
Related
I just discovered we can turn on per directory case sensitivity on Windows 10 and that one needs to recursively enable this feature on every child directory so everything under the root folder supports case sensitivity. This is fine if I had a pre-existing directory tree I suppose.
But what if I had an existing codebase, with a set of subdirectories and files that has case sensitive names, which is hosted on a remote system (e.g. a perforce case-sensitive server) that I want to copy over to a root folder on Windows 10 that I have enabled case sensitivity on? Can I (perforce) sync first to download the codebase into the root folder and then run a recursive command (as shown here Apply setCaseSensitiveInfo recursively to all folders and subfolders) to enable case sensitivity so editors can correctly open files that just differ in case? Will that work? If not how can I achieve this?
P.S. This is the first time I'm posting here so please let me know if this question appears ambiguous in any way and I'll do my best to edit/re-post.
P.P.S. Also I'm in the middle of a transition from a Macbook to a Windows laptop and as such do not have a windows machine to try this on for myself, so I ask this question to gain understanding, that will aid in the setup of a development environment on a Windows machine. Thanks in advance!
Finally got my hands on a windows machine to test this behavior and I can confirm that cloning/sync'ing a repository with a subdirectory tree containing case sensitive files and folders, into a root folder that has the case sensitivity attribute enabled will work and applications are able to open these files correctly subsequently; the key concept here is case-sensitivity inheritance for new children!
Sure enough, I later found this article explaining the feature: https://devblogs.microsoft.com/commandline/improved-per-directory-case-sensitivity-support-in-wsl/#case-sensitivity-inheritance
Hi have an application running separateley (1 instance for customer) in different folders, 1 per each customer.
Each customer is a separate user on my machine.
At the moment I have the source code in each of these folders where I rebuild the code per each instance. Would it be better if I do something like the following?
create a shared folder where I build the code
deploy the binary in each user folder.
allow permission for each user to access the source code in READ ONLY mode.
when it is time to debug, by using gdb in each user folder will allow to read the source code and debug will happen.
Do you think that this could be a better approach or there are better practice?
My only concern is that each user has the chance to read the source code, but since the user will not access directly his folder (it is in my control) this should not trouble me.
I am using CENTOS 6.4, SVN and G++/GDB.
in different folders
There are no "folders" on UNIX, they are called directories.
I rebuild the code per each instance
Why would you do that?
Is the code identical (it sounds like it is)? If so, build the application once. There is no reason at all to have multiple copies of the resulting binary, or the sources.
If you make the directory with sources and binaries world-readable, then every user will be able to debug it independently.
Recently our development team received new pc's. In an effort to make this transition smoother, I would like to be able to explain to my co-workers how to continue using the client they already have set up to pull files to and from the new pc while eventually ignoring the old pc workspace altogether.
I know about adjusting the attributes of the client itself and allowing the client to be accessed by different hosts. What I'm looking to do now is update the perforce have list for the given client to reflect the files (or lack thereof) that are on the new pc's file system (in the correctly mapped location, obviously).
I'm not sure if it is possible with the p4 flush command for perforce to know which revision of an existing workspace file i have without explicitly telling perforce which revision it is...? (this seems like its asking a lot)
Apart from files that Do exist in the workspace, is there a command that will update the have list to #0 for files that don't exist in the workspace?
OR
Is the sledgehammer approach:
submit any pending changes in the old and/or new workspace
remove any files that may have already been forced into the (new) workspace
$:p4 flush [workspace root]/...#0
appropriate in this situation?
If using the existing workspaces is an option, then this should be pretty easy. It sounds like you already know how to make a workspace accessible from a different host (you can leave it blank to make it accessible by any host). If you copy the workspace folder to the new PC, and update the root of the workspace as necessary, it should "just work" without any additional changes.
If I'm understanding your question correctly, I believe that using a workspace name as your revision modifier will do what you want. For example p4 flush //depot/path/some/file#workspacename. For new machines, we often go through these basic steps to avoid having to resync files.
Copy the files in the workspace from machine 1 to machine 2
Create a client that matches the old client's mappings
In the new client, run:
p4 flush //depot/...#oldclientname
I have two computers: Work, and Home.
My workspace in my Work Laptop is synced in a Dropbox. That's why I could access my work at home.
But when I try to setup my Perforce at home, I don't know how to link or detect that I have an existing workspace in my Dropbox.
How?
First, I'll assume you can access your Perforce server from home, since you don't mention this in your problem statement.
Next, I'll assume you're able to use the same directory structure at home that you use at work (e.g. C:\Dropbox\projx).
When you create your client spec at work, be sure to edit out the HOST: line, since you'll be using it on two machines.
Use the same client name at home that you use at work.
If for some reason you are unable to use the same directory structure on both machines, you may have to use "p4 client" to change the ROOT: line of your client spec every time you switch between home and work.
Alternatively, you could use two different clients, and use "p4 shelve" to move files to the server when you're done for the day.
You basically just need to tell Perforce the name of your client. Usually you'll do this by adding a .p4config file in your Perforce client's root directory (or in one of its parent directories) that contains the line:
P4CLIENT=your-perforce-client-name
You might also need to add an environment variable that points to this file: P4CONFIG=.p4config.
If the local path to your client's root is different between your work and home machines, you'll also need to set AltRoots in your Perforce client specification and add the path for your home machine.
well I have several repositories and i want several users to access them using svnserve.exe service.
the problem is that i want to write the user names and passwords only in 1 location.
the Repositories are in the D:\SVN\ path
so lets name them
D:\Svn\Rep1\
D:\Svn\Rep2\ ...
well I tried to modify the svnserve.conf file in each of them to point to a single file like D:\Svn\conf.global\passwd using
password-db=D:\Svn\conf.global\passwd
but it didn't work :(
any ideas? or I need to do it the stupid way and duplicate the passwd file in each repository?
You have to use this syntax instead:
password-db = //./D:/Svn/conf.global/passwd
That's the Uniform Naming Convention on Windows to access the local machine (the dot . which could be replaced by a machine name) at its root disk D:, followed by the path - with slashes here. A little tricky at first glance but does the job.