# HG changeset patch # User Durham Goode # Date 1454542744 28800 # Wed Feb 03 15:39:04 2016 -0800 # Node ID b5154d03849cebfc01ab0029fc7ae7be756402a2 # Parent 2cbfa815db442c31726f5da411df47822f82205b 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. diff --git a/dirsync.py b/dirsync.py --- a/dirsync.py +++ b/dirsync.py @@ -65,11 +65,11 @@ 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)