Search Feedback

12
votes

Collaborate API (methods and events to react and control collab functionality)

Collaborate

-

-

As a collaborate repository user, I want to control collab to develop support tooling.

There are times where merge or use their's/mine are not the right solution. In my case, I have a scriptable object that stores details about the version with details about history as well. I just click next, and if I was on "product abc v1.0.8" it produces "product abc v1.0.9" and lets me fill in new details. While everyone's needs are difference, in this case 2 team members can produce v.1.0.9 and submit their changes under it. Merge warnings come up and suggest manually merging, or selecting theirs/mine. The actual solution could be a simple script, that takes my version, changes it to v1.0.10, imports theirs, and then does an additional wiring change in the code to link them so they have valid references for next version and previous.

Again, there are many reasons this could be used, but here is a list of methods and events I would like to see.

EVENTS:
.OnMerge(...) a merge is needed between two files. (return false to force mergeError)
.OnMergeError(...) it cannot figure out how to merge the files. (return true to ignore this file. This is where we handle the merge issue ourselves, before moving on to the next file.)
.OnNewFileAdded(...) a new file is included in the current change list ...=filename or asset id
.OnFileRemoved(...) a file was removed from the change list.
.OnFileMarkedForDelete(...) a file is marked to be deleted from collab
.OnCommitBegin() a commit was requested (return false stops the commit)
.OnCommitComplete(...) a commit completed ...= history id given to commit record
.OnCommitError(...) a commit had a blocking error ... = error details

METHODS:
.SetDescription() sets the description for the next commit
.GetDescription() retrieves the current description
.Commit() fires a commit
.Commit(Description, Assets[]) fires a commit with specific files.
.GetAddedFiles() returns a list of files added to this commit
.GetDeletedFiles() returns a list of files that are marked to delete from collab
.GetAlteredFiles() returns a list of files marked for change
.Revert(asset) reverts a specific file
.Revert(folderPath) reverts a specific Folder
.GetHistoryIds() returns a list of ids (or indexes) for the collab history.
.GetHistoryDetails(id) returns an object containing description, who, when and assets changed list for a previous commit
.GetHistoryFile(path, historyId) returns a byte[] or stream for a file. NOTE, this is not saved to the file system
.GetHistoryFileLen(path, HistoryId) returns the size of the file
.Restore(HistoryId) restores a specific version of code.
.Reset() removes all changes, and resets to the current Collab Version

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(11030)

2D

(290)

Ads

(63)

AI & Navigation

(83)

Analytics

(130)

Animation

(413)

Asset Store

(370)

Asset Store Publisher

(21)

Assets

(557)

Audio

(185)

Cloud Build

(154)

Collaborate

(70)

Docs & Tutorials

(251)

Editor

(2579)

Everyplay

(17)

Game Performance Reporting

(22)

General

(1003)

Graphics

(903)

GUI

(447)

Input

(173)

Licensing

(93)

Networking

(192)

Physics

(392)

Platforms

(448)

Profiling & Optimization

(84)

Runtime

(188)

Scripting

(1154)

Terrain

(177)

WebGL

(145)