Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 34431:52e9310626a8
context: rename local 'attr' to 'attr_'
In the next diff we're going to import mercurial.thirdparty.attr, and pyflakes
complains about this if this rename isn't done.
Differential Revision: https://phab.mercurial-scm.org/D897
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 02 Oct 2017 02:34:47 -0700 |
parents | 80215865d154 |
children | 2e32c6a31cc7 |
comparison
equal
deleted
inserted
replaced
34430:80215865d154 | 34431:52e9310626a8 |
---|---|
2418 self._copied = copied | 2418 self._copied = copied |
2419 | 2419 |
2420 if reusable: | 2420 if reusable: |
2421 # copy extra fields from originalfctx | 2421 # copy extra fields from originalfctx |
2422 attrs = ['rawdata', 'rawflags', '_filenode', '_filerev'] | 2422 attrs = ['rawdata', 'rawflags', '_filenode', '_filerev'] |
2423 for attr in attrs: | 2423 for attr_ in attrs: |
2424 if util.safehasattr(originalfctx, attr): | 2424 if util.safehasattr(originalfctx, attr_): |
2425 setattr(self, attr, getattr(originalfctx, attr)) | 2425 setattr(self, attr_, getattr(originalfctx, attr_)) |
2426 | 2426 |
2427 def data(self): | 2427 def data(self): |
2428 return self._datafunc() | 2428 return self._datafunc() |
2429 | 2429 |
2430 class metadataonlyctx(committablectx): | 2430 class metadataonlyctx(committablectx): |