New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change folder logic to prefix #78

Open
larshp opened this Issue Nov 18, 2017 · 10 comments

Comments

Projects
None yet
2 participants
@larshp
Contributor

larshp commented Nov 18, 2017

Hi,
Using FULL folder logic forces contributors to install to that exact package name, eg. Z2MSE_DEMO which typically will be a transportable package.
So it is not possible to install to a $ package and not putting the objects in a transport.

You can consider if you like to use the PREFIX folder logic, so instead of Z2MSE_DEMO it can be DEMO. Note that this requires the parent package to be a prefix of the child. Eg. Z2MSE_MAIN would have child package Z2MSE_MAIN_FAMIX instead of the current Z2MSE_FAMIX

For more info see:
http://docs.abapgit.org/ref-dot-abapgit.html

@RainerWinkler RainerWinkler self-assigned this Nov 18, 2017

@RainerWinkler RainerWinkler added this to the Processed milestone Nov 18, 2017

@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 18, 2017

Collaborator

@larshp I will do it, thanks for proposing.
What is the safest/best way to migrate?

  1. Create new packages (Maybe except for the top package) that are compatible to the PREFIX folder logic.
  2. Move all elements to the new packages.
  3. Delete all now obsolete packages.
  4. Change the type of the repository to prefix.

In the description you linked, the top package is ZFOO, but the folder structure is described to start with /foo. Is there a logic to ignore a leading Z or Y? Or is it only a typing error?

Collaborator

RainerWinkler commented Nov 18, 2017

@larshp I will do it, thanks for proposing.
What is the safest/best way to migrate?

  1. Create new packages (Maybe except for the top package) that are compatible to the PREFIX folder logic.
  2. Move all elements to the new packages.
  3. Delete all now obsolete packages.
  4. Change the type of the repository to prefix.

In the description you linked, the top package is ZFOO, but the folder structure is described to start with /foo. Is there a logic to ignore a leading Z or Y? Or is it only a typing error?

@larshp

This comment has been minimized.

Show comment
Hide comment
@larshp

larshp Nov 18, 2017

Contributor

its a bug in the doucmentation, fixed in larshp/abapGit@ed12bcd, thanks 😄

The prefix is ignored, so it is only the text after the parent package name and after "_" that will become the folder name

Contributor

larshp commented Nov 18, 2017

its a bug in the doucmentation, fixed in larshp/abapGit@ed12bcd, thanks 😄

The prefix is ignored, so it is only the text after the parent package name and after "_" that will become the folder name

@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 18, 2017

Collaborator

So I will do it as proposed in my four steps?

Collaborator

RainerWinkler commented Nov 18, 2017

So I will do it as proposed in my four steps?

@larshp

This comment has been minimized.

Show comment
Hide comment
@larshp

larshp Nov 18, 2017

Contributor

yes, abapGit might show some warnings when doing it, but just ignore these

Contributor

larshp commented Nov 18, 2017

yes, abapGit might show some warnings when doing it, but just ignore these

@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 18, 2017

Collaborator

Changes to packages:
Z2MSE -> unchanged
Z2MSE_DEMO -> unchanged
Z2MSE_MAIN -> unchanged
Z2MSE_EXTRACT3 -> Z2MSE_MAIN_EXTR
Z2MSE_ASSOCIATIONS -> Z2MSE_MAIN_EXTR_ASSOCIATIONS
Z2MSE_ASSOCIATION_BUILDERS -> Z2MSE_MAIN_EXTR_ASSOCBUILD
Z2MSE_ELEMENTS -> Z2MSE_MAIN_EXTR_ELEMENTS
Z2MSE_ELEMENT_BUILDERS -> Remove (currently empty)
Z2MSE_FAMIX -> Z2MSE_MAIN_FAMIX
Z2MSE_MSE -> Z2MSE_MAIN_MSE
Z2MSE_OBSOLETE -> Unchanged
Z2MSE_EXTRACT -> Z2MSE_OBSOLETE_EXTRACT
Z2MSE_SAP -> Remove (currently empty)
Z2MSE_TEMPLATE -> Unchanged
Z2MSE_TEST -> Unchanged
Z2MSE_TEST_INITIAL_SELECTION -> Unchanged
Z2MSE_TEST_NO_INITIAL_SELECTN -> Unchanged
Z2MSE_TOOLS -> Unchanged

Collaborator

RainerWinkler commented Nov 18, 2017

