absorb: fix test-check issues

Summary: This diff fixes test-check issues related to `absorb`.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4050973

Signature: t1:4050973:1476985180:1bcd81297933c1488372b6c4bb7e5ea46f8105b0
This commit is contained in:
Jun Wu 2016-10-20 14:59:20 +01:00
parent 9a2cc16dac
commit 4816fb9b86
4 changed files with 3 additions and 5 deletions

View File

@ -27,7 +27,7 @@ amend modified chunks into the corresponding non-public changesets.
from __future__ import absolute_import
from collections import defaultdict
import collections
import linelog
from mercurial import (
@ -58,6 +58,8 @@ colortable = {
'absorb.path': 'bold',
}
defaultdict = collections.defaultdict
class nullui(object):
"""blank ui object doing nothing"""
debugflag = False

View File

@ -55,7 +55,6 @@ def testfilefixup(oldcontents, workingcopy, expectedcontents, fixups=None):
def buildcontents(linesrevs):
# linesrevs: [(linecontent : str, revs : [int])]
result = ['']
revs = set(itertools.chain(*[revs for line, revs in linesrevs]))
return [''] + [
''.join([l for l, rs in linesrevs if r in rs])

View File

@ -17,8 +17,6 @@ modules, or change the whitelist (allowsymbolimports).
$ hg locate 'set:**.py or grep(r"^#!.*?python")' | sed 's-\\-/-g' | $PYTHON "$import_checker" - \
> | egrep -v 'symbol import .* (mercurial|hgext)$'
fastannotate/context.py:31: imports not lexically sorted: linelog < os
hgext3rd/absorb.py:30: relative import of stdlib module
hgext3rd/absorb.py:30: direct symbol import defaultdict from collections
hgext3rd/smartlog.py:26: relative import of stdlib module
hgext3rd/smartlog.py:26: direct symbol import chain from itertools
infinitepush/__init__.py:15: imports from mercurial not lexically sorted: pushkey < util

View File

@ -221,7 +221,6 @@ run pyflakes on all tracked files ending in .py or without a file ending
remotefilelog/remotefilelogserver.py:277: local variable 'opener' is assigned to but never used
remotefilelog/shallowbundle.py:321: local variable 'copyfl' is assigned to but never used
tests/perftest.py:232: local variable 'fakestore' is assigned to but never used
tests/test-absorb-filefixupstate.py:58: local variable 'result' is assigned to but never used
tests/test-remotefilelog-ctreemanifest.py:51: local variable 'a' is assigned to but never used
tests/test-remotefilelog-datapack.py:264: local variable 'result' is assigned to but never used
fastmanifest/implementation.py:18: 'from constants import *' used; unable to detect undefined names