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:
'<group-name>\_imported_<index>'.

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. .settings/
  2. lib/
  3. src/
  4. .buckconfig
  5. .gitignore
  6. BUCK
  7. LICENSE
  8. pom.xml
  9. VERSION