Changes to packages:
Z2MSE -> unchanged
Z2MSE_DEMO -> unchanged
Z2MSE_MAIN -> unchanged
Z2MSE_EXTRACT3 -> Z2MSE_MAIN_EXTR
Z2MSE_ASSOCIATIONS -> Z2MSE_MAIN_EXTR_ASSOCIATIONS
Z2MSE_ASSOCIATION_BUILDERS -> Z2MSE_MAIN_EXTR_ASSOCBUILD
Z2MSE_ELEMENTS -> Z2MSE_MAIN_EXTR_ELEMENTS
Z2MSE_ELEMENT_BUILDERS -> Remove (currently empty)
Z2MSE_FAMIX -> Z2MSE_MAIN_FAMIX
Z2MSE_MSE -> Z2MSE_MAIN_MSE
Z2MSE_OBSOLETE -> Unchanged
Z2MSE_EXTRACT -> Z2MSE_OBSOLETE_EXTRACT
Z2MSE_SAP -> Remove (currently empty)
Z2MSE_TEMPLATE -> Unchanged
Z2MSE_TEST -> Unchanged
Z2MSE_TEST_INITIAL_SELECTION -> Unchanged
Z2MSE_TEST_NO_INITIAL_SELECTN -> Unchanged
Z2MSE_TOOLS -> Unchanged

@RainerWinkler RainerWinkler changed the title from folder logic FULL vs PREFIX to Change folder logic to prefix Nov 18, 2017

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 1
First step of changing the folder logic to prefix as desribed in the comments of #78
New packages are created that are compatible with the prefix logic.
The test packages are compatible but contain sub names with underscores. It is assumed, that this will not lead to problems later.

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 2
Second step of changing the folder logic to prefix as desribed in the comments of #78
Move the elements to the new packages. Allpackages that are not compatible have to be empty now.
@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 18, 2017

Collaborator

The files for the classes exist after step 2 now twice. Once in the old and once in the new folder.

Collaborator

RainerWinkler commented Nov 18, 2017

The files for the classes exist after step 2 now twice. Once in the old and once in the new folder.

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 3
Third step of changing the folder logic to prefix as desribed in the comments of #78
Delete now the obsolete packages. abapGit reports while staging the commit that it will delete the duplicate files for classes and ...

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 4 a
Change Folder Logic to PREFIX in .abapgit.xml
It is now expected that this will change the behavior in abapGit when this change is pulled in abapGit (Let my hopes become true :-) )

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 4b
This might be the final commit (Unless empty obsolete folders remain). The change in the .abapgit.xml to PREFIX was pulled with abapGit. 
New folders where created and the system proposed to delete the obsolete fileds.

RainerWinkler added a commit that referenced this issue Nov 18, 2017

Change folder logic to prefix #78 Step 4c
Step 4b was not the last. abapGit wants more changes this are commited here.
@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 19, 2017

Collaborator

@larshp
There might be now obsolete folders and xml files in the system.
There is a new folder main, but also for instance a folder z2mse_main, it contains a file package.devc.xml that specifies a development class Z2MSE_Z2MSE_MAIN.

Are there still some cleanups required?
Apart from this, everything appears fine. The unit tests are still passing.

Collaborator

RainerWinkler commented Nov 19, 2017

@larshp
There might be now obsolete folders and xml files in the system.
There is a new folder main, but also for instance a folder z2mse_main, it contains a file package.devc.xml that specifies a development class Z2MSE_Z2MSE_MAIN.

Are there still some cleanups required?
Apart from this, everything appears fine. The unit tests are still passing.

@larshp

This comment has been minimized.

Show comment
Hide comment
@larshp

larshp Nov 19, 2017

Contributor

yeah, delete the old folders, eg https://github.com/SAP2Moose/SAP2Moose/tree/master/src/z2mse_demo note that since this is most likely a transportable package, its objects has to be released in a transport before the Z package can be deleted.

Alternatively, just delete the Z folders with a normal git client, or the github web interface

Contributor

larshp commented Nov 19, 2017

yeah, delete the old folders, eg https://github.com/SAP2Moose/SAP2Moose/tree/master/src/z2mse_demo note that since this is most likely a transportable package, its objects has to be released in a transport before the Z package can be deleted.

Alternatively, just delete the Z folders with a normal git client, or the github web interface

RainerWinkler added a commit that referenced this issue Nov 19, 2017

Change folder logic to prefix #78 Step 4d
Delete obsolete packages that where left over after the change of the repository to prefix mode
@larshp

This comment has been minimized.

Show comment
Hide comment
@larshp

larshp Nov 19, 2017

Contributor

perfect now 👍

Contributor

larshp commented Nov 19, 2017

perfect now 👍

@RainerWinkler

This comment has been minimized.

Show comment
Hide comment
@RainerWinkler

RainerWinkler Nov 19, 2017

Collaborator

Close only after:

  1. Documentation if abapGit is checked for possible improvements
  2. Changelog is updated
Collaborator

RainerWinkler commented Nov 19, 2017

Close only after:

  1. Documentation if abapGit is checked for possible improvements
  2. Changelog is updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment