private void myResolveConflict (Document doc, IEnumerable<SavedRevision> conflicts)
{
Dictionary<String,Object> mergeProps = myMergeRevisions (conflicts);
var current = doc.CurrentRevision;
foreach (var rev in conflicts) {
var newRev = rev.CreateRevision ();
if (rev == current) {
newRev.SetProperties (mergeProps);
} else {
newRev.IsDeletion = true;
}
newRev.Save ();
}
}
On Apr 17, 2015, at 2:21 PM, Julio Albuquerque <jcezar.al...@gmail.com> wrote:
I am developing a routine to treat CONFLICTS, following tips from a presentation by Jeff (I do not know if the name is correct).
According to my need, I need to always save the newest possible revision, as I do this? Since the structure of my documents I do not have a typeattribute: Created in.
The revisions do not have date and time?
I noticed that conflicts are IEnumerable <SavedRevision> therefore always the last line would be the youngest?
Julio.
On Apr 17, 2015, at 6:05 PM, Julio Albuquerque <jcezar.al...@gmail.com> wrote:It could not be the sequence?
Its retrieve the sequence number of conflicts / reviews?
Thus I assume that the major sequence was the last.
It is possible?
So I have the same document but with two different information type.
How to know which version is the "true”?