All Projects → facebook → Fbshipit

facebook / Fbshipit

Licence: mit
Copy commits between repositories · git → git, git → hg, hg → hg, or hg → git

Programming Languages

hack
652 projects

Projects that are alternatives of or similar to Fbshipit

TogetherStream
A social and synchronized streaming experience
Stars: ✭ 16 (-94.63%)
Mutual labels:  sync, facebook
Socialmanagertools Gui
🤖 👻 Desktop application for Instagram Bot, Twitter Bot and Facebook Bot
Stars: ✭ 293 (-1.68%)
Mutual labels:  facebook
fb-scraper
Scrape a Facebook profile and turn it into a JSON file
Stars: ✭ 18 (-93.96%)
Mutual labels:  facebook
Embera
A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
Stars: ✭ 268 (-10.07%)
Mutual labels:  facebook
Photoeditor
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
Stars: ✭ 3,105 (+941.95%)
Mutual labels:  facebook
Multistreamer
[discontinued] A webapp for publishing video to multiple streaming services at once.
Stars: ✭ 281 (-5.7%)
Mutual labels:  facebook
uClock
A tight BPM clock generator for Arduino and Teensy
Stars: ✭ 58 (-80.54%)
Mutual labels:  sync
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (-1.34%)
Mutual labels:  facebook
Leetcode Go
✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解
Stars: ✭ 22,440 (+7430.2%)
Mutual labels:  facebook
Keepassonedrivesync
Allows syncing of KeePass databases stored on OneDrive Personal, OneDrive for Business or SharePoint
Stars: ✭ 270 (-9.4%)
Mutual labels:  sync
Mysqlsmom
同步mysql数据到elasticsearch的工具,功能丰富,用法简单,配置灵活,扩展性强;
Stars: ✭ 268 (-10.07%)
Mutual labels:  sync
Taiyakianime
Stream anime and synchronize with your MyAnimeList(MAL) + SIMKL + Anilist on iOS and Android devices
Stars: ✭ 259 (-13.09%)
Mutual labels:  sync
Facebook Live Reactions
The easiest way to create interactive Facebook live streams. Displays reaction count and live shoutouts :)
Stars: ✭ 284 (-4.7%)
Mutual labels:  facebook
Timeliner
In general, Timeliner obtains items from data sources and stores them in a timeline.
Stars: ✭ 2,911 (+876.85%)
Mutual labels:  facebook
Sync
syncs your local folder with remote folder using scp
Stars: ✭ 293 (-1.68%)
Mutual labels:  sync
graphql-meta
Lexing, parsing, pretty-printing, and metaprogramming facilities for dealing with GraphQL schemas and queries
Stars: ✭ 16 (-94.63%)
Mutual labels:  facebook
Gitee Pages Action
🤖 Auto Deploy Gitee Pages | 无须人为干预,自动部署 Gitee Pages
Stars: ✭ 265 (-11.07%)
Mutual labels:  sync
Bitlbee Facebook
Facebook protocol plugin for BitlBee
Stars: ✭ 273 (-8.39%)
Mutual labels:  facebook
Laravel Socialite
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban
Stars: ✭ 296 (-0.67%)
Mutual labels:  facebook
Faceslim
Web App for Facebook. Lightweight, ad-free, chat support and modern look.
Stars: ✭ 294 (-1.34%)
Mutual labels:  facebook

FBShipIt

CI

FBShipIt is a library written in Hack for copying commits from one repository to another.

For example, Facebook uses it to:

  • copy commits from our monolithic Mercurial repository to project-specific GitHub repositories
  • populate Buck's gh-pages branch with the contents of the docs folder in the master branch.

Major Features

  • read from Git or Mercurial (hg) repositories
  • write to Git or Mercurial (hg) repositories
  • rewrite [email protected] authors from HgSubversion/git-svn
  • remove files or directories matching certain patterns
  • remove/rewrite sections of commit messages
  • modify commit authors (for example, if all internal commits are authored by employees, restore original authors for GitHub pull requests)

Major Limitations

FBShipIt has been primarily designed for branches with linear histories; in particular, it does not understand merge commits.

Requirements

Installing

$ composer require facebook/fbshipit

How FBShipIt Works

There are three main concepts: phases, changesets, and filters.

ShipItPhase objects represent a high-level action, such as 'clone this repository', 'pull this repository', 'sync changesets', and 'push repository'.

Within the sync phase, a ShipItChangeset is an immutable object representing a commit.

Filters are functions that take a Changeset, and return a new, modified one.

Provided Phases

  • ShipItCreateNewRepoPhase: creates a new Git repository with an 'initial commit'. Skipped unless --create-new-repo passed.
  • ShipItAssertValidFilterPhase: make sure that the filter is consistent with the specified roots.
  • ShipItGitHubInitPhase: create and configure a github clone.
  • ShipItPullPhase: pull in any new changes to a repository.
  • ShipItPushPhase: push local changes to the destination repository.
  • ShipItSyncPhase: copy commits from the source repository to the destination repository.
  • ShipItVerifyRepoPhase: check that the destination repository matches the source repository and filter. Skipped unless --verify or --create-fixup-patch is passed.

Using FBShipIt

You need to construct:

  • a ShipItManifest object, defining your default working directory, and the directory names of your source and destination repositories
  • a list of phases you want to run
  • a pipeline of filters, assuming you are using the ShipItSyncPhase

Filters are provided for common operations - the most frequent are:

  • ShipItPathFilters::moveDirectories(string $changeset, dict<string, string> $mapping): apply patches to a different directory in the destination repository
  • ShipItPathFilters::stripPaths(string $changeset, vec<string> $patterns, vec<string> $exception_patterns = vec[]): remove any modifications to paths matching $patterns, unless they match something in $exception_patterns.

Example

See the demo/ directory for a simple example to start from.

Using With An Empty Destination Repository

Add ShipItCreateNewRepoPhase to your phase list (after source init and pull phases), then run:

hhvm my_script.hack --create-new-repo

This will give you the path to a git repository with a single commit; you can then push it to your destination.

Using With An Existing Destination Repository

When there is at least one relevant commit in the source repository that is not in the destination repository, run:

hhvm my_script.hack --first-commit=FIRST_UNSYNCED_COMMIT_ID_GOES_HERE

Future Runs

Run your script with no arguments; FBShipIt adds tracking information to the commits it creates, so will automatically sync any new commits.

Reducing Common Code With Multiple Projects

We recommend splitting out common filters and phase setup to separate classes, and for these to be re-used between your projects. For an example from Facebook's usage, see FBCommonFilters

Further Examples

Some other code that might be useful for configuring FBShipIt can be found in fb-examples/.

License

FBShipIt is MIT-licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].