b5154d03849c — Durham Goode 8 years ago
dirsync: move mirroredfiles declaration out of if statement

If this if statement was skipped (because there was no mapping configured) this
function threw an exception because mirroredfiles was not defined.
1 files changed, 1 insertions(+), 1 deletions(-)

M dirsync.py
M dirsync.py +1 -1
@@ 65,11 65,11 @@ def _commit(orig, self, *args, **kwargs)
     wlock = self.wlock()
     try:
         maps = getconfigs(self.ui)
+        mirroredfiles = set()
         if maps:
             match = args[3] if len(args) >= 4 else kwargs.get('match')
             match = match or matchmod.always(self.root, '')
             status = self.status()
-            mirroredfiles = set()
 
             for added in status.added:
                 mirrors = getmirrors(maps, added)