incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

[Apache] merge sub-projects into one project

Open javeme opened this issue 3 years ago • 7 comments

Feature Description (功能描述)

NOTE: not sure if this is necessary.

Now there are 10 repositories:

  1. hugegraph: https://github.com/hugegraph/hugegraph.git
  2. hugegraph-computer: https://github.com/hugegraph/hugegraph-computer.git
  3. hugegraph-common: https://github.com/hugegraph/hugegraph-common.git
  4. hugegraph-client: https://github.com/hugegraph/hugegraph-client.git
  5. hugegraph-doc: https://github.com/hugegraph/hugegraph-doc.git
  6. hugegraph-loader: https://github.com/hugegraph/hugegraph-loader.git
  7. hugegraph-tools: https://github.com/hugegraph/hugegraph-tools.git
  8. hugegraph-rpc: https://github.com/hugegraph/hugegraph-rpc.git
  9. hugegraph-hubble/hugegraph-stutio: https://github.com/hugegraph/hugegraph-hubble.git
  10. hugegraph-test: https://github.com/hugegraph/hugegraph-test.git

javeme avatar Nov 09 '21 04:11 javeme

Can you list the sub-projects? ASF Infra supports multiple code repo for one project. Please add some comments why you need merge these sub-projects into one project.

WillemJiang avatar Nov 10 '21 23:11 WillemJiang

Can you list the sub-projects? ASF Infra supports multiple code repo for one project. Please add some comments why you need merge these sub-projects into one project.

all sub projects/module list here (almost 13+ projects in one org), wonder to know how could one project link to apache org in github (like github.com/apache/hugegraph/sub-projects)

imbajin avatar Nov 11 '21 02:11 imbajin

For the incubator project the repo list just like this

  • hugegraph: github.com/apache/incubator-hugegraph
  • hugegraph-subproject1: github.com/apache/incubator-hugegraph-subproject1

WillemJiang avatar Nov 17 '21 10:11 WillemJiang

For the incubator project the repo list just like this

  • hugegraph: github.com/apache/incubator-hugegraph
  • hugegraph-subproject1: github.com/apache/incubator-hugegraph-subproject1

Thanks for reply, it means attach all sub-projects under /apache, so that we'll attach 10+ projects, wonder if this is convenient for normal developers? (or we should link other sub-projects in main project in README)

BTW, I’ll do a search for existing subproject management in github.com/apache

imbajin avatar Nov 18 '21 02:11 imbajin

关于主项目 + 子项目合并的方案记录一下, 最终可以选择一个大家认可的

目前 hugegraph 的子项目较分散, 对普通开发者贡献和查看代码不算友好, 所以目前倾向选择 部分 or 全部合并一些子项目.

如果合并仓库, 大体有4个事需要确认:

  1. 合并到几个仓库 (如果>1个, 分类方式的确定)
  2. 合并后原有仓库的提交历史是否全部保存 (3选1)
    • 完全不保存
    • 部分保存 / 合并保存
    • 全部保存
  3. 合并或项目的版本号是否应该统一
    • 统一起来, 避免一个项目内多版本号, 也方便开发者统一维护 (缺点是需要由 PMC 来定期更新版本)
    • 各自保持单独的版本号, 沿用现在的模式
  4. 组织结构: 暂定是使用 IDEA 的 sub-module 模式, 相对独立 (借鉴 Hadoop/Hbase 类参考)

imbajin avatar Nov 19 '21 09:11 imbajin

I tend to merge 10 repositories into 4 categories:

  1. common function library: hugegraph-common, hugegraph-rpc
  2. graph database: hugegraph
  3. graph computing: hugegraph-computer
  4. tool chains + documentation: hugegraph-toolchain include like hugegraph-loader, hugegraph-doc

javeme avatar Nov 19 '21 09:11 javeme

how to merge multi git repositories:

(like merge hugegraph-rpc into hugegraph-common)

cd hugegraph-common
# add sub-project upstream
git remote add hugegraph-rpc https://github.com/hugegraph/hugegraph-rpc.git
git fetch hugegraph-rpc/master
git checkout -b hugegraph-rpc-master hugegraph-rpc/master
# merge into hugegraph-common
git checkout master
git merge hugegraph-rpc-master --allow-unrelated-histories

reference: https://segmentfault.com/a/1190000021919753

javeme avatar Nov 23 '21 14:11 javeme

Close it due to this work has been completed

imbajin avatar Oct 11 '22 13:10 imbajin