A fast Perforce to Git conversion tool written in C++ using Perforce Helix Core C++ API and Libgit2

Overview

P4 Fusion

A fast Perforce depot to Git repository converter using the Helix Core C/C++ API as an attempt to mitigate the performance bottlenecks in git-p4.py.

This project was started as a proof of concept for an internal project which required converting P4 depots to Git repositories. A similar solution exists within Git, known as git-p4.py, however, it has (as of the time of writing) performance issues with any depot greater than 1 GB in size, and it runs in a single thread using Python2 which adds another set of limitations to the use of git-p4.py for larger use-cases.

This tool solves some of the most impactful scaling and performance limitations in git-p4.py by:

  • Using the Helix Core C++ API to handle downloading CLs with more control over the memory and how it is committed to the Git repo without unnecessary memory copies and file I/O.
  • Using libgit2 to forward the file contents received from the Perforce server as-is to a Git repository, while avoiding memory copies as much as possible. This library allows creating commits from file contents existing plainly in memory.
  • Using a custom wakeup-based threadpool implemented in C++11 that runs thread-local library contexts of the Helix Core C++ API to heavily multithread the changelist downloading process.

Performance

Please be aware that this tool is fast enough to instantaneously generate a tremendous amount of load (more than 150K requests in a few minutes if running with a moderate number of threads) on your Perforce server, thus, it needs careful monitoring to ensure that the Perforce server does not get impacted. This tool will continue generating load without any rate limitations (apart from the runtime options that this tool provides) till the conversion process is complete. However, having no rate limits and running this tool with several hundred network threads (or more if possible) is the ideal case for achieving maximum speed in the conversion process.

The number of network threads shall be set to a number generally be more than the number of logical CPUs because the most time-taking step is downloading the CL data, which is mostly network I/O bounded.

In our study, this tool is running upwards of 100 times faster than git-p4.py. We have observed an average time of 26 seconds for the conversion of the history inside a depot path containing around 3393 moderately sized changelists using 200 parallel connections, while git-p4.py was taking close to 42 minutes to convert the same depot path. If the Perforce server has the files cached completely then these conversion times might be reproducible, else if the file cache is empty then the first couple of runs are expected to take much more time.

These execution times are expected to scale as expected with larger depots (millions of CLs or more). The tool provides options to control the memory utilization during the conversion process so these options shall help in larger use-cases.

Usage

❯ ./build/p4-fusion/p4-fusion
[ PRINT @ Main:24 ] Running p4-fusion from: ./build/p4-fusion/p4-fusion
[ PRINT @ Main:43 ] Usage:
[Required] --port
        Specify which P4PORT to use.

[Required] --path
        P4 depot path to convert to a Git repo

[Required] --lookAhead
        How many CLs in the future, at most, shall we keep downloaded by the time it is to commit them?

[Required] --src
        Local relative source path with P4 code. Git repo will be created at this path. This path should be empty before running p4-fusion.

[Required] --client
        Name/path of the client workspace specification.

[Required] --user
        Specify which P4USER to use. Please ensure that the user is logged in.

[Optional, Default is false] --includeBinaries
        Don't discard binary files while downloading changelists.

[Optional, Default is false] --fsyncEnable
        Enable fsync() while writing objects to disk to ensure they get written to permanent storage immediately instead of being cached. This is to mitigate data loss in events of hardware failure.

[Optional, Default is 10] --retries
        Specify how many times a command should be retried before the process exits in a failure.

[Optional, Default is 16] --networkThreads
        Specify the number of threads in the threadpool for running network calls. Defaults to the number of logical CPUs.

[Optional, Default is -1] --maxChanges
        Specify the max number of changelists which should be processed in a single run. -1 signifies unlimited range.

[Optional, Default is 1] --printBatch
        Specify the p4 print batch size.

[Optional, Default is 100] --refresh
        Specify how many times a connection should be reused before it is refreshed.

Build

  1. Pre-requisites
  • Install [email protected] at /usr/local/ssl by following the steps here.
  • Install CMake 3.16+
  • Install g++ 11.2.0 (older versions are also supported)
  • Clone this repository
    • cd p4-fusion
    • git submodule update --init
  • Get Helix Core C++ API from the official Perforce distribution. Version 2021.1/2179737 shall have the best compatibility. Extract the contents in ./helix-core-api/linux/ or ./helix-core-api/mac/ based on your OS.

