Avoid name clashes when importing groups

Groups with the same name but different UUID's can exist in the source
and target system. If such a group is imported, the import failed
because the name was already occupied in the target system. Now the
group import is no longer failing, but the group is automatically
imported under another name: '<group-name>_imported'. If this name is
also already occupied an index is appended:

During a project import, missing groups are automatically imported.
Groups from the 'groups' file in refs/meta/config are looked up by
UUID and if a UUID cannot be resolved in the target system a group
import is triggered. If the group name is already occupied, the group
is imported with another name. The old group name in the 'groups' and
'project.config' file is automagically corrected when the project is
loaded, hence the import code doesn't need to care about this.

Change-Id: I8979aa1317a5b97764e72b97fc0f8c769fe96cba
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2 files changed
tree: caec8c5aac5d945e43b084ff7f66da4e0d9944ab
  1. .buckconfig
  2. .gitignore
  3. .settings/
  4. BUCK
  7. lib/
  8. pom.xml
  9. src/