Thu, 22 Jan 2015 23:29:00 -0800 trydiff: extract function that generates filename pairs
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 23:29:00 -0800] rev 24106
trydiff: extract function that generates filename pairs The code that identifies copies/renames, as well as the filenames before and after, is now isolated and we can extract it to a function so it can be overridden by extensions (in particular the narrow clone extension).
Thu, 22 Jan 2015 23:18:43 -0800 trydiff: read file data in only one place
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 23:18:43 -0800] rev 24105
trydiff: read file data in only one place This moves getfilectx() out of the initial block in the loop, leaving that block to be only about finding pairs of filenames in ctx1 and ctx2 to diff.
Thu, 22 Jan 2015 23:13:48 -0800 trydiff: set filename variables to None even when not opts.git or losedatafn
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 23:13:48 -0800] rev 24104
trydiff: set filename variables to None even when not opts.git or losedatafn There is not much left of the first block "if opts.git or losedatafn" block now. The next patch will move the call to getfilectx() out of that block. We will then be using the defined-ness of 'f1' to tell whether the file existed in ctx1 (and under what name). We will need this information whether or not opts.git or losedatafn was set, so just remove that guard. The only operation in the block that is not cheap is the call to getfilectx(), but that has an extra 'if opts.git' guard already. --ignore-space-change proves that only 'if opts.git or losedatafn:' was removed.
Thu, 22 Jan 2015 23:01:00 -0800 trydiff: read flags in one place
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 23:01:00 -0800] rev 24103
trydiff: read flags in one place Now that we can trust f1/f2 to indicate whether that side of the diff exists, we can move the calls to ctx.flag() to a single place.
Fri, 06 Feb 2015 15:21:56 -0800 trydiff: break 'if opts.git or losedatafn' into two
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Feb 2015 15:21:56 -0800] rev 24102
trydiff: break 'if opts.git or losedatafn' into two This moves the initialization 'binary' closer to its other assignment, but exists mostly to simplify future patches.
Thu, 22 Jan 2015 22:42:35 -0800 trydiff: make filenames None when they don't exist
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 22:42:35 -0800] rev 24101
trydiff: make filenames None when they don't exist f1 and f2 are currently set always set to some filename, even for added or deleted files. Let's instead set them to None to indicate that one side of the diff doesn't exist. This lets us use the filename variables instead of the content variables and simplify a bit since the empty string is not a valid filename. More importantly, it paves the way for further simplifications.
Tue, 10 Feb 2015 10:57:58 -0500 test-help: add test to demonstrate that 'hg help merge-tools' is sane
Augie Fackler <augie@google.com> [Tue, 10 Feb 2015 10:57:58 -0500] rev 24100
test-help: add test to demonstrate that 'hg help merge-tools' is sane
Mon, 09 Feb 2015 23:07:39 -0800 help.merge-tools: do not double document merge tools
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 09 Feb 2015 23:07:39 -0800] rev 24099
help.merge-tools: do not double document merge tools Merge tools were being double documented in help system output due to functions being defined under multiple names in the merge tools dictionary. Establish a new dictionary for just the tools to document and use it from the help system so we don't get double output. Double documentation likely plagues other auto-documented items as well. It might be a good idea to eventually compare function instances to filter out duplicate entries from dictionaries passed to ``makeitemsdoc``. However, without an easy way to break ties, this may result in some functions being advertised over their modern equivalents. This would be a noble patch series. But it isn't one this author is willing to tackle at this time.
Mon, 09 Feb 2015 14:59:04 -0800 help: teach topic symbols how to dedent
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 09 Feb 2015 14:59:04 -0800] rev 24098
help: teach topic symbols how to dedent When using docstrings for documenting symbols such as revsets, templates, or hgweb commands, documentation likely has leading whitespace corresponding to the indentation from the Python source file. Up until this point, the help system stripped all leading and trailing whitespace and replaced it with 2 spaces of leading whitespace. There were a few bad side-effects. First, sections could not be used in docstrings because they would be indented and the rst parser would fail to parse them as sections. Also, any rst elements that required indentation would lose their indentation, again causing them to be parsed and rendered incorrectly. In this patch, we teach the topic symbols system how to dedent text properly. I argue this mode should be enabled by default. However, I stopped short of changing that because it would cause a lot of documentation reformatting to occur. I'm not sure if people are relying on or wanting indentation. So, dedenting has only been turned on for hgweb symbols. This decision should be scrutinized.
Fri, 06 Feb 2015 22:25:40 -0800 webcommands: document "graph" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:25:40 -0800] rev 24097
webcommands: document "graph" web command
Fri, 06 Feb 2015 22:19:59 -0800 webcommands: document "archive" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:19:59 -0800] rev 24096
webcommands: document "archive" web command
Fri, 06 Feb 2015 22:11:54 -0800 webcommands: document "filelog" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:11:54 -0800] rev 24095
webcommands: document "filelog" web command
Fri, 06 Feb 2015 22:08:30 -0800 webcommands: document "annotate" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:08:30 -0800] rev 24094
webcommands: document "annotate" web command
Fri, 06 Feb 2015 22:06:44 -0800 webcommands: document "comparison" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:06:44 -0800] rev 24093
webcommands: document "comparison" web command
Fri, 06 Feb 2015 22:02:14 -0800 webcommands: document "filediff" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:02:14 -0800] rev 24092
webcommands: document "filediff" web command
Fri, 06 Feb 2015 21:51:52 -0800 webcommands: document "summary" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 21:51:52 -0800] rev 24091
webcommands: document "summary" web command
Fri, 06 Feb 2015 21:48:01 -0800 webcommands: document "manifest" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 21:48:01 -0800] rev 24090
webcommands: document "manifest" web command
Fri, 06 Feb 2015 21:39:15 -0800 webcommands: document "changelog" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 21:39:15 -0800] rev 24089
webcommands: document "changelog" web command
Fri, 06 Feb 2015 21:26:53 -0800 webcommands: document "file" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 21:26:53 -0800] rev 24088
webcommands: document "file" web command
Fri, 06 Feb 2015 21:13:03 -0800 webcommands: document "log" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 21:13:03 -0800] rev 24087
webcommands: document "log" web command
Fri, 06 Feb 2015 20:50:17 -0800 webcommands: document "shortlog" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:50:17 -0800] rev 24086
webcommands: document "shortlog" web command
Fri, 06 Feb 2015 20:48:22 -0800 webcommands: document "changeset" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:48:22 -0800] rev 24085
webcommands: document "changeset" web command
Fri, 06 Feb 2015 20:44:46 -0800 webcommands: document "tags" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:44:46 -0800] rev 24084
webcommands: document "tags" web command
Fri, 06 Feb 2015 20:43:54 -0800 webcommands: document "bookmarks" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:43:54 -0800] rev 24083
webcommands: document "bookmarks" web command
Fri, 06 Feb 2015 20:44:10 -0800 webcommands: document "branches" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:44:10 -0800] rev 24082
webcommands: document "branches" web command
Fri, 06 Feb 2015 20:41:08 -0800 webcommands: document "help" web command
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:41:08 -0800] rev 24081
webcommands: document "help" web command
Fri, 06 Feb 2015 20:27:56 -0800 help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 20:27:56 -0800] rev 24080
help: add web commands to help documentation The capabilities and URL endpoints of the hgweb server can currently only be inferred by looking at links in `hg serve` output or by reading the source code. I've frequently found myself wanting to quickly see what URLs and capabilities are available. This patch teaches the help system how to display information about web commands and their URLs. Using a mechanism similar to revsets, templates, etc, we can now iterate over the docstrings of registered web command functions and display them in the help output. Unfortunately, web commands don't currently have docstrings, so the output is currently empty. This will be addressed in the following patches. I apologize for the patch bomb.
Fri, 06 Feb 2015 23:08:47 -0800 help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 23:08:47 -0800] rev 24079
help.hgweb: add a section describing URLs and common parameters The behavior of hgweb's URLs isn't documented anywhere inside Mercurial. Let's start to change that.
Fri, 06 Feb 2015 22:47:48 -0800 webcommands: move help import into help command handler
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:47:48 -0800] rev 24078
webcommands: move help import into help command handler A subsequent patch will introduce an import cycle between mercurial.help and mercurial.hgweb.webcommands. Break the cycle by moving the import of mercurial.help into the web command that actually needs it.
Fri, 06 Feb 2015 22:52:40 -0800 webcommands: define a dict of available commands
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 22:52:40 -0800] rev 24077
webcommands: define a dict of available commands This will be used to hook web commands up to the help system. It also makes web commands work similarly as CLI commands.
Fri, 06 Feb 2015 19:06:17 -0800 webcommands: define web commands using a decorator
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 19:06:17 -0800] rev 24076
webcommands: define web commands using a decorator Other parts of Mercurial have evolved to use decorators to declare commands or handlers. This patch gives the same treatment to web commands.
Fri, 06 Feb 2015 16:33:05 -0800 run-tests: ensure install directories exist
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 16:33:05 -0800] rev 24075
run-tests: ensure install directories exist As part of the transition to setuptools, it was discovered that setuptools doesn't create install directories for you where distutils apparently did. This was causing run-tests.py to fail when creating the temporary hg install. We work around this problem by creating the install directories before running setup.py.
Fri, 06 Feb 2015 16:15:02 -0800 run-tests: avoid printing extra newlines from install log
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 16:15:02 -0800] rev 24074
run-tests: avoid printing extra newlines from install log If an installation error occurs, we print the install log. Before, output had extra newlines because we were using "print" on data that was already newline terminated.
Fri, 06 Feb 2015 11:27:25 -0800 bundlerepo: basic bundle2 support
Eric Sumner <ericsumner@fb.com> [Fri, 06 Feb 2015 11:27:25 -0800] rev 24073
bundlerepo: basic bundle2 support For bundlerepo to work with bundle2 files, we need to find the part that contains the bundle's changegroup data and work with that instead of the entire bundle. Future work can add separate processing for other bundle2 parts.
Thu, 05 Feb 2015 16:03:26 -0800 bundlerepo: keep track of the original bundle object
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 16:03:26 -0800] rev 24072
bundlerepo: keep track of the original bundle object Bundlerepo should always close() the object that it receives from exchange.readbundle(). When bundle2 support is added in a later diff, self.bundle will be overwritten to be the changegroup part instead of the entire bundle unpacker.
Thu, 05 Feb 2015 15:56:50 -0800 bundle2.unbundle20: add compressed() method
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 15:56:50 -0800] rev 24071
bundle2.unbundle20: add compressed() method Bundlerepo uses the compressed() method to determine whether it should write an uncompressed temporary file. Since we don't support compressed bundle2 files at the moment, make this method return true.
Thu, 05 Feb 2015 15:52:57 -0800 bundle2.unpackermixin: default value for seek() whence parameter
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 15:52:57 -0800] rev 24070
bundle2.unpackermixin: default value for seek() whence parameter The contract for seek() includes seeking to an offset from the beginning of the file when whence is omitted; put this implementation in compliance.
Fri, 06 Feb 2015 23:40:46 +0100 windows: adjust doc string and comments of posixfile()
Adrian Buehlmann <adrian@cadifra.com> [Fri, 06 Feb 2015 23:40:46 +0100] rev 24069
windows: adjust doc string and comments of posixfile() The doc string of osutil.posixfile includes (line 611): "On error, this function may raise either a WindowsError or an IOError." which is most likely correct, but does not fit for this function here anymore, as we do fold WindowsError to IOError here specifically. And this function is now a bit more than just an exception-wrapper, as it has been expanded to additionally sanitize the unloved seek/tell behavior of Windows. (Self-disclosure: This patch is entirely untested at the time of its publication, as I'm currently not using this version myself. I send it in hopes that it will reduce potential future confusion. CC-ing Matt Harbison)
Wed, 04 Feb 2015 14:11:45 -0800 color: support a different color mode when the pager is active
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Feb 2015 14:11:45 -0800] rev 24068
color: support a different color mode when the pager is active MSYS on Windows has a terminal that supports the "win32" color mode (which "auto" properly detects for us). However, a popularily configured pager in that environment (GNU less) only supports the "ansi" color mode. This patch teaches color about a new config option: pagermode. It behaves like "mode" but is only consulted when the pager is active for the current command. MSYS users can now set "pagermode = ansi" and get a colorful experience that just works. Previously, MSYS users would have to live without color when using GNU less as the pager, would have to manually configure the pager to attend every command, or would have gibberish if "ansi" was used without the pager.
Fri, 06 Feb 2015 12:09:09 -0800 pager: ensure wrapped dispatch._runcommand runs before color's
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 12:09:09 -0800] rev 24067
pager: ensure wrapped dispatch._runcommand runs before color's An upcoming patch will teach color to potentially act differently if the pager is active. Since both extensions wrap the same function (dispatch._runcommand) to change behavior, we must guarantee that pager's wrapped function runs before color's so color may read the breadcrumb left by pager.
Fri, 06 Feb 2015 12:07:56 -0800 pager: set an attribute on ui indicating that a pager is active
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 12:07:56 -0800] rev 24066
pager: set an attribute on ui indicating that a pager is active A subsequent patch will teach the color extension to do different things depending on whether a pager is active. This patch leaves a breadcrumb on the ui instance to allow it do that that.
Fri, 06 Feb 2015 12:07:32 -0800 extensions: support callbacks after another extension loads
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Feb 2015 12:07:32 -0800] rev 24065
extensions: support callbacks after another extension loads An upcoming patch will introduce a dependency between the color and pager extensions. To prepare for this, we teach extensions how to register callbacks that can execute when another extension loads. This patch is based on code provided by Matt Mackall. But significant parts have changed (such as the ability to register multiple callbacks and the change in behavior to always call a callback). I believe that always firing the callback is a good practice. I think the common use for this feature will be for extensions to say "run this one-time setup code, after this other extension if possible." Always running the callback will facilitate this.
Fri, 06 Feb 2015 21:53:39 +0900 log: fix --follow null parent not to include revision 0
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Feb 2015 21:53:39 +0900] rev 24064
log: fix --follow null parent not to include revision 0 If p1 is null, ':.' is translated as '0:null'. But rangeset can't handle null, only revision 0 was visible. Because 'null' should not be listed implicitly, "log --follow" (without -r) should be empty if p1 is null. Test of "hg grep -f" is added for cmdutil.walkchangerevs().
Fri, 06 Feb 2015 00:22:20 +0900 cmdutil: have walkchangerevs utilize common function to build revs
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Feb 2015 00:22:20 +0900] rev 24063
cmdutil: have walkchangerevs utilize common function to build revs
Fri, 06 Feb 2015 00:15:35 +0900 log: extract common part from getgraphlogrevs() and getlogrevs()
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Feb 2015 00:15:35 +0900] rev 24062
log: extract common part from getgraphlogrevs() and getlogrevs()
Fri, 06 Feb 2015 00:06:47 +0900 graphlog: remove useless check for empty repo when --follow is specified
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Feb 2015 00:06:47 +0900] rev 24061
graphlog: remove useless check for empty repo when --follow is specified This prepares for extracting common part from getgraphlogrevs() and getlogrevs(). getlogrevs() does not handle empty repo specially. When it was added at d74099ac2ac1, revs were build by old-style query, '.:0'. So I think the purpose of "len(repo) > 0" was to handle the case of . = null. Currently it isn't necessary for 'reverse(:.)', and it does not work if repo is not empty but p1 is null. $ hg up null $ hg glog --follow -T '{rev}:{node|short}\n' o 0:0a04b987be5a The subsequent patch will fix this problem, so drops the wrong version for now.
Thu, 05 Feb 2015 23:49:18 +0900 graphlog: move comment and flag denoting revs might be unsorted
Yuya Nishihara <yuya@tcha.org> [Thu, 05 Feb 2015 23:49:18 +0900] rev 24060
graphlog: move comment and flag denoting revs might be unsorted This prepares for extracting common part from getgraphlogrevs() and getlogrevs(). "possiblyunsorted" exists only in getgraphlogrevs().
Thu, 05 Feb 2015 23:14:44 +0900 graphlog: remove too early return from getgraphlogrevs() for empty repo
Yuya Nishihara <yuya@tcha.org> [Thu, 05 Feb 2015 23:14:44 +0900] rev 24059
graphlog: remove too early return from getgraphlogrevs() for empty repo Even if repository is empty, null revision should exist.
Thu, 22 Jan 2015 22:22:09 -0800 trydiff: call util.binary in only one place
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 22:22:09 -0800] rev 24058
trydiff: call util.binary in only one place It's practically free to call util.binary on empty or None content. By relying on that, we can replace the current four call sites by one.
Thu, 22 Jan 2015 21:35:57 -0800 trydiff: collect all lossiness checks in one place
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 21:35:57 -0800] rev 24057
trydiff: collect all lossiness checks in one place By having all the checks for lossiness in one place, it becomes much easier to get an overview of the conditions that lead to losedatafn() being called. It also makes it obvious that it can not be called multiple times for a single time (something that was rather tricky to determine before).
Thu, 22 Jan 2015 21:03:57 -0800 trydiff: replace 'binarydiff' variable by 'binary' variable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Jan 2015 21:03:57 -0800] rev 24056
trydiff: replace 'binarydiff' variable by 'binary' variable It's not obvious, but every path in the 'if opts.git or losedatafn:' block will have checked whether the file is binary [1]. Let's assign the result of this check to a variable so we can simplify by checking 'binary and opts.git' in only one place instead of every place we currently assign to 'binarydiff'. [1] Except when deleting an empty file, but checking whether an empty string is binary is very cheap anyway.
Fri, 16 Jan 2015 15:09:21 -0800 trydiff: rename 'op' to make it more specific
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 15:09:21 -0800] rev 24055
trydiff: rename 'op' to make it more specific Rename the 'op' variable that can take values None/'copy'/'rename' to 'copyop' to make it a little more specific.
Fri, 06 Feb 2015 15:52:55 +0800 hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru> [Fri, 06 Feb 2015 15:52:55 +0800] rev 24054
hgweb: replace implicit <tbody> with explicit <thead> where appropriate Some templates in paper style use <tbody> elements inside <table> to assign a class to "body" part of that table (in this case, to make rows striped). The problem is that the <tbody> is preceded by <tr> element, which browsers understand as an implicit start of table body, so the following exlicit <tbody> will actually be "nested", which is not valid. Since that first <tr> contains table headers, wrapping it in <thead> is both semantically correct and follows the advertised XHTML 1.1 doctype.
Sat, 31 Jan 2015 12:54:35 -0500 obsolete: drop the explicit seek to EOF after append mode open()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 31 Jan 2015 12:54:35 -0500] rev 24053
obsolete: drop the explicit seek to EOF after append mode open() posixfile now handles this.
Sat, 31 Jan 2015 12:42:05 -0500 branchmap: backout 6bf93440a717
Matt Harbison <matt_harbison@yahoo.com> [Sat, 31 Jan 2015 12:42:05 -0500] rev 24052
branchmap: backout 6bf93440a717 This is no longer needed now that posixfile handles seeking to EOF when it opens a file in append mode.
Sat, 31 Jan 2015 12:39:44 -0500 windows: seek to the end of posixfile when opening in append mode
Matt Harbison <matt_harbison@yahoo.com> [Sat, 31 Jan 2015 12:39:44 -0500] rev 24051
windows: seek to the end of posixfile when opening in append mode The position is implementation defined when opening in append mode, and it seems like Linux sets it to EOF while Windows keeps it at zero. This has caused problems in the past when a file is opened and tell() is immediately called, such as 48c232873a54 and 6bf93440a717. Since the only caller of osutil.posixfile is this windows module, this seems like a better place to fix the issue than in osutil.c and pure.osutil.
Thu, 20 Nov 2014 12:15:12 -0800 context: use unfiltered repo for '.'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Nov 2014 12:15:12 -0800] rev 24050
context: use unfiltered repo for '.' There is no reason to read obsolescence markers when doing a plain 'hg status' without --rev. Use the unfiltered repo when initializing context._rev to speed things up. This speeds up 'hg status' from 1.342s to 0.080s on my repo with ~110k markers.
Thu, 05 Feb 2015 14:09:08 -0800 check-commit: check capitalization in summary lines
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 14:09:08 -0800] rev 24049
check-commit: check capitalization in summary lines At the moment, check-commit will complain about the topic being capitalized, but not the summary that comes after it. This diff corrects that deficiency.
Thu, 05 Feb 2015 10:57:45 -0800 bundle2: seek in part iterator
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 10:57:45 -0800] rev 24048
bundle2: seek in part iterator When iterating over bundle2 parts, add a seek to the iterator so that processing will continue normally even if the entire part isn't consumed.
Thu, 05 Feb 2015 10:56:05 -0800 bundle2: now that we have a seek implementation, use it
Eric Sumner <ericsumner@fb.com> [Thu, 05 Feb 2015 10:56:05 -0800] rev 24047
bundle2: now that we have a seek implementation, use it Replace bare part.read() calls with part.seek(0, 2) since the return value is being ignored. As this doesn't necessarily require building a string that contains the rest of the part, the potential exists to reduce the memory footprint of these operations.
(0) -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip