Moving branches from arvados-workbench2 to arvados repo » History » Version 1
Tom Clegg, 12/07/2023 04:21 PM
1 | 1 | Tom Clegg | h1. Moving branches from arvados-workbench2 to arvados repo |
---|---|---|---|
2 | |||
3 | Future releases will have workbench2 packages built from the source:services/workbench2 directory in the arvados.git repository. |
||
4 | |||
5 | Procedure for working on a new branch is obvious: create it in the arvados repo instead of the arvados-workbench2 repo, and edit files & run tests in the services/workbench2 directory. |
||
6 | |||
7 | Unmerged branches (@12345-example-branch-name@) in an arvados-workbench2 workspace (@~/arvados-workbench2@) should be moved into an arvados workspace (@~/arvados@) like this: |
||
8 | |||
9 | <pre> |
||
10 | cd ~/arvados |
||
11 | git checkout -b 12345-example-branch-name |
||
12 | git subtree pull --prefix=services/workbench2 ~/arvados-workbench2/.git 12345-example-branch-name |
||
13 | </pre> |
||
14 | |||
15 | The default commit message for the resulting merge looks like this: |
||
16 | |||
17 | <pre> |
||
18 | Merge commit '3c187313eb0211b0f53d303f22097092396d70d5' into 12345-example-branch-name |
||
19 | </pre> |
||
20 | |||
21 | Please make it look like this instead: |
||
22 | |||
23 | <pre> |
||
24 | 12345: Merge branch '12345-example-branch-name' from arvados-workbench2.git |
||
25 | |||
26 | Arvados-DCO-1.1-Signed-off-by: Your Name <you@curii.com> |
||
27 | </pre> |
||
28 | |||
29 | Use @git commit --amend@ if you need to edit the commit message after committing. |
||
30 | |||
31 | The resulting git history should look something like this: |
||
32 | |||
33 | <pre> |
||
34 | $ git log --oneline --graph |
||
35 | * 6ddf267fd9 (HEAD -> 12345-example-branch-name) Merge branch '12345-example-branch-name' from arvados-workbench2.git |
||
36 | |\ |
||
37 | | * 3c187313eb 12345: Your last commit on 12345-example-branch-name in the arvados-workbench2 repo. |
||
38 | * | 3d5a1c29aa (origin/main, main) Merge branch 'some-other-branch' |
||
39 | ... |
||
40 | </pre> |
||
41 | |||
42 | The branch-vs-main diff in the arvados repo should look the same as it did in the arvados-workbench2 repo, except that the paths now have @services/workbench2/@ in front: |
||
43 | |||
44 | <pre> |
||
45 | $ git diff --stat main... |
||
46 | services/workbench2/README.md | 1 - |
||
47 | 1 file changed, 1 deletion(-) |
||
48 | </pre> |
||
49 | |||
50 | Push your branch, and run developer tests at https://ci.arvados.org/view/Developer/job/developer-run-tests/ (or https://ci.arvados.org/job/developer-run-tests-services-workbench2/ to run only the workbench2 tests). |