Skip to content

Commit

Permalink
git subrepo pull --force uno
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "uno"
  merged:   "d8cb318d"
upstream:
  origin:   "https://github.com/prrvchr/uno.git"
  branch:   "master"
  commit:   "d8cb318d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
  • Loading branch information
prrvchr committed Nov 11, 2024
1 parent 5844cfa commit a74778e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 22 deletions.
3 changes: 2 additions & 1 deletion uno/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[subrepo]
remote = https://github.com/prrvchr/uno.git
branch = master
commit =
commit = d8cb318dfb8fe8e0c1a5319ea48172efdd3ec2c2
method = merge
cmdver = 0.4.3
parent = 5844cfaa56ed1111cc354e346764793fcebaba29
2 changes: 1 addition & 1 deletion uno/lib/uno/options/ucb/optionsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def enableShare(self, enabled):
self._view.enableShare(enabled)

def enableSync(self, enabled):
self._view.enableSync(enabled, OptionsManager._restart)
self._view.enableSync(enabled, OptionsManager._restart, self._model.hasDataBase())

def viewData(self):
url = self._model.getDatasourceUrl()
Expand Down
14 changes: 8 additions & 6 deletions uno/lib/uno/options/ucb/optionsmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@

class OptionsModel():
def __init__(self, ctx):
self._ctx = ctx
self._config = getConfiguration(ctx, g_identifier, True)
folder = g_folder + g_ucbseparator + g_scheme
location = getResourceLocation(ctx, g_identifier, folder)
self._url = location + '.odb'
self._exist = getSimpleFile(ctx).exists(self._url)
self._policies = {'SERVER_IS_MASTER': 1, 'CLIENT_IS_MASTER': 2, 'NONE_IS_MASTER': 3}
self._factors = {'Timeout': 60, 'Chunk': 1024}

Expand Down Expand Up @@ -86,14 +86,16 @@ def _SupportShare(self):

# OptionsModel getter methods
def getInitData(self):
hasdata = getSimpleFile(self._ctx).exists(self._url)
resumable = self._config.getByName('ResumableUpload')
return hasdata, resumable
return self._exist, resumable

def hasDataBase(self):
return self._exist

def getViewData(self, restart):
return (self._ResetSync, self._SupportShare, self._IsShared,
self._ShareName, self._Policy, self._Timeout,
self._Download, self._Upload, restart)
return (self._exist, self._ResetSync, self._SupportShare,
self._IsShared, self._ShareName, self._Policy,
self._Timeout, self._Download, self._Upload, restart)

def getDatasourceUrl(self):
return self._url
Expand Down
7 changes: 4 additions & 3 deletions uno/lib/uno/options/ucb/optionsview.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setStep(self, step, restart):
# XXX: because it was lost (ie: after setting the new step everything is visible).
self.setRestart(restart)

