Comments (5)
Commits that have already landed:
from fbshipit.
- At the moment, it's an entirely separate system, though we'd like to change this.
- Some projects explicitly list the files, though the most common approach is probably manually applying these patches.
from fbshipit.
I too am exploring how we can use fbshipit to sync internal projects from our private monorepo to public open source repos. (It seems a bit odd to have such a one-way tool atm but maybe I'm missing the point!)
I was wondering if, since fbshipit seems to have first-class support for writing to git & github, both of my repos live within github (they do - one private, the other public) I could theoretically have two shipit scripts which independently sync each way?
Would fbshipit be able to detect the, potentially interleaving changes? We could even avoid that problem by always running both scripts together (in some "sync" event) so on each side you collect changes since last sync and then apply diff in each direction.
from fbshipit.
ShipIt does not support two-way sync, and it's not something we're particularly likely to work on; a single source of truth simplifies a huge number of problems.
That said, if you make it possible to change the tracking line added to commit messages and use a different one for each direction, skip if one's already present for the direction you're already going in, it will basically work - but it would probably be extremely time-consuming to debug and fix if the sync breaks in one direction only at some point and you keep pushing out patches in the other.
That said, it would be reasonable to use this approach if pull requests are merged to the internal repo instead of trying to have a true two-way-sync, i.e:
Pull requests could either be directly pushed by shipit to your internal repo (assuming it's Git or you send a PR for #1 :p):
- have new shipit script with github as source, internal repo as dest
- run shipit with --source-branch=pull/PR_NUMBER/head (https://help.github.com/articles/checking-out-pull-requests-locally/) and either:
- do the differing identifier lines mentioned above
- run with --skip-push, and with some other script, export the patch, amend it to remove the identifier, and land to your internal repo as normally
- you'll want your filter function, an additional phase, or a separate script to add 'fixes #nnnn' to the commit message so that github closes the PR when it lands
from fbshipit.
I'm actively working on this internally as we speak. Expect the bulk of the code to land today or tomorrow.
from fbshipit.
Related Issues (20)
- Use @private to mean the opposite of @public
- Wkwkw
- Improve support for releasing additional files HOT 1
- Support proxies
- ShipIt stops working? HOT 1
- Hi
- Problem when using fbshipit from Composer HOT 2
- Question: does this work Sapling? HOT 3
- Import multiple commits in a PR as a stack of diffs HOT 1
- com.dts.freefireth HOT 1
- ImportIt does not preserve Unicode correctly HOT 1
- Support signed git commits HOT 3
- Feature request: --explain <commit>
- Clarify "linear histories" limitation
- hhvm 3.24 needs call-time pass-by-reference fixes HOT 2
- Build fails HOT 2
- Sanity check: make sure that trailing slashes are present on source dir when target is a directory HOT 1
- Raise a clear error if target branch does not exist
- Stop user git/hg config from breaking things
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbshipit.