Repository navigation
Conflicts: Upload them files if env variable says so - #6038
Merged
Merged
Conversation
ogoffart
reviewed
Sep 18, 2017
| if (rc == 0) { | ||
| static bool uploadConflictFiles = qgetenv("OWNCLOUD_UPLOAD_CONFLICT_FILES").toInt() != 0; | ||
| if (!uploadConflictFiles) { | ||
| if (OCC::Utility::isConflictFile(bname)) { |
Contributor
There was a problem hiding this comment.
This allocates to convert bname from char* to QByteArray. Is it possible to have the finction take a non-owning char* instead of a QByteArray? (ideally, the function should take a std::string_view)
| } | ||
| rc = csync_fnmatch(conflict, path, 0); | ||
| if (rc == 0) { | ||
| static bool uploadConflictFiles = qgetenv("OWNCLOUD_UPLOAD_CONFLICT_FILES").toInt() != 0; |
Contributor
There was a problem hiding this comment.
This is duplicated a lot. Could that go in some helper function?
Set OWNCLOUD_UPLOAD_CONFLICT_FILES=1 to trigger this behavior. Note that this is experimental and unsupported. The real feature is likely to end up in 2.5. Uploading conflict files is simply done by removing the pattern from csync_exclude. The rest here deals with making the conflict notification ui approximately work. There are still some concerns about where an uploaded conflict file appears in the sync protocol and issues list (it should be in both, but is only in one of them currently!). See #4557.
ckamm
force-pushed
the
upload-conflicts
branch
from
September 19, 2017 09:23
31023e2 to
66de091
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set OWNCLOUD_UPLOAD_CONFLICT_FILES=1 to trigger this behavior.
Note that this is experimental and unsupported. The real feature is
likely to end up in 2.5.
Uploading conflict files is simply done by removing the pattern from
csync_exclude. The rest here deals with making the conflict notification
ui approximately work.
There are still some concerns about where an uploaded conflict file
appears in the sync protocol and issues list (it should be in both, but
is only in one of them currently!).
See #4557.