For CentOS, you can try yum install git make cmake gcc-c++ libarchive to set up the compilation toolchain. Installing libarchive is only required to fix a bug that stops CMake from starting properly.

This tool uses C++11 and thus it should work with much older GCC versions. We have tested compiling with both GCC 11.2.0 and GCC 4.8.

  1. Generate a CMake cache
./generate_cache.sh Debug

Replace Debug with Release for a speed-optimized binary. Debug builds will run marginally slower (considering the tool is mostly bottlenecked by network I/O) but will contain debug symbols and allow a better debugging experience while working with a debugger like gdb.

  1. Build
./build.sh
  1. Run!
./build/p4-fusion/p4-fusion --path //depot/path/... --user $P4USER --port $P4PORT --client $P4CLIENT --src clones/.git --networkThreads 200 --printBatch 100 --lookAhead 2000 --retries 10 --refresh 100

There should be a Git repo being created in the clones/ directory with commits being created as the tool runs.

Note: The Git repository is created as bare and running the same command again shall detect the last committed CL and only continue from that CL onwards. We also don't handle binaries by default and .git directories in the Perforce history.

Contributing

Please refer to CONTRIBUTING.md


Licensed under the BSD 3-Clause License. Third-party license attributions are present in THIRDPARTY.md.

Comments
  • Not ignoring .git directory

    Not ignoring .git directory

    Hi there,

    After running a sync for a large project I found this error:

    [ ERROR @ AddFileToIndex:147 ] GitAPI: -1:10: invalid path: 'redacted/redacted/redacted/redacted/redacted/redacted/redacted/redacted/Private/Interfaces/.git'
    

    It seems that p4-fusion is trying to add .git from a submodule located in a deeper directory.

    By looking at p4-fusion source code (change_list.cc#L57), p4-fusion is ignoring .git/*, but not the .git per se. I believe this is a bug and it should also ignore files ending with .git.

    Does it make sense? After implementing this change locally, the project was successfully synced.

    bug 
    opened by igorvpcleao 9
  • Cannot Migrate a Stream Branch

    Cannot Migrate a Stream Branch

    We use stream branches in our development. I created a virtual branch to narrow down the scope of what I want to export to git. I ran in to a number of issues, which I would normally open one for each, but you may need the whole story for them to all make sense. So sorry for the long story / issue.

    Issue 1 - Mappings don't work properly

    So I ran something like this after creating my new virtual branch:

    p4-fusion --client "eyen_p4_fusion" \
        --includeBinaries true  \
        --path "//origin/main/..." \
        --port "perforce.theobjects.com:1666" \
        --printBatch 10 \
        --src /work/git \
        --user user \
        --lookAhead 100
    

    but then I get an error like this:

    [ PRINT @ Main:31 ] Running p4-fusion from: /work/p4-fusion/build/p4-fusion/p4-fusion
    [ SUCCESS @ InitializeLibraries:144 ] Initialized P4Libraries successfully
    [ PRINT @ Main:80 ] Updated client workspace view eyen_p4_fusion with 26 mappings
    [ ERROR @ Main:92 ] The depot path specified is not under the p4_fusion_test client spec. Consider changing the client spec so that it does. Exiting.
    

    I know it's under the spec. I just created the virtual branch and workspace.

    So I just removed the return statement here and then I got further.

    But before going further, I tracked down the problem to this: According to the docs

     Translate() is designed to map single files. 
    To model the effect of passing a broader path through a mapping, create a new one-sided mapping that represents that path and Join() it with the other mapping.
    

    In my workspace mapping, I had this:

    //origin/main/parent_folder/folder1 /work/space/folder1/...
    //origin/main/parent_folder/folder2 /work/space/folder2/...
    

    But then when I try to map the --path argument //origin/main/..., Translate() is not able to determine that the path is valid.

    So that's the crux of the issue and I don't know enough of the perforce api to know how to check properly. I can ask them for support, but I suppose you are more knowledgeable than I am.

    Issue 2 - It crashes with malloc(): unaligned tcache chunk detected

    After removing that return statement, I then get a crash here: image These are the parameters printed at the beginning

    [ PRINT @ Main:134 ] Perforce Port: ---                                                                  
    [ PRINT @ Main:135 ] Perforce User: --                                                                                                                 
    [ PRINT @ Main:136 ] Perforce Client: ---                                                                                                     
    [ PRINT @ Main:137 ] Depot Path: //origin/main/...                                                                                                       
    [ PRINT @ Main:138 ] Network Threads: 48                                                                                                                     
    [ PRINT @ Main:139 ] Print Batch: 10                                                                                                                         
    [ PRINT @ Main:140 ] Look Ahead: 100                                                                                                                         
    [ PRINT @ Main:141 ] Max Retries: 10                                                                                                                         
    [ PRINT @ Main:142 ] Max Changes: -1                                                                                                                         
    [ PRINT @ Main:143 ] Refresh Threshold: 100                                                                                                                  
    [ PRINT @ Main:144 ] Fsync Enable: 0                                                                                                                         
    [ PRINT @ Main:145 ] Include Binaries: 1                                                                                                                     
    [ PRINT @ Main:146 ] Profiling: 0                                                                                                                            
    [ PRINT @ Main:147 ] Profiling Flush Rate: 1000                             
    

    I didn't know what the tcache bug meant so I ran it with ASAN and the code runs now. I don't know what this bug means. Maybe I should force it to use less network threads, but it ran.

    So now I have my git repo, but this brings me to issue 3.

    Issue 3: Workspace mappings are not respected

    In my workspace mappings, I have mappings like this:

    //origin/main/parent_folder/folder2 /work/space/folder2/...
    

    but in my git repo, what I see when I do clone is this: git_folder/parent_folder/folder2 instead of git_folder/folder

    Ideally, I want the p4-fusion to Trasnlate() the mapping to the local folder and then strip the workspace root and then append the stripped path to the git repo. I don't know where to go for there.

    bug 
    opened by EricAtORS 5
  • 'Invalid option' error when running p4-fusion

    'Invalid option' error when running p4-fusion

    Receiving the following error when trying p4-fusion out

    [ WARNING @ Run:126 ] Retrying: p4 changes -l -s submitted -r //src/... [ ERROR @ HandleError:13 ] Received error: error Usage: changes [-i -t -l -L -f -c client -m count -s status -u user] [files...] Invalid option: -r.

    p4 changes has no '-r' option, although the docs state it does.

    $ p4 -V Perforce - The Fast Software Configuration Management System. Copyright 1995-2022 Perforce Software. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) Version of OpenSSL Libraries: OpenSSL 1.1.1n 15 Mar 2022 See 'p4 help [ -l ] legal' for additional license information on these licenses and others. Extensions/scripting support built-in. Parallel sync threading built-in. Rev. P4/LINUX26X86_64/2022.1/2305383 (2022/06/28).

    opened by dgilbert101 4
  • git p4 sync ?

    git p4 sync ?

    Hi,

    Thanks for open sourcing this tool. It's definitely very fast when compared to git-p4.py

    Do you plan to add the sync command ?

    I am willing contribute its implementation if you can give me some pointers on how you'd like it done.

    Thanks, Mathieu.

    opened by MathieuNls 3
  • Rare cases when `~P4API()` crashes while p4-fusion is shutting down

    Rare cases when `~P4API()` crashes while p4-fusion is shutting down

    In rare cases, p4-fusion crashes when running ThreadPool::ShutDown(), where the P4API destructor (defined in the Helix Core C++ API library) runs into a segmentation fault.

    Version: 1.9 OS: CentOS 7

    Crash backtrace from gdb:

    Program terminated with signal 11, Segmentation fault.
    #0  Signaler::DeleteOnIntr (this=0x55a7a6720460 <signaler>, ptr=0x7f1b1893c3b0) at ../p4/sys/signaler.cc:229
    229	../p4/sys/signaler.cc: No such file or directory.
    (gdb)
    (gdb) where
    #0  Signaler::DeleteOnIntr (this=0x55a7a6720460 <signaler>, ptr=0x7f1b1893c3b0) at ../p4/sys/signaler.cc:229
    #1  0x000055a7a62c4b13 in Rpc::~Rpc (this=0x7f1b1893c3b0, __in_chrg=<optimized out>) at ../p4/rpc/rpc.cc:312
    #2  0x000055a7a62a3ef7 in Client::~Client (this=0x7f1b1893c3b0, __in_chrg=<optimized out>) at ../p4/support/strbuf.h:369
    #3  0x000055a7a629c8ac in ClientApi::~ClientApi (this=0x7f1b188df100, __in_chrg=<optimized out>) at ../p4/client/clientapi.cc:21
    #4  0x000055a7a6298d4c in _Destroy<P4API> (__pointer=0x7f1b188df100) at /usr/include/c++/10.3.1/bits/stl_construct.h:135
    #5  __destroy<P4API*> (__last=<optimized out>, __first=0x7f1b188df100) at /usr/include/c++/10.3.1/bits/stl_construct.h:152
    #6  _Destroy<P4API*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/10.3.1/bits/stl_construct.h:185
    #7  _Destroy<P4API*, P4API> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/10.3.1/bits/alloc_traits.h:738
    #8  _M_erase_at_end (__pos=0x7f1b188df100, this=0x55a7a671f750 <ThreadPool::GetSingleton()::singleton+112>) at /usr/include/c++/10.3.1/bits/stl_vector.h:1796
    #9  clear (this=0x55a7a671f750 <ThreadPool::GetSingleton()::singleton+112>) at /usr/include/c++/10.3.1/bits/stl_vector.h:1499
    #10 ThreadPool::ShutDown (this=0x55a7a671f6e0 <ThreadPool::GetSingleton()::singleton>) at /tmp/tmp.CjOLdF/p4-fusion-src/p4-fusion/thread_pool.cc:78
    #11 0x000055a7a6299385 in ThreadPool::ShutDown (this=<optimized out>) at /tmp/tmp.CjOLdF/p4-fusion-src/p4-fusion/thread_pool.cc:58
    #12 0x000055a7a6289fc1 in Main(int, char**) () at /tmp/tmp.CjOLdF/p4-fusion-src/p4-fusion/main.cc:308
    #13 0x000055a7a627b027 in main () at /tmp/tmp.CjOLdF/p4-fusion-src/p4-fusion/main.cc:344
    #14 0x00007f1b18d31a03 in ?? ()
    #15 0x00007f1b18d319dc in ?? ()
    #16 0x00007ffc0b6fce20 in ?? ()
    #17 0x0000000000000000 in ?? ()
    
    bug 
    opened by twarit-waikar 2
  • minor: exclude vendor/libgit2/tests

    minor: exclude vendor/libgit2/tests

    I was downloading this repo on a slow connection and wondered why it took so long.

    $ du -hs vendor/libgit2/tests/
    53M	vendor/libgit2/tests/
    

    Minor issue, feel free to close out and ignore.

    opened by keegancsmith 2
  • Using openMP

    Using openMP

    You can use OpenMP for multi-threaded calculations

    It is supported by most C ++ compilers (GCC, Clang and MSVC), this easily applies to a for loop for example, You can even use another machine or the graphics card to perform some part of the calculations.

    More info: https://bisqwit.iki.fi/story/howto/openmp/ https://medium.com/swlh/introduction-to-the-openmp-with-c-and-some-integrals-approximation-a7f03e9ebb65

    Exemple my brute-force project: https://github.com/bensuperpc/GTA_SA_cheat_finder/blob/196dcedf30e81317148d025961b65f7213aa47e1/source/main.cpp#L89

    opened by bensuperpc 2
  • Handle `SIG_KILL` to gracefully exit when the host receives a shutdown signal

    Handle `SIG_KILL` to gracefully exit when the host receives a shutdown signal

    This looks like something that might have caused issues but surprisingly hasn’t so far, which means p4-fusion is not corrupting the repo even if it gets interrupted. However, we should be on the safe side and also add the graceful exit handler for SIG_KILL in addition to SIG_INT (SIG_INT handler is already implemented)

    bug 
    opened by twarit-waikar 1
  • Add version string to code and --version argument

    Add version string to code and --version argument

    p4-fusion doesn't have a way to know the version of the built binary. We should fix this so that it is easier for people to work with multiple versions or people making p4-fusion version upgrades in their workflows

    enhancement 
    opened by twarit-waikar 1
  • main: Add server connection check and bubble up errors as exit codes

    main: Add server connection check and bubble up errors as exit codes

    The number of retries when testing the connection before actually carrying out the usual business is hard-coded to 5.

    It doesn't seem to me that users would require flexibility in a simple connection test.

    bug 
    opened by twarit-waikar 0
  • log: Add --noColor arg to disable coloured logs

    log: Add --noColor arg to disable coloured logs

    Fixes #41

    I decided to implement it as a runtime switch instead of a compilation flag so that the same binary is configurable, and doesn't require a re-compilation to only disable colored outputs.

    enhancement 
    opened by twarit-waikar 0
  • Branch support for #54

    Branch support for #54

    Adds branch support for ticket #54. This is a fairly big rewrite, and my C++ skills are pretty rusty, so it should have some eyes put on it.

    Notes on the code changes:

    • The fundamental changes to the code are at the change_list.cc level. Code now is filtered through the branch_set.cc code, and that's also where the files are split into branch groups (a collection of files that share a source + target branch for a single changelist).
    • The FileData structure how has more responsibility, and some of the file inspection code has been moved into it (which pushes Perforce specific knowledge out of P4API, but it seems contained better this way). In order to be safe with memory, since it can potentially be very heavy weight, it's a wrapper around another structure through a shared pointer. This makes copy constructor semantics more forgiving. It has some weirdness, though, due to it not being a const only structure, which means a lot of invocations that read it might also have side effects on the object. Not very pretty.
    • The inspection into file source comes from filelog_result.cc. It's a bit slower, so non-branch runs still use describe. This implementation works with the arguments in P4API to have the change history for only the first revision of each file in the changelist.

    A few things that are dangling and not completed with this PR:

    • Documentation. There's new options and behaviors that need docs. An initial pass at some documentation in the readme is present. Once this PR gets ironed out, then I can revisit them.
    • Version number bump. I don't know if this is significant to take a major version bump. It should behave the same if you use the original arguments, so maybe just a minor bump?
    • The commit description in git_api.cc could be enhanced, especially around the depot path.
    • The fstat code was added to have a merge be against an older revision of a branch, but that logic is extremely tricky even if done right, and there's so many ways it can go wrong (see my comments in #54). This should be removed. I'll probably do that shortly. Done
    • There's still some duplicate code in various places that could be brought together into a single call, especially in the git_api.
    cla:signed 
    opened by groboclown 5
  • Add Tag Creation for Automatic Labels

    Add Tag Creation for Automatic Labels

    As Perforce supports automatic labels, which are a view mapping + a revision marker, it's possible to map these to a Git tag under very limited criteria:

    1. The Label contains the field Revision with a value of @(integer)
    2. The Label contains a View with a path that fully contains the depot path being copied.
    3. The (integer) revision is a changelist that the transfer includes.

    Because this label fully matches to a Git commit, a corresponding tag can be created off of the label.

    opened by groboclown 0
  • Random crash when built and run under Alpine linux

    Random crash when built and run under Alpine linux

    The error seems to only occur in the musl library, and doesn't mention any p4-fusion specific functions in the stacktrace, even in a debug build. However, we only see this in alpine builds.

    p4-fusion crashes in this case either at the end of the execution, or before starting the Git commit process (or when the tool is downloading files)

    GDB core dump below:

    Core was generated by `p4-fusion --path //depot/path/... --client p4-client'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007f5bd160c896 in ?? () from /lib/ld-musl-x86_64.so.1
    [Current thread is 1 (LWP 296)]
    (gdb) where
    #0  0x00007f5bd160c896 in ?? () from /lib/ld-musl-x86_64.so.1
    #1  0x00007f5bd160cc2f in ?? () from /lib/ld-musl-x86_64.so.1
    #2  0x0000000000000000 in ?? ()
    
    bug 
    opened by twarit-waikar 0
  • RFE: Add timestamp to log messages

    RFE: Add timestamp to log messages

    Could you add date/time to the progress messages? Messages like this one:

    CL 1218143 --> Commit 4d3be6af2d1251f83d9462dc1bc34ed3ab34764c with 6 files (23515/111346|499). Elapsed 59.9115 mins. 223.776 mins left.
    

    [https://github.com/salesforce/p4-fusion/blob/master/p4-fusion/main.cc#L301]

    enhancement 
    opened by mike-r-mclaughlin 0
  • Support view mappings for branches

    Support view mappings for branches

    The docs show that this only works for single branches and even then, only branches containing single paths. Perforce allows branches to be located in any location, and even have different mappings for different branches.

    Proposal: Allow the specification of a configuration file that describes the branches and the views used by them to sync:

    [main]
    //depot/main/config/my-component/... config/...
    //depot/main/pkg/my-subcomponent-a/... pkg/my-subcomponent-a/...
    //depot/main/pkg/my-subcomponent-b/... pkg/my-subcomponent-b/...
    
    [dev]
    //depot/comp/my-component/branches/dev/... ...
    
    enhancement help wanted 
    opened by rpetti 10
  • issue with case-sensitivity

    issue with case-sensitivity

    We were hunting down a missing file after the import:

    The CL's action is "branch". Within the CL, all files have integrate as the action. Except one, which has the action "branch".

    After the import, we found that the file that has "branch" as the action is missing from the git repo.

    p4-fusion is a godsend by the way. Thanks for open-sourcing this tool!

    version: 1.10

    bug help wanted 
    opened by yukwunhang 7
Releases(v1.12)
  • v1.12(Nov 7, 2022)

    Small bug fix to improve error handling by adding a server connection check at the start of the execution and properly handling errors to bubble them up as process exit codes. This way, the process caller can detect if something went wrong.

    What's Changed

    • vendor: Update libgit2 to v1.4.3 by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/57
    • main: Add server connection check and bubble up errors as exit codes by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/58
    • main: Bump version string to v1.12.0 by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/59

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.11...v1.12

    Source code(tar.gz)
    Source code(zip)
  • v1.11(Aug 26, 2022)

    This is a maintenance release that fixes some functionalities and adds a couple QoL changes.

    1. p4-fusion learned how to properly handle p4 streams. Please test p4-fusion on local Perforce streams before trying this feature in production.
    2. p4-fusion now understands a SIGTERM signal and will gracefully exit if it receives one.
    3. p4-fusion can now optionally output bland outputs with no colour coding. This can be done by passing in --noColor true. This argument is disabled by default. The intended use case for this feature is to make p4-fusion logs more readable when its stdout logs are saved to a file on disk.
    4. p4-fusion now clones CLs 20% faster in RelWithDebInfo mode. About 15% faster in Debug mode.

    What's Changed

    • log: Add --noColor arg to disable coloured logs by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/43
    • main: Add SIGTERM handler by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/44
    • p4: Fix depot path not under client error when using streams by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/47
    • main: Separate out p4 prints in a different loop by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/48
    • main: Bump p4-fusion version to v1.11.0 by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/51

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.10...v1.11

    Source code(tar.gz)
    Source code(zip)
  • v1.10(Jul 4, 2022)

    This version works-around a crash in the Helix Core C++ API as specified in their documentation.

    We also tested compiling with Helix Core C++ API 2022.1, which is latest as of writing. Users should consider building p4-fusion with this version of the library to get the latest fixes from Perforce.

    What's Changed

    • main: Bump version to 1.10.0 for next release by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/38
    • p4: Fix crash in Signaler by disabling it by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/37

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.9...v.10

    Source code(tar.gz)
    Source code(zip)
  • v1.9(May 27, 2022)

    This release adds various library updates and improvements to p4-fusion 🎉

    p4-fusion learned to handle trust using FQDNs corresponding to fingerprints in the trust file if it is built with the Helix Core C++ API 2021.2.

    p4-fusion learned to specify its version when run without any arguments.

    Also includes other minor improvements and rare bug fixes.

    Breaking change

    p4-fusion now strips away the depot path from the front of the depot file path, like git-p4.py. This is a breaking change if a user is intending to using this version on the same repository cloned using p4-fusion versions prior to this release. If you are such a user, please consider re-cloning the repository from the beginning to preserve data-integrity.

    What's Changed

    • main: Add warning for receiving an empty client spec due to mismatched P4PORT by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/25
    • main: Add version string by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/26
    • Executable support by @jclx in https://github.com/salesforce/p4-fusion/pull/29
    • git: Strip away the depot path from the beginning of the file path by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/30
    • threadpool: Fix crash by p4 library shutdown before p4 contexts by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/31
    • docs: Add example command in README to build tests with profiling by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/32
    • build: Add support for Helix Core C++ API version 2021.2 by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/33

    New Contributors

    • @jclx made their first contribution in https://github.com/salesforce/p4-fusion/pull/29

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.8.1...v1.9

    Source code(tar.gz)
    Source code(zip)
  • v1.8.1(Mar 25, 2022)

    Fixed a potential issue with improperly synchronized Helix Core API context initialization. This release is a minor updation of the previous, v1.8 release.

    What's Changed

    • p4: Fix initialization mutex usage to properly allow only 1 init at a time by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/22

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.8...v1.8.1

    Source code(tar.gz)
    Source code(zip)
  • v1.8(Mar 25, 2022)

    This release fixes p4-fusion crashing in certain scenarios related to non-file objects in the response of p4 describe. This also adds preliminary testing for GitAPI to catch easy-to-detect issues and regressions related to Git repository generation early on.

    What's Changed

    • p4: Check if p4 object is a file and return early if it isn't by @EricAtORS in https://github.com/salesforce/p4-fusion/pull/19
    • all: Improve logging and error handling by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/21

    New Contributors

    • @EricAtORS made their first contribution in https://github.com/salesforce/p4-fusion/pull/19

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.7...v1.8

    Source code(tar.gz)
    Source code(zip)
  • v1.7(Mar 3, 2022)

    This release aims at fixing a bug related to an error occurring when p4-fusion observed Git submodules present in the Perforce depot. There are also numerous refactors and code-cleanups for reducing redundant logic.

    We also started adding tests to p4-fusion, however, currently they are only testing STDHelpers.

    What's Changed

    • p4: Fix .git file used by submodules by @igorvpcleao in https://github.com/salesforce/p4-fusion/pull/15
    • Add p4-fusion-test to build process by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/16
    • all: Update license year by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/17
    • p4: Use std helpers for string comparisons by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/18

    New Contributors

    • @igorvpcleao made their first contribution in https://github.com/salesforce/p4-fusion/pull/15

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.6...v1.7

    Source code(tar.gz)
    Source code(zip)
  • v1.6(Mar 1, 2022)

    This release reduces the sync time p4-fusion takes when running over a Git repository that already exists. Also includes minor improvements, possible linkage error fixes, fixes a possible bug in the error handling across threads, and utilises the full names configured for users in Perforce to provide a user name in Git.

    This release also adds a CI pipeline to the repository using Github Actions.

    What's Changed

    • git: Append CL number to commit title for better readability by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/6
    • ci: Add clang-format check by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/8
    • ci: Add build CI + Possible linking error with PCRE and Zlib by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/10
    • p4: Improve text buffer handling to be less error prone, less likely to break by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/11
    • p4: Retrieve user full names if possible and use those while committing by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/12
    • threadpool: Guard exceptions array behind a mutex by @twarit-waikar in https://github.com/salesforce/p4-fusion/pull/13

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.5...v1.6

    Source code(tar.gz)
    Source code(zip)
  • v1.5(Dec 22, 2021)

    This version fixes an issue with build scripts throwing errors when they are run in environments where the default shell is not Bash.

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.4...v1.5

    Source code(tar.gz)
    Source code(zip)
  • v1.4(Dec 22, 2021)

    This version makes profiler data generation a.k.a. tracing data generation, off by default in the build script and allows users to pass in --trace to generate_cache.sh to enable tracing back again.

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.3...v1.4

    Source code(tar.gz)
    Source code(zip)
  • v1.3(Dec 22, 2021)

    This version fixes a critical data integrity issue where deleted files in the Perforce history were not being recorded in the Git repository.

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.2...v1.3

    Source code(tar.gz)
    Source code(zip)
  • v1.2(Nov 26, 2021)

    This release introduces generating profiling data, and various bug fixes and performance improvements while updating repositories to the latest Perforce code.

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.1...v1.2

    Source code(tar.gz)
    Source code(zip)
  • v1.1(Nov 18, 2021)

    This release reduces the disk I/O usage during committing CLs and also improves some logging to reduce bloat.

    Full Changelog: https://github.com/salesforce/p4-fusion/compare/v1.0...v1.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0(Nov 11, 2021)

Owner
Salesforce
A variety of vendor agnostic projects which power Salesforce
Salesforce
Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

null 46 Dec 24, 2022
conversion from absolute encoder and incremental encoder, control two robotis dynamixel motors, testing qserialport library in qt

Q_dxl This example is created for testing: Serial connection Testing two dynamixel motors (eg. MX-28AT) Doing the conversion from absolute encoder (of

ibov 1 Oct 30, 2021
Faster Non-Integer Sample Rate Conversion

Non-Integer Sample Rate Conversion This repository contains a comparison of sample-rate conversion (SRC) algorithms, with an emphasis on performance f

null 25 Jul 5, 2022
Standardise code formating for cmake projects with git and clang-format

git-cmake-format This project aims to provide a quick and easy way to integrate clang-format into your CMake project hosted in a git repository, it co

Kenneth Benzie 50 Dec 28, 2022
Open source courseware for Git and GitHub

GitHub Training Kit: Cheatsheets We ❤️ Contributors Like You! We’re eager to work with you, our user community, to improve these materials and develop

GitHub 3.8k Jan 4, 2023
Not a big fan of git. May create a nicer repo in the future.

os My x86-64 hobby operating system. Cooperative multitasking system with no user-mode support, everything runs on ring 0 (for now). Packed with a rea

tiagoporsch 13 Sep 9, 2022
This is the git repository for the FFTW library for computing Fourier transforms (version 3.x), maintained by the FFTW authors.

This is the git repository for the FFTW library for computing Fourier transforms (version 3.x), maintained by the FFTW authors.

FFTW 2.3k Dec 27, 2022
ncurses Git mirror

------------------------------------------------------------------------------- -- Copyright 2020,2021 Thomas E. Dickey

Repo mirrors 307 Dec 24, 2022
The official Allegro 5 git repository. Pull requests welcome!

Welcome to Allegro! Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such

Allegro 1.5k Dec 28, 2022
File path converter for Windows & Git Bash

windows-git-bash-path-converter Motivation Made this because it was so mad to convert path between Windows and Git Bash How to use Windows file path t

Jooho Lee 3 Mar 15, 2022
Flight rules for git

Flight rules for Git ?? English ∙ Español ∙ Русский ∙ 简体中文∙ 한국어 ∙ Tiếng Việt ∙ Français ∙ 日本語 What are "flight rules"? A guide for astronauts (now, pr

Kate Hudson 40.6k Jan 3, 2023
Tails is a fast, minimal Forth-like interpreter core in C++ with no assembly

Tails is a minimal, fast Forth-like interpreter core. It uses no assembly code, only C++, but an elegant tail-recursion technique inspired by Wasm3 makes it nearly as efficient as hand-written assembly. I created it as a one-day hack to celebrate May Forth 2021 … then kept going because it's fun.

Jens Alfke 64 Dec 3, 2022
Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino

Arduino-VDCO Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino Its a digital Oscillator/Voice for the Eurorack Stand

null 47 Dec 12, 2022
Fastest-lap is an optimal laptime simulator, written in C++, and with a python API.

Fastest-lap ?? ?? Fastest-lap is an optimal laptime simulator, written in C++, and with a python API. What can be done Numerical G-G diagram: given a

Juan Manzanero 390 Jan 2, 2023
Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API.

Tiny blocker of Windows tracking and telemetry written in plain C++/Win32 API. Just run once as admin and forget. No questions asked. No harmful actions performed like other Windows spying blockers try.

null 6 Dec 23, 2022
Contains platform and API specific code written by Primal community members.

PrimalPlus Contains platform and API specific code written by Primal community members. How to use The general idea is to simply copy the files from t

Game Engine Series 20 Nov 7, 2022
Bobby Cooke 328 Dec 25, 2022
A collection of services with great free tiers for developers on a budget. Sponsored by Mockoon, the best mock API tool.

A collection of services with great free tiers for developers on a budget. Sponsored by Mockoon, the best mock API tool.

Guillaume 11.4k Jan 4, 2023
weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases.

weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases.

Google Project Zero 2k Dec 28, 2022