# HG changeset patch # User Matt Mackall # Date 1407618303 18000 # Node ID 45a81266434f405dc8afa32ea0fb57349f4f0dec # Parent 604f832996b6ec63c9422e0eb431ad5ac77e5682# Parent aca137619a455dcd3d7ed86b2a05fa28d53be0cd merge with i18n diff -r 604f832996b6 -r 45a81266434f hgext/color.py --- a/hgext/color.py Sat Aug 09 16:04:36 2014 -0500 +++ b/hgext/color.py Sat Aug 09 16:05:03 2014 -0500 @@ -562,8 +562,12 @@ for l in label.split(): style = _styles.get(l, '') for effect in style.split(): - attr = mapcolor(w32effects[effect], attr) - + try: + attr = mapcolor(w32effects[effect], attr) + except KeyError: + # w32effects could not have certain attributes so we skip + # them if not found + pass # hack to ensure regexp finds data if not text.startswith('\033['): text = '\033[m' + text diff -r 604f832996b6 -r 45a81266434f mercurial/context.py --- a/mercurial/context.py Sat Aug 09 16:04:36 2014 -0500 +++ b/mercurial/context.py Sat Aug 09 16:05:03 2014 -0500 @@ -1341,8 +1341,10 @@ try: # updating the dirstate is optional # so we don't wait on the lock + # wlock can invalidate the dirstate, so cache normal _after_ + # taking the lock + wlock = self._repo.wlock(False) normal = self._repo.dirstate.normal - wlock = self._repo.wlock(False) try: for f in fixup: normal(f)