Tue, 23 Sep 2014 14:40:32 -0700 convert: simplify git.similarity parsing
Siddharth Agarwal <sid0@fb.com> [Tue, 23 Sep 2014 14:40:32 -0700] rev 22511
convert: simplify git.similarity parsing
Wed, 24 Sep 2014 20:11:36 -0700 revset: fast implementation for fullreposet.__and__
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 24 Sep 2014 20:11:36 -0700] rev 22510
revset: fast implementation for fullreposet.__and__ "And" operation with something that contains the whole repo should be super cheap. Check method docstring for details. This provide massive boost to simple revset that use `subset & xxx` revset #0: p1(20000) 0) wall 0.002447 comb 0.010000 user 0.010000 sys 0.000000 (best of 767) 1) wall 0.000529 comb 0.000000 user 0.000000 sys 0.000000 (best of 3947) revset #1: p2(10000) 0) wall 0.002464 comb 0.000000 user 0.000000 sys 0.000000 (best of 913) 1) wall 0.000530 comb 0.000000 user 0.000000 sys 0.000000 (best of 4226) No other regression spotted. More performance improvements are expected in the future as more revset predicate are converted to use `subset & xxx` The relaxed way `fullreposet` handles "&" operation may cause some trouble for people comparing smartset from different filter levels. I'm not sure such people exist and we can improve that aspect in later patches.
Thu, 18 Sep 2014 13:04:02 -0700 revset: turn spanset into a factory function
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 18 Sep 2014 13:04:02 -0700] rev 22509
revset: turn spanset into a factory function We rename the `spanset` class to `_spanset`. `spanset` is now a function that builds either a `fullreposet` or a `_spanset` according to the argument passed. At some point, we may force people to explicitly use the `fullreposet` constructor, but the current approach makes it easier to ensure we use the new class whenever possible and focus on the benefits of this class.
Tue, 29 Apr 2014 19:06:15 -0700 revert: add a fullreposet class
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 29 Apr 2014 19:06:15 -0700] rev 22508
revert: add a fullreposet class Every revset evaluation starts from `subset = spanset(repo)` and a lot of revset predicates build a `spansetrepo` for their internal needs. `spanset` is a generic class that can handle any situation. As a result a lot of operation between spanset result in an `orderedlazyset`, a safe object but suboptimal in may situation. So we introduce a `fullreposet` class where some of the operation will be overwritten to produce more interesting results.
Tue, 23 Sep 2014 12:21:38 -0700 obsolete: ensure that `getrevs` always return a set
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 23 Sep 2014 12:21:38 -0700] rev 22507
obsolete: ensure that `getrevs` always return a set When a set of revisions was empty, we were using an empty tuple. We now return an empty frozenset to ensure the object could be used in an operation that requires a set.
Mon, 22 Sep 2014 23:46:38 +0900 hgweb: fail if an invalid command was supplied in url path (issue4071) stable
Anton Shestakov <engored@ya.ru> [Mon, 22 Sep 2014 23:46:38 +0900] rev 22506
hgweb: fail if an invalid command was supplied in url path (issue4071) Traditionally, the way to specify a command for hgweb was to use url query arguments (e.g. "?cmd=batch"). If the command is unknown to hgweb, it gives an error (e.g. "400 no such method: badcmd"). But there's also another way to specify a command: as a url path fragment (e.g. "/graph"). Before, hgweb was made forgiving (looks like it was made in 44c5157474e7) and user could put any unknown command in the url. If hgweb couldn't understand it, it would just silently fall back to the default command, which depends on the actual style (e.g. for paper it's shortlog, for monoblue it's summary). This was inconsistent and was breaking some tools that rely on http status codes (as noted in the issue4071). So this patch changes that behavior to the more consistent one, i.e. hgweb will now return "400 no such method: badcmd". So if some tool was relying on having an invalid command return http status code 200 and also have some information, then it will stop working. That is, if somebody typed foobar when they really meant shortlog (and the user was lucky enough to choose a style where the default command is shortlog too), that fact will now be revealed. Code-wise, the changed if block is only relevant when there's no "?cmd" query parameter (i.e. only when command is specified as a url path fragment), and looks like the removed else branch was there only for falling back to default command. With that removed, the rest of the code works as expected: it looks at the command, and if it's not known, raises a proper ErrorResponse exception with an appropriate message. Evidently, there were no tests that required the old behavior. But, frankly, I don't know any way to tell if anyone actually exploited such forgiving behavior in some in-house tool.
Wed, 24 Sep 2014 15:52:40 +0900 keepalive: fix how md5 is used stable
Mike Hommey <mh@glandium.org> [Wed, 24 Sep 2014 15:52:40 +0900] rev 22505
keepalive: fix how md5 is used The code in keepalive dates from when it was importing the md5 module directly and uses md5.new. Since then, what 'md5' means has been changed from an import of the md5 module to being a function using the right module between hashlib and md5, so the md5.new idiom doesn't work anymore.
Sat, 27 Sep 2014 13:18:10 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Sat, 27 Sep 2014 13:18:10 -0500] rev 22504
merge with stable
Tue, 16 Sep 2014 23:59:29 -0700 revset: add an optimised baseset.__contains__ (issue4371) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 23:59:29 -0700] rev 22503
revset: add an optimised baseset.__contains__ (issue4371) The baseset class is based on a python list. This means that base.__contains__ was absolutely as crappy as list.__contains__. We now rely on __contains__ from the underlying set. This will avoid having to explicitly convert the baseset to a set (using baseset.set()) whenever one want fast membership test. Apparently there is already code that forgot to do such conversions since we observe a massive speedup in some test. revset #25: roots((0::) - (0::tip)) 0) wall 2.079454 comb 2.080000 user 2.080000 sys 0.000000 (best of 5) 1) wall 0.132970 comb 0.130000 user 0.130000 sys 0.000000 (best of 65) No regression is observed in benchmarks. This change improve the issue4371 back to acceptable situation (but are still slower than manual substraction)
Mon, 22 Sep 2014 16:14:08 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 22 Sep 2014 16:14:08 -0500] rev 22502
merge with stable
Mon, 22 Sep 2014 16:03:07 -0500 commands: deprecate the parents commands
Matt Mackall <mpm@selenic.com> [Mon, 22 Sep 2014 16:03:07 -0500] rev 22501
commands: deprecate the parents commands It's replaced by 'hg summary' or hg log -r 'parents(foo)' and doesn't need to take up space in our command list anymore.
Wed, 17 Sep 2014 19:56:59 -0700 revset: remove nullrev from the bookmark computation
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 19:56:59 -0700] rev 22500
revset: remove nullrev from the bookmark computation Same as for other revset we sanitize the content of the set to be able to rely on it more.
Wed, 17 Sep 2014 10:58:25 -0700 revset: unify code flow in `bookmark`
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 10:58:25 -0700] rev 22499
revset: unify code flow in `bookmark` We refactor the code of the bookmark revset to have a single return. This will allow us to sanitize the content of the set.
Wed, 17 Sep 2014 10:59:30 -0700 revset: remove invalid value in the origin set
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 10:59:30 -0700] rev 22498
revset: remove invalid value in the origin set Same as the parents related revsets, origin had some invalid value in the computed set. We remove them.
Wed, 17 Sep 2014 19:49:26 -0700 revset: remove nullrev from set computed in parents()
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 19:49:26 -0700] rev 22497
revset: remove nullrev from set computed in parents() The old code relied on the subset contents to get rid of invalid values. We would like to be able to rely more on the computation in parents() so we filter out the invalid value.
Wed, 17 Sep 2014 19:44:03 -0700 revset: refactor parents() into a single return point
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 19:44:03 -0700] rev 22496
revset: refactor parents() into a single return point Both paths are doing similar thing in the end. We refactor the function so that the `ps` set is commonly used at the end. This will end excluding `nullrev` from this set in a future patch
Wed, 17 Sep 2014 04:40:30 -0700 revset: remove nullrev from set computed in p1() and p2()
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Sep 2014 04:40:30 -0700] rev 22495
revset: remove nullrev from set computed in p1() and p2() The old code relied on the subset contents to get rid of invalid values. We would like to be able to rely more on the computation in p1() and p2() so we filter out the invalid value
Tue, 16 Sep 2014 23:42:41 -0700 revset: document the choice made in __generatorset.__iter__
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 23:42:41 -0700] rev 22494
revset: document the choice made in __generatorset.__iter__ The method code looks a bit ugly but has good reasons to. We document them to prevent naive refactoring in the future.
Sun, 21 Sep 2014 10:31:34 -0500 help: mention mode in hg log --removed help (issue4381) stable
Matt Mackall <mpm@selenic.com> [Sun, 21 Sep 2014 10:31:34 -0500] rev 22493
help: mention mode in hg log --removed help (issue4381)
Sun, 21 Sep 2014 10:07:06 -0500 commit: catch changed exec bit on files from p1 (issue4382) stable
Matt Mackall <mpm@selenic.com> [Sun, 21 Sep 2014 10:07:06 -0500] rev 22492
commit: catch changed exec bit on files from p1 (issue4382)
Sat, 30 Aug 2014 02:25:23 +0200 revert: add a `drop` action
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 30 Aug 2014 02:25:23 +0200] rev 22491
revert: add a `drop` action This prevents the need for a try except in the `_performrevert` code.
Sat, 30 Aug 2014 02:23:25 +0200 revert: explicitly track added but deleted file
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 30 Aug 2014 02:23:25 +0200] rev 22490
revert: explicitly track added but deleted file Added + deleted file are files that need to be untracked from the dirstate but that are already missing on disk. The current `_performrevert` code is handling that with exception catching. We will be able to do better with a dedicated set.
Mon, 01 Sep 2014 12:36:48 +0200 revert: have an explicit action for "forget"
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 01 Sep 2014 12:36:48 +0200] rev 22489
revert: have an explicit action for "forget" The distinction between "remove" and "forget" used to be in special logic checking for the state of the file in the dirstate. Now that we have dedicated filtering, we can stop relying on this logic and have two distinct actions.
Sat, 30 Aug 2014 18:20:29 +0200 revert: split between newly added file and file added in other changeset
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 30 Aug 2014 18:20:29 +0200] rev 22488
revert: split between newly added file and file added in other changeset These two kinds of files are handled differently. One is deleted and the other is just forgotten (the file is untracked but left in place). The distinction is done in the `_performrevert` code itself and we would like to get ride of this.
Tue, 16 Sep 2014 22:55:49 -0700 revset: stop using a baseset instead of a plain list in _revsbetween
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 22:55:49 -0700] rev 22487
revset: stop using a baseset instead of a plain list in _revsbetween The function internal code needs a list. Lets use a list.
Fri, 19 Sep 2014 07:23:10 +0530 run-tests: added 'cuser', 'csys' time info in report.json file
anuraggoel <anurag.dsps@gmail.com> [Fri, 19 Sep 2014 07:23:10 +0530] rev 22486
run-tests: added 'cuser', 'csys' time info in report.json file This patch adds up a 'cuser' and 'csys'(cputime) info in report.json file which generated when --json is enabled while testing. Now the new format of report.json file is as below. testreport ={ "test-success.t": { "csys": "1.041", "cuser": "1.041", "result": "success", "time": "2.041" } "test-failure.t": { "csys": "1.041", "cuser": "1.041", "result": "failure", "time": "4.430" } "test-skip.t": { "csys": "1.041", "cuser": "1.041", "result": "skip", "time": "3.754" } }
Fri, 19 Sep 2014 14:51:58 -0500 import: let --exact 'work' with --no-commit (issue4376)
Matt Mackall <mpm@selenic.com> [Fri, 19 Sep 2014 14:51:58 -0500] rev 22485
import: let --exact 'work' with --no-commit (issue4376)
Tue, 16 Sep 2014 16:03:21 -0700 obsolete: use C code for headrevs calculation
Durham Goode <durham@fb.com> [Tue, 16 Sep 2014 16:03:21 -0700] rev 22484
obsolete: use C code for headrevs calculation Previously, if there were filtered revs the repository could not use the C fast path for computing the head revs in the changelog. This slowed down many operations in large repositories. This adds the ability to filter revs to the C fast path. This speeds up histedit on repositories with filtered revs by 30% (13s to 9s). This could be improved further by sorting the filtered revs and walking the sorted list while we walk the changelog, but even this initial version that just calls __contains__ is still massively faster. The new C api is compatible for both new and old python clients, and the new python client can call both new and old C apis.
Tue, 16 Sep 2014 23:47:34 -0700 revset: simplify orderedlazyset creation in spanset method
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 23:47:34 -0700] rev 22483
revset: simplify orderedlazyset creation in spanset method We can simply use the `self.isascending` value instead of more complex if/else clause. This get the code simpler. Benchmarks show no performances harmed in the process.
Tue, 16 Sep 2014 23:37:03 -0700 revset: use spanset.isdescending in multiple simple places
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 23:37:03 -0700] rev 22482
revset: use spanset.isdescending in multiple simple places We call the method directly instead of duplicating checks. Benchmarks show no performances harmed in the process.
Tue, 16 Sep 2014 23:34:18 -0700 revset: wider definition of ascending and descending for spanset
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Sep 2014 23:34:18 -0700] rev 22481
revset: wider definition of ascending and descending for spanset Before this patches, empty spanset were seen as neither ascending nor descending. This is mathematically wrong and create some edges case. We put `isascending` and `isdescending` back on track so we can use them to simplify some of the spanset code. Benchmarks show no performances harmed in the process.
Wed, 17 Sep 2014 23:21:20 +0900 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 23:21:20 +0900] rev 22480
annotate: port to generic templater enabled by hidden -T option If the selected formatter is other than plainformatter, raw data are passed to the formatter. In this case, it isn't necessary (and not possible) to calculate column widths. Field names are substituted to be the same as "log" command. There are a few limitations: - "binary file" message is not included in formatted output. - no data structure for multiple files. all lines are packed to single list.
Tue, 16 Sep 2014 23:40:24 +0900 annotate: split functions to get data without applying text formatting
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Sep 2014 23:40:24 +0900] rev 22479
annotate: split functions to get data without applying text formatting This prepares for porting to generic templater API, where raw data should be passed to the formatter. makefunc() is necessary to build closure in list comprehension.
Fri, 29 Aug 2014 06:19:32 +0200 annotate: remove unused variable in calculation of column widths
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 06:19:32 +0200] rev 22478
annotate: remove unused variable in calculation of column widths
Fri, 29 Aug 2014 05:36:52 +0200 annotate: build format string separately from annotation data
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 05:36:52 +0200] rev 22477
annotate: build format string separately from annotation data This prepares for porting to generic templater API. Note that we cannot use '%*s' to pad white spaces because it doesn't take into account character widths, as described in 4f5a6df2af92.
Wed, 17 Sep 2014 22:21:01 +0900 formatter: convert float value to json
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 22:21:01 +0900] rev 22476
formatter: convert float value to json It will be used to encode ctx.date().
Wed, 17 Sep 2014 21:30:22 +0900 formatter: have jsonformatter accept tuple as value
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 21:30:22 +0900] rev 22475
formatter: have jsonformatter accept tuple as value This is necessary for "annotate" to encode ctx.date() in the same manner as jsonchangeset printer. It doesn't support list object because keeping mutable object in _item could be a source of hidden bugs. Also, I can't think of the use case.
Wed, 17 Sep 2014 21:15:43 +0900 formatter: extract function that encode values to json string
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 21:15:43 +0900] rev 22474
formatter: extract function that encode values to json string This is the stub for tuple support, which will be used to encode ctx.date() in the same manner as jsonchangeset printer.
Fri, 12 Sep 2014 21:38:52 -0400 contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict
Mike Edgar <adgar@google.com> [Fri, 12 Sep 2014 21:38:52 -0400] rev 22473
contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict
Fri, 12 Sep 2014 17:43:37 -0400 contrib/synthrepo: only generate 2 parents if model contains merges
Mike Edgar <adgar@google.com> [Fri, 12 Sep 2014 17:43:37 -0400] rev 22472
contrib/synthrepo: only generate 2 parents if model contains merges If `hg analyze` is run on a revision set which contains no merges, then `hg synthesize` will raise IndexError trying to select from p2distance, which will be empty.
Fri, 12 Sep 2014 12:28:30 -0700 convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 12:28:30 -0700] rev 22471
convert: add support to find git copies from all files in the working copy I couldn't think of a better name for this option, so I stole the Git one in the hope that anyone converting a Git repo knows what it means.
Fri, 12 Sep 2014 11:23:26 -0700 convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 11:23:26 -0700] rev 22470
convert: add support to detect git renames and copies Git is fairly unique among VCSes in that it doesn't record copies and renames, instead choosing to detect them on the fly. Since Mercurial expects copies and renames to be recorded, it can be valuable to preserve this history while converting a Git repository to Mercurial. This patch adds a new convert option, called 'convert.git.similarity', which determines how similar files must be to be treated as renames or copies.
Thu, 11 Sep 2014 23:57:49 -0700 convert: for git, factor out code to add entries to a separate function
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:57:49 -0700] rev 22469
convert: for git, factor out code to add entries to a separate function We're going to call this for multiple files in one iteration in upcoming patches.
Thu, 11 Sep 2014 23:37:47 -0700 convert: for git's getchanges, always split entry line into components
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:37:47 -0700] rev 22468
convert: for git's getchanges, always split entry line into components We always need to know whether the entry is a rename or copy, so split it up unconditionally.
Thu, 11 Sep 2014 23:35:19 -0700 convert: for git's getchanges, use explicit index for iteration
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:35:19 -0700] rev 22467
convert: for git's getchanges, use explicit index for iteration Upcoming patches will add support for copies and renames, for which we'll need to access multiple lines of the difftree output at once.
Fri, 12 Sep 2014 10:17:56 -0700 convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 10:17:56 -0700] rev 22466
convert: add initial docs for git sources Upcoming patches will add config options for git sources. This patch adds a place to document them.
Sun, 24 Aug 2014 17:27:28 -0400 color: document that changeset phases have labels
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:27:28 -0400] rev 22465
color: document that changeset phases have labels It's very useful to be able to colourise csets according to their phases. There was no indication anywhere in the docs that this is possible. We use e.g. `changeset.secret = ` instead of `changeset.secret ='none'`, because otherwise this is a BC: it would nullify the effects given to log.changeset label that usually surrounds the changeset.{phase} labels. Specifying the label without any effect instead of 'none' is a true no-op change and purely documentation.
Fri, 19 Sep 2014 12:51:15 -0500 color: change the debug output format
Matt Mackall <mpm@selenic.com> [Fri, 19 Sep 2014 12:51:15 -0500] rev 22464
color: change the debug output format Before, the format was label(labeled text) # single label [label1 label2](labeled text) # multiple Now, it's [labels|labeled text] ..which should make things a bit more clear.
Sun, 24 Aug 2014 17:40:27 -0400 color: enable debug option to show labels
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:40:27 -0400] rev 22463
color: enable debug option to show labels This is a debug option for showing labels. This can be helpful for knowing which labels are available for colouring or to see the output when defining your own templates. A couple of tests are included.
Sun, 24 Aug 2014 17:35:36 -0400 color: document that labels are used for colorizing text
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:35:36 -0400] rev 22462
color: document that labels are used for colorizing text It is a deeply hidden secret that it's possible to colorise so many things with so many different labels. This is an attempt to document this. The text is a bit long, but it seems as short as can be while documenting everything. Perhaps it should be hidden under a --verbose option.
Wed, 27 Aug 2014 16:39:44 +0200 contrib: add OS X p4merge to mergetools.hgrc
Mads Kiilerich <madski@unity3d.com> [Wed, 27 Aug 2014 16:39:44 +0200] rev 22461
contrib: add OS X p4merge to mergetools.hgrc
Wed, 20 Aug 2014 15:15:50 -0400 patch: enable diff.tab markup for the color extension
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 20 Aug 2014 15:15:50 -0400] rev 22460
patch: enable diff.tab markup for the color extension The following patch splits up changed lines along tabs (using re.findall), and gives them a "diff.tab" label. This can be used by the color extension for colorising tabs, like it does right now with trailing whitespace. I also provide corresponding tests.
Wed, 17 Sep 2014 13:08:03 -0700 dirstate: copyedit exception for no beginparentchange call
Siddharth Agarwal <sid0@fb.com> [Wed, 17 Sep 2014 13:08:03 -0700] rev 22459
dirstate: copyedit exception for no beginparentchange call
Sun, 07 Sep 2014 11:33:22 -0700 revsetbenchmarks: add an additional roots() benchmark
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 07 Sep 2014 11:33:22 -0700] rev 22458
revsetbenchmarks: add an additional roots() benchmark The existing roots(x - y) revset only considered the most recent 100 revisions. This was a good start. But expanding it to the full history of the repository can dramatically increase execution time and thus constitutes a useful benchmark.
Tue, 16 Sep 2014 14:49:56 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 16 Sep 2014 14:49:56 -0500] rev 22457
merge with stable
Fri, 12 Sep 2014 02:29:19 +0900 mq: examine "pushable" of already applied patch correctly stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22456
mq: examine "pushable" of already applied patch correctly Before this patch, "hg qselect" with --pop/--reapply may pop patches unexpectedly, even when all of patches applied before "qselect" are still pushable. Strictly speaking about the condition of this issue: - before "qselect" - there are N applied patches - the index of the guarded patch X in the series is less than N - after "qselect" - X is still guarded, and - all of applied patched are still pushable In the case above, "hg qselect" should keep current status, but it actually tries to pop patches because of X. The index in "the series" should be used to examine "pushable" of a patch by "mq.pushablek()", but the index in "applied patches" is used, and this may cause unexpected examination of guarded patch. To examine "pushable" of already applied patch correctly, this patch uses "mq.applied[i].name": "pushable" is the function introduced by the previous patch, and it returns "mq.pushable(mq.applied[i].name)[0]".
Fri, 12 Sep 2014 02:29:19 +0900 mq: pop correct patches when changing pushable-ness of already applied ones stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22455
mq: pop correct patches when changing pushable-ness of already applied ones Before this patch, "hg qselect" with --pop/--reapply may pop incorrect patches, because the index in "applied patches" is used to pop patches by "mq.pop()", even though the index in "the series" should be used. For example, when the already applied patch becomes guarded and it follows the already guarded (= not yet applied) one, "hg qselect" is aborted, because it tries to pop to guarded one. This patch uses "mq.applied[i - 1].name" to pop to the patch, of which the index in the "applied ones" is "i - 1".
Fri, 12 Sep 2014 02:29:19 +0900 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22454
mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety Before this patch, "hg qselect --reapply" is aborted when "--verbose" is specified, because "mq.appliedname()" returns "INDEX PATCHNAME" instead of "PATCHNAME" in such case and "mq.push" can't accept the former as the name of patch. This patch uses "mq.applied[i].name" instead of "mq.appliedname(i)" as the name of the patch to be pushed for safety. Now, there is no code path using "mq.appliedname()", and it should be removed to prevent developers from using it in the wrong way like this issue.
Fri, 12 Sep 2014 02:29:19 +0900 mq: report correct numbers for changing "number of guarded, applied patches" stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22453
mq: report correct numbers for changing "number of guarded, applied patches" Before this patch, "hg qselect" may report incorrect numbers for "number of guarded, applied patches has changed", because it examines "pushable" of patches by the index not in "the series" but in "applied patches", even though "mq.pushable()" expects the former. To report correct numbers for changing "number of guarded, applied patches", this patch uses the name of applied patch to examine pushable-ness of it. This patch also changes the result of existing "hg qselect" tests, because they doesn't change pushable-ness of already applied patches. This patch assumes that "hg qselect" focuses on changing pushable-ness only of already applied patches, because: - the report message uses not "previous" (in the series) but "applied" - the logic to pop patches for --pop/--reapply examines pushable-ness only of already applied ones (in fact, there are some incorrect code paths)
Fri, 29 Aug 2014 05:09:59 +0200 annotate: remove redundant check for empty list of annotation data
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 05:09:59 +0200] rev 22452
annotate: remove redundant check for empty list of annotation data It isn't necessary because zip(*pieces) returns [] if pieces are empty, and pieces are empty only if lines are empty.
(0) -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip