Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/lfcommands.py @ 15255:7ab05d752405
largefiles: cosmetics, whitespace, code style
This is mainly about keeping code under the 80-column limit with as
few backslashes as possible. I am deliberately not making any logic or
behaviour changes here and have restrained myself to a few "peephole"
refactorings.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Thu, 13 Oct 2011 21:42:54 -0400 |
parents | dd03d3a9f888 |
children | 07811b3b119b |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Thu Oct 13 20:45:49 2011 -0400 +++ b/hgext/largefiles/lfcommands.py Thu Oct 13 21:42:54 2011 -0400 @@ -383,9 +383,9 @@ # if it exists and its hash matches, it might have been locally # modified before updating and the user chose 'local'. in this case, # it will not be in any store, so don't look for it. - if (not os.path.exists(repo.wjoin(lfile)) \ - or expectedhash != lfutil.hashfile(repo.wjoin(lfile))) and \ - not lfutil.findfile(repo, expectedhash): + if ((not os.path.exists(repo.wjoin(lfile)) or + expectedhash != lfutil.hashfile(repo.wjoin(lfile))) and + not lfutil.findfile(repo, expectedhash)): toget.append((lfile, expectedhash)) if toget: @@ -441,9 +441,9 @@ if os.path.exists(absstandin+'.orig'): shutil.copyfile(abslfile, abslfile+'.orig') expecthash = lfutil.readstandin(repo, lfile) - if expecthash != '' and \ - (not os.path.exists(abslfile) or \ - expecthash != lfutil.hashfile(abslfile)): + if (expecthash != '' and + (not os.path.exists(abslfile) or + expecthash != lfutil.hashfile(abslfile))): if not lfutil.copyfromcache(repo, expecthash, lfile): return None # don't try to set the mode or update the dirstate ret = 1 @@ -468,7 +468,6 @@ # -- hg commands declarations ------------------------------------------------ - cmdtable = { 'lfconvert': (lfconvert, [('s', 'size', '',