def setViewData(self, reset, support, share, name, index, timeout, download, upload, restart):
def setViewData(self, exist, reset, support, share, name, index, timeout, download, upload, restart):
self._getReset().State = int(reset)
if support:
self._getShare().State = int(share)
Expand All @@ -72,7 +72,7 @@ def setViewData(self, reset, support, share, name, index, timeout, download, upl
self._getShareName().Text = name
self.enableShare(False)
self._getOption(index).State = 1
self.enableSync(index != 3, restart)
self.enableSync(index != 3, restart, exist)
self._getTimeout().Value = timeout
self._setSetting(download, 0)
self._setSetting(upload, 1)
Expand All @@ -81,7 +81,8 @@ def setViewData(self, reset, support, share, name, index, timeout, download, upl
def enableShare(self, enabled):
self._getShareName().Model.Enabled = enabled

def enableSync(self, enabled, restart):
def enableSync(self, enabled, restart, exist):
self._getReset().Model.Enabled = enabled and exist
self._getTimeoutLabel().Model.Enabled = enabled
self._getTimeout().Model.Enabled = enabled
self._enableUpload(enabled, restart)
Expand Down
5 changes: 3 additions & 2 deletions uno/lib/uno/ucb/replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,14 @@ def _pushUser(self, user):
break
items.append(pushed)
else:
self._logger.logprb(INFO, g_basename, '_pushUsers()', 303, user.Name, len(items))
# XXX: User was pushed, we update user timestamp if needed
self._database.updatePushItems(user, items)
self._logger.logprb(INFO, g_basename, '_pushUsers()', 303, user.Name)
self._logger.logprb(INFO, g_basename, '_pushUsers()', 304, user.Name)
return True
return False
except Exception as e:
self._logger.logprb(SEVERE, g_basename, '_pushUsers()', 304, e, traceback.format_exc())
self._logger.logprb(SEVERE, g_basename, '_pushUsers()', 305, e, traceback.format_exc())
return False

def _pushItem(self, user, item, metadata, start, end):
Expand Down
5 changes: 3 additions & 2 deletions uno/resource/ucb/Replicator_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
300=Replicator._pushUsers()
301=Starting data replication for user <{}>.
302=Has encountered an error while replicating the file/folder <{}> of <{}> with Id <{}>
303=End of replicating data for user <{}>.
304=Replicator thread throw error: {}\n{}
303=Pushing data for user <{}> for <{}> changes.
304=End of replicating data for user <{}>.
305=Replicator thread throw error: {}\n{}

310=Replicator._pushItem
311=Has replicated the creation of a folder <{}> of <{}>.
Expand Down
15 changes: 8 additions & 7 deletions uno/resource/ucb/Replicator_fr_FR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
132=Fin de la synchronisation des données pour l'utilisateur <{}>.

200=Replicator._pullUser()
201=Démarrage du téléchargement des données pour l'utilisateur <{}>.
202=La réplication pour l'utilisateur <{}> a produit <{}> changements dont <{}> téléchargement à l'aide de <{}> requête HTTP avec le jeton <{}>.
203=Fin du téléchargement pour l'utilisateur <{}>.
201=Démarrage de la réplication des données distantes pour l'utilisateur <{}>.
202=La réplication pour l'utilisateur <{}> a produit <{}> modifications dont <{}> téléchargements à l'aide de <{}> requête HTTP avec le jeton <{}>.
203=Fin de la réplication des données distantes pour l'utilisateur <{}>.
204=Le fil d'execution du réplicateur a généré l'erreur: {}\n{}

210=Replicator._checkNewIdentifier()
Expand All @@ -29,15 +29,16 @@
220=Replicator._initUser()
221=Initialisation de l'utilisateur <{}>.
222=La première réplication pour l'utilisateur <{}> a produit <{}> changements à l'aide de <{}> requête HTTP avec le jeton <{}>.
222=La première réplication pour l'utilisateur <{}> a produit <{}> modifications à l'aide de <{}> requête HTTP avec le jeton <{}>.
223=La première réplication pour l'utilisateur <{}>, terminée...
224=Le fil d'execution du réplicateur a généré l'erreur: {}\n{}
300=Replicator._pushUsers()
301=Démarrage de la réplication des données pour l'utilisateur <{}>.
301=Démarrage de la réplication des données locales pour l'utilisateur <{}>.
302=A rencontré une erreur lors de la répliquation du fichier/répértoire <{}> du <{}> portant l'Id <{}>
303=Fin de la réplication des données pour l'utilisateur <{}>.
304=Le fil d'execution du réplicateur a généré l'erreur: {}\n{}
303=La réplication pour l'utilisateur <{}> a effectué <{}> modifications.
304=Fin de la réplication des données locales pour l'utilisateur <{}>.
305=Le fil d'execution du réplicateur a généré l'erreur: {}\n{}
310=Replicator._pushItem
311=A repliqué la création du dossier <{}> du <{}>.
Expand Down

0 comments on commit a74778e

Please sign in to comment.