Tue, 06 Jan 2015 20:14:52 -0800 hgweb: extract changelist entry generation into own function
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 06 Jan 2015 20:14:52 -0800] rev 23745
hgweb: extract changelist entry generation into own function I want to supplement changelist entries (used by shortlog and changelog endpoints) with custom metadata from an extension. i.e. I have extra per-changeset metadata that I wish to make available to templates so it can be rendered on hgweb. To facilitate this, I've extracted the logic for creating a changeset data structure into its own function, where it can be wrapped by extensions. Ideally, hgweb would use the same templater as the command line and have full access to templatekw.keywords. But that's a lot of work. This patch gets us some of the benefit without all the work. Many other hgweb commands could benefit from similar refactorings. I'm going to wait to see how this patch is received before I go crazy on extracting inline functions.
Tue, 06 Jan 2015 15:29:02 -0800 templates: use CSS classes for diff styling
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 06 Jan 2015 15:29:02 -0800] rev 23744
templates: use CSS classes for diff styling Use of inline style for diff styling led to significant browser memory usage on large diffs. Moving the styling into CSS classes corrects this. This patch is based on work from https://bugzilla.mozilla.org/show_bug.cgi?id=766952 and https://hg.mozilla.org/hgcustom/version-control-tools/rev/2c355a580af6
Tue, 06 Jan 2015 15:21:48 -0800 templates: remove unnecessary <span>
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 06 Jan 2015 15:21:48 -0800] rev 23743
templates: remove unnecessary <span> The <span> on diffline was useless. It was only making browsers work harder. Remove it.
Tue, 06 Jan 2015 23:46:18 +0900 revset: introduce new operator "##" to concatenate strings/symbols at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 06 Jan 2015 23:46:18 +0900] rev 23742
revset: introduce new operator "##" to concatenate strings/symbols at runtime Before this patch, there is no way to concatenate strings at runtime. For example, to search for the issue ID "1234" in descriptions against all of "issue 1234", "issue:1234", issue1234" and "bug(1234)" patterns, the revset below should be written fully from scratch for each issue ID. grep(r"\bissue[ :]?1234\b|\bbug\(1234\)") This patch introduces new infix operator "##" to concatenate strings/symbols at runtime. Operator symbol "##" comes from the same one of C pre-processor. This concatenation allows parametrizing a part of strings in revset queries. In the case of example above, the definition of the revset alias using operator "##" below can search issue ID "1234" in complicated patterns by "issue(1234)" simply: issue($1) = grep(r"\bissue[ :]?" ## $1 ## r"\b|\bbug\(" ## $1 ## r"\)") "##" operator does: - concatenate not only strings but also symbols into the string Exact distinction between strings and symbols seems not to be convenience, because it is tiresome for users (and "revset.getstring" treats both similarly) For example of revset alias "issue()", "issue(1234)" is easier than "issue('1234')". - have higher priority than any other prefix, infix and postfix operators (like as "##" of C pre-processor) This patch (re-)assigns the priority 20 to "##", and 21 to "(", because priority 19 is already assigned to "-" as prefix "negate".
Fri, 28 Nov 2014 19:50:52 -0500 largefiles: pass a matcher instead of a raw file list to removelargefiles()
Matt Harbison <matt_harbison@yahoo.com> [Fri, 28 Nov 2014 19:50:52 -0500] rev 23741
largefiles: pass a matcher instead of a raw file list to removelargefiles() This is consistent with addlargefiles(), and will make it easier to get the paths that are printed correct when recursing into subrepos or invoking from outside the repository. It also now restricts the path that the addremove is performed on if a path is given, as is done with normal files. The repo.status() call needs to exclude clean files when performing an addremove, because the addremove override method calling this used to pass the list of files to delete, which caused the matcher to only consider those files in building the status list. Now the matcher is restricted only to the extent that the caller requested- usually directories if at all. There's no reason for addremove to care about clean files anyway- we don't want them deleted.
Sat, 03 Jan 2015 17:50:21 +0800 hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904)
Anton Shestakov <engored@ya.ru> [Sat, 03 Jan 2015 17:50:21 +0800] rev 23740
hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904) This adds UI portion of the feature that has resided in mercurial since 2012. Back then the interface was added together with the code, but was shortly backed out because it was deemed "not ready". Code, however, stayed. For the original feature and its implementation, see issue2810 and d605a82cf189. In short, the backed-out interface had two outstanding issues: 1. it was introducing an entirely new term (baseline) and 2. it was present on every changeset's page, even for changesets with 1 parent (or no parents), which didn't make sense This patch implements a hopefully better interface because: 1. it uses the usual terms (diff) and 2. it only shows up when there actually are 2 parents.
Sun, 21 Dec 2014 14:34:07 -0800 namespaces: remove templatename method on the namespaces object
Sean Farley <sean.michael.farley@gmail.com> [Sun, 21 Dec 2014 14:34:07 -0800] rev 23739
namespaces: remove templatename method on the namespaces object Now that there is an object for each individual namespace, we use the templatename property on that object instead of the method on the collection of namespaces.
Sun, 21 Dec 2014 14:04:20 -0800 namespaces: remove names method on the namespaces object
Sean Farley <sean.michael.farley@gmail.com> [Sun, 21 Dec 2014 14:04:20 -0800] rev 23738
namespaces: remove names method on the namespaces object Now that there is an object for each individual namespace, we use that instead of the method on the collection of namespaces.
Sun, 21 Dec 2014 14:01:52 -0800 templatekw: update namespace calls
Sean Farley <sean.michael.farley@gmail.com> [Sun, 21 Dec 2014 14:01:52 -0800] rev 23737
templatekw: update namespace calls Previous patches changed the namespace api to be more of an object-oriented approach. This patch updates the template function to use said api changes.
Sun, 21 Dec 2014 13:56:32 -0800 namespaces: add __getitem__ property
Sean Farley <sean.michael.farley@gmail.com> [Sun, 21 Dec 2014 13:56:32 -0800] rev 23736
namespaces: add __getitem__ property Since the namespaces object uses an underlying (sorted) dictionary to store the namespaces, it makes sense to expose this to naturally gain access to those namespaces.
Tue, 06 Jan 2015 18:18:28 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 06 Jan 2015 18:18:28 -0600] rev 23735
merge with stable
Mon, 05 Jan 2015 22:18:55 -0800 cmdutil.jsonchangeset: properly compute added and removed files stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 05 Jan 2015 22:18:55 -0800] rev 23734
cmdutil.jsonchangeset: properly compute added and removed files jsonchangeset._show() was computing the reverse status of the current changeset. As a result, added files were showing up as removed and removed files were showing up as adds. There were existing tests for this code and they were flat out wrong.
Wed, 31 Dec 2014 18:18:56 -0500 largefiles: convert addlargefiles() to vfs
Matt Harbison <matt_harbison@yahoo.com> [Wed, 31 Dec 2014 18:18:56 -0500] rev 23733
largefiles: convert addlargefiles() to vfs
Sun, 04 Jan 2015 01:29:07 +0100 rebase: clarify comment about merge ancestor when rebasing merges
Mads Kiilerich <madski@unity3d.com> [Sun, 04 Jan 2015 01:29:07 +0100] rev 23732
rebase: clarify comment about merge ancestor when rebasing merges The code for picking a merge ancestor when rebasing merges had a long and incorrect comment. The comment would perhaps have been fine as commit message but does not make the code more readable or maintainable and is a bad substitute for correct and readable code. The correct essense of the comment is quite trivial: a merge of an ancestor of the rebase destination and an 'outside' revision can be rebased as if it was a linear change, using 'destination ancestor parent' as base and pretty much ignoring the 'outside' revision. The code path where the comment is placed is however also used for other kinds of merge rebases. The comment is thus not really correct and not helpful. I think it would be better to drop the comment and rewrite the code.
Mon, 05 Jan 2015 17:12:04 -0800 status: don't list files as both clean and deleted
Martin von Zweigbergk <martinvonz@google.com> [Mon, 05 Jan 2015 17:12:04 -0800] rev 23731
status: don't list files as both clean and deleted Tracked files that are deleted should always be reported as such, no matter what their state was in earlier revisions. This is encoded in in two conditions in the loop in basectx._buildstatus() for modified and added files, but the check is missing for clean files. We should check for clean files too, but instead of adding the check in a third place, move it earlier and skip most of the loop body for deleted files.
Mon, 05 Jan 2015 16:52:12 -0800 status: don't list files as both removed and deleted
Martin von Zweigbergk <martinvonz@google.com> [Mon, 05 Jan 2015 16:52:12 -0800] rev 23730
status: don't list files as both removed and deleted When calculating status involving the working copy and a revision other than the parent of the working copy, the files that are not in the working context manifest ('mf2' in the basectx._buildstatus()) will be reported as removed (note that deleted files _are_ in the working context manifest). However, if the file is reported as deleted in the dirstate, it will get that status too (as shown by failing tests). Fix by removing deleted files from the 'removed' list after the main loop in _buildstatus().
(0) -10000 -3000 -1000 -300 -100 -16 +16 +100 +300 +1000 +3000 +10000 tip