Code item configuration method and device, equipment and storage medium
By building a two-level storage structure of shared configuration directory and sub-configuration directory in the code project, and using symbolic links to achieve automatic redirection of configuration files, the configuration conflict problem between different developers is solved, and development efficiency is improved.
Patent Information
- Application Number
- CN202511532035.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, configuration files for code projects rely on fixed local paths for management, which cannot support personalized configurations by different developers, leading to configuration file conflicts and reducing development efficiency.
By creating a two-level storage structure of shared configuration directory and sub-configuration directories, and using symbolic links to associate the project configuration directory with the sub-configuration directories, automatic redirection of configuration files is achieved, isolating configuration information from different users.
It enables personalized configurations for different users, avoids configuration file conflicts, improves development efficiency, and meets the configuration needs of multi-user projects.
Smart Images

Figure CN121680915A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a code project configuration method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of computer technology, software systems have evolved from early single-function programs to complex, multi-module collaborative systems capable of covering diverse scenarios such as enterprise applications, mobile terminals, and cloud services. During software development, developers need to save their personal configuration files. These configuration files are structured text files used to store parameters, preferences, and environmental information required for program, system, or application operation. Examples include configuration files related to IDEs (Integrated Development Environments), versions of third-party libraries that the code project depends on, configuration information for project build tools, and environment variable configuration information during project runtime.
[0003] In related technologies, configuration files for code projects rely on fixed local paths for management. However, when multiple developers work on the same code project, it cannot support different personalized configurations, which can easily lead to configuration file conflicts and reduce development efficiency. Summary of the Invention
[0004] This application provides a code project configuration method, apparatus, device, and storage medium to solve the problems in related technologies that cannot support different personalized configurations, are prone to configuration file conflicts, and result in low development efficiency. It can support personalized configurations for different users, realize configuration sharing, isolate configuration information of different users, avoid configuration file conflicts, and improve development efficiency.
[0005] In a first aspect, embodiments of this application provide a code project configuration method, the method comprising: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory; Query the project configuration directory corresponding to the current code project, and create a symbolic link from the project configuration directory to the sub-configuration directory; Upon receiving an information configuration operation corresponding to the project configuration directory, at least one configuration file corresponding to the information configuration operation is generated, and the at least one configuration file is stored in the sub-configuration directory via the symbolic link.
[0006] Secondly, embodiments of this application also provide a code project configuration device, including: The target creation module is configured to create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory. The symbolic link creation module is configured to query the project configuration directory corresponding to the current code project and create a symbolic link from the project configuration directory to the sub-configuration directory; The configuration file determination module is configured to generate at least one configuration file corresponding to the information configuration operation when receiving the information configuration operation corresponding to the project configuration directory, and store the at least one configuration file to the sub-configuration directory through the soft link.
[0007] Thirdly, embodiments of this application also provide a code project configuration device, the device comprising: One or more processors; Storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the code project configuration method described in the embodiments of this application.
[0008] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which are configured to execute the code item configuration method described in embodiments of this application when executed by a computer processor.
[0009] In this embodiment, a two-level storage structure can be constructed by creating a shared configuration directory and sub-configuration directories, achieving configuration isolation between different developers. By associating the project configuration directory and sub-configuration directories with symbolic links, the original storage paths corresponding to developers' information configuration operations can be transformed into specified personalized paths. Automatic redirection of configuration files via symbolic links balances isolated storage and centralized management of configuration files, meeting the configuration needs of multi-user projects. The above solution supports personalized configurations for different users, achieving configuration sharing while isolating configuration information from different users, avoiding configuration file conflicts, and improving development efficiency. Attached Figure Description
[0010] Figure 1 A flowchart illustrating a code project configuration method provided in this application embodiment; Figure 2 A schematic diagram illustrating the directory setup and file storage process of an application code project configuration method provided in this application embodiment; Figure 3 A flowchart illustrating a code project configuration method including a process for creating symbolic links, provided as an embodiment of this application; Figure 4A flowchart illustrating a code project configuration method including a process for creating a sub-configuration directory, provided as an embodiment of this application; Figure 5 A flowchart of a code project configuration method including a process for generating version records is provided for embodiments of this application; Figure 6 A flowchart illustrating a code project configuration method that includes a process for modifying a configuration file, provided as an embodiment of this application; Figure 7 A flowchart illustrating a code project configuration method that includes a process for updating version records, provided as an embodiment of this application; Figure 8 A flowchart illustrating a code project configuration method that includes a process for periodically updating configuration files, provided as an embodiment of this application; Figure 9 A structural block diagram of a code project configuration device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of a code project configuration device provided in an embodiment of this application. Detailed Implementation
[0011] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.
[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0013] The code project configuration method provided in this application embodiment can be executed by a computer device. The computer device refers to any electronic device with data computing, processing and storage capabilities, such as a server. This application embodiment does not limit this.
[0014] Figure 1 A flowchart of a code project configuration method provided in an embodiment of this application is shown below. Figure 1As shown, the configuration method for this code project specifically includes the following steps: Step S101: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0015] The current code project can be a specific software project under development, such as a backend service, a frontend application, or a utility program. The shared configuration directory can be a root-level directory set up for the current code project to centrally store configuration information for all developers, providing a unified storage path for multiple different developers. The user login name can be the login name used by a developer operating on the current code project, serving as a unique identifier to distinguish different developers. Sub-configuration directories can be sub-directories under the shared configuration that are uniquely associated with the user login name. These directories can be used to store the developer's personal configurations for the current code project, thereby achieving physical isolation of configuration information among developers.
[0016] Step S102: Query the project configuration directory corresponding to the current code project, and create a symbolic link between the project configuration directory and the sub-configuration directory.
[0017] The project configuration directory can be the default directory for storing configuration files in the current code project, such as a specific internal path under the project root directory. A symbolic link can be a path mapping between the project configuration directory and its sub-configuration directories, allowing access to the symbolic link to automatically jump from the project configuration directory to the sub-configuration directory. In essence, the current code project can access its own project configuration directory according to its original program logic, but the actual operation is directed to the sub-configuration directory used by the developers.
[0018] Step S103: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0019] The information configuration operation can be any action taken by a developer within the current code project that triggers the generation of a configuration file. Examples include configuring the project through a UI or executing configuration commands. By default, this operation operates within the project configuration directory. The configuration file can be a file that records configuration information (such as parameters required for project execution, user preference settings, etc.), and its specific format can be .json, .ini, .yaml, etc. Based on the specific configuration content in the information configuration operation, a configuration file in a defined format can be generated, transforming the developer's actions into structured configuration data recognizable by the current code project. After generating at least one configuration file, a symbolic link can automatically store the configuration file originally stored in the project configuration directory into the sub-configuration directory pointed to by that symbolic link. Thus, each developer can maintain their own personalized configuration directory to store their individual configuration information within the current code project.
[0020] Figure 2 A schematic diagram illustrating the directory setup and file storage process of an application code project configuration method provided in this application embodiment is shown below. Figure 2 As shown, a sub-configuration directory 202 is set under the shared configuration directory 201, and a symbolic link 204 is created between the project configuration directory 203 and the sub-configuration directory 202. Upon receiving an information configuration operation 205 corresponding to the project configuration directory 203, at least one configuration file 206 corresponding to the information configuration operation 205 can be generated, and the at least one configuration file 206 is stored in the sub-configuration directory 202 through the symbolic link 204.
[0021] As described above, by creating a shared configuration directory and sub-configuration directories, a two-level storage structure can be constructed to achieve configuration isolation between different developers. By linking the project configuration directory and sub-configuration directories with symbolic links, the original storage paths corresponding to developers' information configuration operations can be transformed into specified personalized paths. Automatic redirection of configuration files via symbolic links balances isolated storage and centralized management of configuration files, meeting the configuration needs of multi-user projects. This solution supports personalized configurations for different users, enabling configuration sharing while isolating configuration information from different users, avoiding configuration file conflicts, and improving development efficiency.
[0022] Figure 3 A flowchart of a code project configuration method including the process of creating symbolic links is provided for embodiments of this application, such as... Figure 3 As shown, the configuration method for this code project specifically includes the following steps: Step S301: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0023] Step S302: Query the project configuration directory corresponding to the current code project, and construct a target mapping command based on the current operating system system type, project configuration directory and sub-configuration directory; execute the target mapping command to obtain a soft link from the project configuration directory to the sub-configuration directory.
[0024] Because different operating systems have different file systems and command syntaxes, it's necessary to first identify the current operating system type to facilitate the subsequent construction of target mapping commands. Target mapping commands can be operating system commands used to create symbolic links pointing from the project configuration directory to its sub-configuration directories. Symbolic links can be constructed based on the syntax corresponding to the current operating system type. For example, if the project configuration directory is "abc" and the created shared configuration directory is "abc_share", and if the current code project has three developers (user1, user2, and user3), then each developer can create their own corresponding sub-configuration directories under the shared configuration directory "abc_share", specifically abc_share / abc_user1, abc_share / abc_user2, and abc_share / abc_user3. If the current operating system is Linux, the corresponding commands for creating symbolic links would be: `ln -s abc_share / abc_user1 abc` for developer user1, `ln -s abc_share / abc_user2 abc` for developer user2, and `ln -s abc_share / abc_user3 abc` for developer user3. Executing the target mapping command will create symbolic links from the project configuration directory to its sub-configuration directory, effectively establishing a path mapping from the project configuration directory to its sub-configuration directory.
[0025] Step S303: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0026] The above can adapt to the differences in system types of different operating systems. Based on the target mapping command adapted to the current system type, the project configuration directory is mapped to the sub-configuration directory, which is compatible with the configuration requirements of different operating systems.
[0027] Figure 4 A flowchart illustrating a code project configuration method including a process for creating a sub-configuration directory, provided as an embodiment of this application, is shown below. Figure 4 As shown, the configuration method for this code project specifically includes the following steps: Step S401: Create a shared configuration directory corresponding to the current code project, obtain the user login name, perform a hash calculation on the user login name with a preset length to obtain the hash value, merge the preset directory name and the hash value to obtain the target directory name; add a sub-configuration directory corresponding to the target directory name under the shared configuration directory.
[0028] The user login name is used to uniquely identify different developers. Therefore, the user login name can be added to the generation of the target directory name corresponding to the sub-configuration directory to distinguish the configuration directory paths of different developers. Since the content format and length of user login names may vary, to standardize the directory name length and facilitate standardized system management, a hash value with a preset length can be calculated for the user login name. This is equivalent to converting the user login name into a fixed-length hash value, which also achieves the purpose of hiding the original user login name. The preset directory name can be a pre-set fixed directory prefix related to the current code project, used to distinguish different code projects. By merging the preset directory name and the hash value, the target directory name can be obtained, which is the final name of the developer's sub-configuration directory.
[0029] Step S402: Query the project configuration directory corresponding to the current code project, and create a symbolic link between the project configuration directory and the sub-configuration directory.
[0030] Step S403: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0031] As described above, by performing a hash calculation on the user login name with a preset length to obtain a hash value, and applying it to the generation of the target directory name, personalized directories corresponding to different developers can be obtained. At the same time, the directory names are standardized, enabling the configuration of exclusive sub-configuration directories for different developers.
[0032] Figure 5 A flowchart of a code project configuration method including a process for generating version records is provided for embodiments of this application, such as... Figure 5 As shown, the configuration method for this code project specifically includes the following steps: Step S501: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0033] Step S502: Query the project configuration directory corresponding to the current code project, and create a soft link from the project configuration directory to the sub-configuration directory.
[0034] Step S503: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0035] Step S504: Add the shared configuration directory and sub-configuration directory to the version management system; generate initial version information based on the shared configuration directory, sub-configuration directory and at least one configuration file; synchronize the initial version information and at least one configuration file to the version management system so that the version management system generates version records corresponding to the sub-configuration directory.
[0036] The version management system can be a tool for tracking the history of file or directory changes, supporting functions such as recording each modification, rewinding historical versions, and multi-user collaborative synchronization. Initial version information can be metadata generated when configuration resources are integrated into the version management system. Specifically, it can be obtained by merging the directory names corresponding to the shared configuration directory, the directory names corresponding to the sub-configuration directories, and the file identifiers corresponding to the configuration files. Alternatively, it can be generated by constructing an information mapping table of the directory names corresponding to the shared configuration directory, the directory names corresponding to the sub-configuration directories, and the file identifiers corresponding to the configuration files. This application does not impose any limitations on this. Version records can be historical change entries for a directory or file recorded in the version management system, specifically including version numbers, change content, timestamps, etc., used for tracing and rolling back. By adding the shared configuration directory and sub-configuration directories to the version management system, the version management system can identify and monitor subsequent changes to the aforementioned directories. By synchronizing the initial version information and configuration files to the version management system, the initial version information and configuration files can be synchronously stored in the version management system, causing the version management system to generate the first version record corresponding to the sub-configuration directory.
[0037] As mentioned above, by introducing a version management system, the version information associated with the configuration resources of the current code project can be effectively recorded, providing reliable baseline information for subsequent version tracing, rollback, or updates.
[0038] Figure 6 A flowchart illustrating a code project configuration method including a process for modifying configuration files, provided as an embodiment of this application, is shown below. Figure 6 As shown, the configuration method for this code project specifically includes the following steps: Step S601: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0039] Step S602: Query the project configuration directory corresponding to the current code project, and create a symbolic link between the project configuration directory and the sub-configuration directory.
[0040] Step S603: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0041] Step S604: Upon receiving a configuration modification operation corresponding to the project configuration directory, locate the target configuration file corresponding to the configuration modification operation in the sub-configuration directory through a symbolic link; modify the content of the target configuration file according to the corresponding configuration modification operation.
[0042] Configuration modification operations can involve developers making changes to existing configuration files in the current code project. These operations may include the target file identifier and the specific changes required. Symbolic links allow developers to navigate from the project configuration directory back to the actual storage path (i.e., sub-configuration directories) and identify the target configuration file to be modified. Based on the specific changes required by this configuration modification operation, the target configuration file can be modified to update the relevant configuration items.
[0043] As mentioned above, using symbolic links ensures that configuration modification operations are accurately located to the target configuration file in the sub-configuration directory, avoiding accidental modification of other developers' configuration information and flexibly adapting to multi-user collaborative application scenarios.
[0044] Figure 7 A flowchart of a code project configuration method including a process for updating version records is provided for embodiments of this application, such as... Figure 7 As shown, the configuration method for this code project specifically includes the following steps: Step S701: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0045] Step S702: Query the project configuration directory corresponding to the current code project, and create a symbolic link from the project configuration directory to the sub-configuration directory.
[0046] Step S703: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0047] Step S704: Upon receiving a configuration modification operation corresponding to the project configuration directory, locate the target configuration file corresponding to the configuration modification operation in the sub-configuration directory through a symbolic link; modify the content of the target configuration file according to the corresponding configuration modification operation.
[0048] Step S705: Generate version description information based on the sub-configuration directory, target configuration file, and configuration modification operation content; synchronize the version description information and target configuration file to the version management system so that the version management system updates the version record corresponding to the sub-configuration directory.
[0049] The version description information can be file information and change content information corresponding to the configuration modification operation. Specifically, it can be obtained by merging the directory name of the sub-configuration directory, the file name of the target configuration file, and the operation content of the configuration modification operation. Alternatively, it can be obtained by extracting the incremental changes from the target configuration file and then merging the directory name of the sub-configuration directory, the incremental changes, and the operation content of the configuration modification operation. This application does not limit this. Synchronizing the version description information and the target configuration file to the version management system allows the version management system to update the version records corresponding to the sub-configuration directory, for example, by generating new version records based on the existing ones.
[0050] As described above, by generating version description information and synchronizing the version description information and target configuration file to the version management system, version history can be effectively built, the traceability of configuration modifications can be achieved, and it is more conducive to managing the iterative updates of configuration information.
[0051] Figure 8 A flowchart illustrating a code project configuration method including a process for periodically updating configuration files, provided as an embodiment of this application, is shown below. Figure 8 As shown, the configuration method for this code project specifically includes the following steps: Step S801: Create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0052] Step S802: Query the project configuration directory corresponding to the current code project, and create a soft link from the project configuration directory to the sub-configuration directory.
[0053] Step S803: Upon receiving an information configuration operation corresponding to the project configuration directory, generate at least one configuration file corresponding to the information configuration operation, and store at least one configuration file in the sub-configuration directory via a symbolic link.
[0054] Step S804: Add the shared configuration directory and sub-configuration directories to the version management system.
[0055] Step S805: Generate initial version information based on the shared configuration directory, sub-configuration directory and at least one configuration file.
[0056] Step S806: Synchronize the initial version information and at least one configuration file to the version management system so that the version management system generates version records corresponding to the sub-configuration directory.
[0057] Step S807: When the preset time node is reached, compare the configuration file version corresponding to the current code project with the full version record in the version management system.
[0058] The preset time point can be a pre-defined time point to trigger version comparison, used to periodically check the consistency of configuration files. The configuration file version can be the version of the local configuration file corresponding to the current code project. The full version record can be the complete change history of all configuration files corresponding to the current code project stored in the version management system. By comparing the configuration file version corresponding to the current code project with the full version record in the version management system, it can be determined whether there are version differences between local and cloud environments.
[0059] Step S808: If the configuration file version is lower than the latest file version in the full version record, download at least one latest configuration file from the version management system and update the shared configuration directory with at least one latest configuration file.
[0060] If a configuration file version is lower than the latest file version in the full version record, an update process can be triggered. By downloading at least one of the latest configuration files from the version management system, the latest version of the corresponding configuration file can be obtained. Then, updating the shared configuration directory with this latest configuration file will overwrite and replace the old configuration file, maintaining the timeliness of files in the shared configuration directory.
[0061] As described above, the timed comparison mechanism can promptly detect differences between the local configuration and the latest version in the version management system. By automatically downloading and updating the latest configuration file, it can ensure that the configuration in the local shared configuration directory is consistent with the version management system, avoiding project operation problems caused by configuration lag.
[0062] Figure 9 This is a structural block diagram of a code project configuration device provided in an embodiment of this application. The device is configured to execute the code project configuration method provided in the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. For example... Figure 9 As shown, the device specifically includes: The target module 901 is configured to create a shared configuration directory corresponding to the current code project, obtain the user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory.
[0063] The symbolic link creation module 902 is configured to query the project configuration directory corresponding to the current code project and create symbolic links pointing from the project configuration directory to the sub-configuration directory.
[0064] The configuration file determination module 903 is configured to generate at least one configuration file corresponding to the information configuration operation when receiving the information configuration operation corresponding to the project configuration directory, and store at least one configuration file to the sub-configuration directory through a symbolic link.
[0065] As described above, by creating a shared configuration directory and sub-configuration directories, a two-level storage structure can be constructed to achieve configuration isolation between different developers. By linking the project configuration directory and sub-configuration directories with symbolic links, the original storage paths corresponding to developers' information configuration operations can be transformed into specified personalized paths. Automatic redirection of configuration files via symbolic links balances isolated storage and centralized management of configuration files, meeting the configuration needs of multi-user projects. This solution supports personalized configurations for different users, enabling configuration sharing while isolating configuration information from different users, avoiding configuration file conflicts, and improving development efficiency.
[0066] In one possible embodiment, the soft link creation module 902 is further configured to: The command to build a target mapping based on the current operating system's system type, project configuration directory, and sub-configuration directories; Executing the target mapping command generates a symbolic link from the project configuration directory to the sub-configuration directory.
[0067] In one possible embodiment, the target creation module 901 is further configured as follows: The user login name is hashed to a preset length to obtain a hash value. The preset directory name and the hash value are then merged to obtain the target directory name. Add a sub-configuration directory corresponding to the target directory name under the shared configuration directory.
[0068] In one possible embodiment, a version record generation module is also included, configured as follows: Add the shared configuration directory and sub-configuration directories to the version control system; Initial version information is generated based on the shared configuration directory, sub-configuration directories, and at least one configuration file; The initial version information and at least one configuration file are synchronized to the version management system so that the version management system can generate version records corresponding to the sub-configuration directories.
[0069] In one possible embodiment, a configuration content modification module is also included, configured as follows: Upon receiving a configuration modification operation corresponding to the project configuration directory, locate the target configuration file corresponding to the configuration modification operation in the sub-configuration directory through a symbolic link; Modify the corresponding configuration settings in the target configuration file.
[0070] In one possible embodiment, a version record update module is also included, configured as follows: Version description information is generated based on the sub-configuration directory, target configuration file, and the operation content of configuration modification. Synchronize version information and target configuration files to the version management system so that the version management system can update the version records corresponding to the sub-configuration directories.
[0071] In one possible embodiment, a configuration file update module is also included, configured as follows: When a preset time point is reached, the configuration file version corresponding to the current code project will be compared with the full version record in the version management system. If the configuration file version is lower than the latest file version in the full version record, download at least one latest configuration file from the version management system and update the shared configuration directory with at least one latest configuration file.
[0072] Figure 10 This application provides a schematic diagram of the structure of a code project configuration device, as shown in the embodiments of this application. Figure 10 As shown, the device includes a processor 1001, a memory 1002, an input device 1003, and an output device 1004; the number of processors 1001 in the device can be one or more. Figure 10 Taking a processor 1001 as an example; the processor 1001, memory 1002, input device 1003, and output device 1004 in the device can be connected via a bus or other means. Figure 10 Taking a bus connection as an example, the memory 1002, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the code item configuration method in this embodiment. The processor 1001 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 1002, thereby implementing the above-mentioned code item configuration method. The input device 1003 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 1004 may include a display device such as a screen.
[0073] The code project configuration device provided above can be used to execute the code project configuration method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0074] This application also provides a non-volatile storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform a code project configuration method described in the above embodiments, which includes: creating a shared configuration directory corresponding to the current code project; obtaining a user login name; creating a sub-configuration directory corresponding to the user login name under the shared configuration directory; querying the project configuration directory corresponding to the current code project; creating a soft link from the project configuration directory to the sub-configuration directory; and, upon receiving an information configuration operation corresponding to the project configuration directory, generating at least one configuration file corresponding to the information configuration operation; and storing the at least one configuration file to the sub-configuration directory via a soft link.
[0075] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media, optical storage; registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which the program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0076] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the code project configuration method described above, but can also execute related operations in the code project configuration method provided in any embodiment of this application.
[0077] It should be noted that the numbering of each step in this solution is only used to describe the overall design framework of this solution and does not indicate a necessary sequential relationship between the steps. As long as the overall implementation process conforms to the overall design framework of this solution, it falls within the protection scope of this solution. The literal order in the description is not an exclusive limitation on the specific implementation process of this solution. Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0078] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0079] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method of configuring a code item, characterized by, The method comprises the following steps: creating a shared configuration directory corresponding to a current code project, obtaining a user login name, and creating a sub-configuration directory corresponding to the user login name under the shared configuration directory; querying a project configuration directory corresponding to the current code project, and creating a soft link of the project configuration directory pointing to the sub-configuration directory; in the case of receiving an information configuration operation corresponding to the project configuration directory, generating at least one configuration file corresponding to the information configuration operation, and storing the at least one configuration file in the sub-configuration directory through the soft link.
2. The code item configuration method of claim 1, wherein, The method comprises the following steps: constructing a target mapping command according to the system type of the current operating system, the project configuration directory and the sub-configuration directory; executing the target mapping command to obtain a soft link of the project configuration directory pointing to the sub-configuration directory.
3. The code item configuration method of claim 1, wherein, The method comprises the following steps: performing a preset length hash calculation on the user login name to obtain a hash value, merging a preset directory name and the hash value to obtain a target directory name, and adding a sub-configuration directory corresponding to the target directory name under the shared configuration directory. After storing the at least one configuration file in the sub-configuration directory through the soft link, the method further comprises the following steps:
4. The code item configuration method of claim 1, wherein, adding the shared configuration directory and the sub-configuration directory to a version management system; generating initial version information based on the shared configuration directory, the sub-configuration directory and the at least one configuration file; synchronizing the initial version information and the at least one configuration file to the version management system, so that the version management system generates a version record corresponding to the sub-configuration directory. After storing the at least one configuration file in the sub-configuration directory through the soft link, the method further comprises the following steps:
5. The code item configuration method according to any one of claims 1 to 4, wherein, in the case of receiving a configuration modification operation corresponding to the project configuration directory, locating a target configuration file corresponding to the configuration modification operation under the sub-configuration directory through the soft link; performing content modification on the target configuration file corresponding to the configuration modification operation. After performing content modification on the target configuration file corresponding to the configuration modification operation, the method further comprises the following steps:
6. The code item configuration method of claim 5, wherein, generating version description information based on the sub-configuration directory, the target configuration file and the operation content of the configuration modification operation; synchronizing the version description information and the target configuration file to the version management system, so that the version management system updates the version record corresponding to the sub-configuration directory. After synchronizing the initial version information and the at least one configuration file to the version management system, the method further comprises the following steps:
7. The code item configuration method of claim 4, wherein, in the case of reaching a preset time node, comparing a configuration file version corresponding to the current code project with full version records in the version management system; in the case of the configuration file version being lower than the latest file version in the full version records, downloading at least one latest configuration file from the version management system, and updating the at least one latest configuration file to the shared configuration directory. The method comprises the following steps:
8. An apparatus for configuring a code item, characterized by The target creating module is configured to create a shared configuration directory corresponding to the current code project, acquire a user login name, and create a sub-configuration directory corresponding to the user login name under the shared configuration directory. The soft link creating module is configured to query a project configuration directory corresponding to the current code project, and create a soft link of the project configuration directory pointing to the sub-configuration directory. The configuration file determining module is configured to, in a case where an information configuration operation corresponding to the project configuration directory is received, generate at least one configuration file corresponding to the information configuration operation, and store the at least one configuration file to the sub-configuration directory through the soft link.
9. A code item configuration device, characterized by The device includes one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processors implement the code project configuration method of any one of claims 1-7.
10. A non-volatile storage medium for storing computer-executable instructions, characterized in that, The computer executable instructions are configured to execute the code project configuration method of any one of claims 1-7 when executed by a computer processor.