Mathias De Maré <mathias.demare@gmail.com> [Mon, 09 Mar 2015 22:14:09 +0100] rev 24256
subrepo: add status support for ignored and clean files in git subrepos
Mike Edgar <adgar@google.com> [Wed, 14 Jan 2015 15:16:08 -0500] rev 24255
revlog: addgroup checks if incoming deltas add censored revs, sets flag bit
A censored revision stored in a revlog should have the censored revlog index
flag bit set. This implies we must know if a revision is censored before we
add it to the revlog. When adding revisions from exchanged deltas, we would
prefer to determine this flag without decoding every single full text.
This change introduces a heuristic based on assumptions around the Mercurial
delta format and filelog metadata. Since deltas which produce a censored
revision must be full-replacement deltas, we can read the delta's first bytes
to check the filelog metadata. Since "censored" is the alphabetically first
filelog metadata key, censored filelog revisions have a well-known prefix we
can look for.
For more on the design and background of the censorship feature, see:
http://mercurial.selenic.com/wiki/CensorPlan
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:43:47 -0800] rev 24254
patch.internalpatch: accept a prefix parameter
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:27:41 -0800] rev 24253
patch.patchbackend: accept a prefix parameter
Mike Edgar <adgar@google.com> [Tue, 10 Mar 2015 16:25:10 -0400] rev 24252
repair: define explicit local variable, don't reuse a comprehension variable
The node ID used in strip bundle names is currently taken as the last
iterated value in a list comprehension found much earlier in the function.
This change makes the node selection more explicit at the cost of redundancy.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Feb 2015 12:49:30 -0800] rev 24251
commands.paths: use ui.paths to show paths
We now have an API for representing a collection of paths. Use it.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Feb 2015 12:42:10 -0800] rev 24250
ui: represent paths as classes
Many have long wanted for paths to have expanded functionality and
flexibility.
In order to make that transition possible, we need to start
representing paths as something more than simple strings.
This patch introduces two classes:
1) "path" for representing a single path instance
2) "paths" for representing a collection of "paths"
Since we don't like patches that introduce new code without any
consumers, we convert ui.expandpath() to use the new APIs internally.
Upcoming patches will start exposing "path" instances to consumers
that currently interface with string paths.
The new "paths" attribute of ui is populated from config data the first
time it is accessed. Since it isn't updated when the configs are
modified, this could lead to some inaccurate caching behavior. It
shouldn't be an issue, as paths information is typically not accessed
until command dispatch, which occurs after the repository config
and extensions have been loaded. Time will tell if we need to refresh
paths information when the underlying config changes.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 10 Mar 2015 13:40:14 -0400] rev 24249
color: omit terminfo/win32 warning if non-interactive (
issue4543)
It's pretty annoying to be getting this warning when already the
colour extension has no hope of working. If there isn't a human on the
other end to to see the colours, there probably isn't a human either
who cares about this warning. More likely, some script somewhere is
gonna get confused with the warning output.
Of course, if we still want to see the warning for some reason, we can
always set --config ui.interactive=True.
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Feb 2015 20:54:05 +0900] rev 24248
incoming: hide help about use of --bundle option by default
Pulling from incoming bundle can cause trouble such as missing phase movement,
bookmarks and largefiles transfer. Average user won't need this option.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:24:49 -0800] rev 24247
patch.applydiff: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:22:14 -0800] rev 24246
patch._applydiff: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
We normalize the prefix here because this is the main driver -- all code to
apply patches is expected to go through here.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:19:26 -0800] rev 24245
patch.makepatchmeta: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:17:24 -0800] rev 24244
patch.pathtransform: add a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
The prefix is applied after path components are stripped.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 21:48:40 -0800] rev 24243
patch.pathtransform: add doctests
In upcoming patches we're going to make this function more complex, so add some
unit tests for it.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 21:12:30 -0800] rev 24242
patch: rename pathstrip to pathtransform
In upcoming patches we'll not just strip path components but also add new ones.
Yuya Nishihara <yuya@tcha.org> [Wed, 18 Feb 2015 23:17:52 +0900] rev 24241
templatekw: forward _hybrid.get to raw values so that get(extras, key) works
ef78450c8df6 implies that the primary goal is to allow "{get(extras, key)}",
but it didn't work.
I'm not sure if _hybrid should forward all unknown attributes to values, so
only "get" is forwarded for now.
Yuya Nishihara <yuya@tcha.org> [Wed, 18 Feb 2015 23:01:33 +0900] rev 24240
templater: implement _hybrid.__contains__ so that ifcontains can accept dict
d8fb835376d1 is fine for "{revset()}", but "i.values()[0]" does not work if
each item has more than one values such as "{bookmarks}".
This fixes the problem by using list.__contains__ or dict.__contains__
appropriately.
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Mar 2015 14:46:42 +0900] rev 24239
templatekw: keep raw list or dict in _hybrid object
This will allow us to handle bookmarks, extras and copies properly in
"ifcontains()" and "get()".
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Mar 2015 14:38:50 +0900] rev 24238
templatekw: give name to lambda that constructs variables map of templater
The constructed list is useless for "ifcontains()" and "get()". Instead,
makemap() and raw dict will be passed to _hybrid object.
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Mar 2015 14:17:35 +0900] rev 24237
templatekw: convert list of key/value pairs to sortdict
These sortdict objects will be passed to _hybrid later, which will allow
us to handle them by "ifcontains()" and "get()" as expected.
Yuya Nishihara <yuya@tcha.org> [Wed, 18 Feb 2015 22:53:53 +0900] rev 24236
sortdict: have update() accept either dict or iterable of key/value pairs
Future patches will make the templater store a sorted dict in the _hybrid object.
sortdict should be constructed from a sorted list.
Laurent Charignon <lcharignon@fb.com> [Fri, 06 Mar 2015 15:57:43 -0800] rev 24235
record: allow editing new files (
issue4304)
While using the record extension to select changes, the user couldn't see the
content of newly added files and had to select/reject them based on filename.
The test is changed accordingly in two places.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 05 Mar 2015 14:42:25 -0800] rev 24234
localrepo: back out changeset
b08af8f0ac01
Running the tags function filtered will lead to different results with different
filter levels. This seems too dangerous to be done blindly as
b08af8f0ac01 did.
Tristan Seligmann <mithrandi@debian.org> [Mon, 09 Mar 2015 12:32:29 -0400] rev 24233
test-shelve: be more lenient about whitespace (
issue4124)
When running on a slower systems (eg. MIPS buildd), the age of the
shelf can be 10 seconds or more, resulting in the output alignment
changing and thus a test failure. This patch makes the spacing be
matched more leniently.
Anton Shestakov <engored@ya.ru> [Mon, 09 Mar 2015 14:32:17 +0800] rev 24232
histedit: use better meta-variable names than VALUE in help text
Before this change hg help histedit would use the default variable label:
--commands VALUE
...
-r --rev VALUE [+]
With this change the text will be in the usual help text style and a bit more
explanatory:
--commands FILE
...
-r --rev REV [+]
Anton Shestakov <engored@ya.ru> [Mon, 09 Mar 2015 14:10:42 +0800] rev 24231
histedit: tweak --commands help text
The rest of help messages for command arguments are simple phrases without any
ending punctuation, so having this text be a complete sentence didn't really
fit.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 25 Jan 2015 02:45:49 -0500] rev 24230
largefiles: report the source of copied/moved largefiles in status -C
Previously, the source was silently skipped because the largefile was in the
list of changed files, but the standin was in the copies dictionary. The source
is only displayed if the changed file is a key in the copies dictionary.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Mar 2015 00:04:03 -0500] rev 24229
test-commit-amend: add globs for Windows
Augie Fackler <augie@google.com> [Fri, 30 Jan 2015 21:30:40 -0800] rev 24228
lazymanifest: use a binary search to do an insertion
This makes insertions log(n) plus some memmove() overhead, rather than
doing an append followed by an n*log(n) sort. There's probably a lot
of performance to be gained by adding a batch-add method, which could
be smarter about the memmove()s performed.
Includes a couple of extra tests that should help prevent bugs.
Thanks to Martin for some significant pre-mail cleanup of this change.
Augie Fackler <augie@google.com> [Mon, 17 Nov 2014 00:00:25 -0500] rev 24227
context: don't sort manifest entries
The manifest iterator is now pre-sorted, so we can skip this check.
Augie Fackler <augie@google.com> [Fri, 06 Mar 2015 21:29:47 -0500] rev 24226
manifest: use custom C implementation of lazymanifest
This version is actually lazy, unlike the pure-python version. The
latter could stand to be optimized if anyone actually wants to use it
seriously. I put no work into it.
Before any of my related changes on mozilla-central:
perfmanifest tip
! wall 0.268805 comb 0.260000 user 0.260000 sys 0.000000 (best of 37)
perftags
! result: 162
! wall 0.007099 comb 0.000000 user 0.000000 sys 0.000000 (best of 401)
perfstatus
! wall 0.415680 comb 0.420000 user 0.260000 sys 0.160000 (best of 24)
hgperf export tip
! wall 0.142118 comb 0.140000 user 0.140000 sys 0.000000 (best of 67)
after all of my changes on mozilla-central:
./hg:
perfmanifest tip
! wall 0.232640 comb 0.230000 user 0.220000 sys 0.010000 (best of 43)
perftags
! result: 162
! wall 0.007057 comb 0.010000 user 0.000000 sys 0.010000 (best of 395)
perfstatus
! wall 0.415503 comb 0.420000 user 0.280000 sys 0.140000 (best of 24)
hgperf export tip
! wall 0.025096 comb 0.030000 user 0.030000 sys 0.000000 (best of 102)
so it's no real change in performance on perf{manifest,tags,status},
but is a huge win on 'hgperf export tip'.
There's a little performance work that could still be done here:
fastdelta() could be done significantly more intelligently by using
the internal state of the lazymanifest type in C, but that seems like
good future work.
Augie Fackler <augie@google.com> [Sat, 07 Mar 2015 12:04:39 -0500] rev 24225
manifest: split manifestdict into high-level and low-level logic
The low-level logic type (_lazymanifest) matches the behavior of the C
implementation introduced in
a5f1bccd. A future patch will use that
when available.
Augie Fackler <augie@google.com> [Sat, 07 Mar 2015 11:43:12 -0500] rev 24224
manifest: do parsing inside manifestdict contstructor
This shape to the code will make using a C implementation of the
manifest storage easier.
Augie Fackler <augie@google.com> [Sat, 07 Mar 2015 11:42:05 -0500] rev 24223
manifest: move parsing functions up in file
These functions are about to change signature and be hidden inside the
manifestdict constructor. Doing the code motion now as an isolated
change to make things easier to review.
Augie Fackler <augie@google.com> [Tue, 10 Feb 2015 15:59:12 -0500] rev 24222
dispatch: offer suggestions of similar-named commands
When suggestions are available, we show those suggestions instead of
showing some help output.
Augie Fackler <augie@google.com> [Mon, 26 Jan 2015 15:43:13 -0500] rev 24221
dispatch: offer near-edit-distance suggestions for {file,rev}set functions
Before this patch, when I have a brain fart and type `hg log -r
'add(foo)'`, hg exits and just says add isn't a function, leading me
to the help page for revset to figure out how to spell the
function. With this patch, it suggests 'adds' as a function I might
have meant.
Augie Fackler <augie@google.com> [Mon, 26 Jan 2015 15:52:46 -0500] rev 24220
test-revset: add tests for missing function output
An upcoming change will slightly alter behavior here. Adding the test
now so the output change stands out in the later changeset.
Augie Fackler <augie@google.com> [Mon, 26 Jan 2015 14:32:30 -0500] rev 24219
revset: use UnknownIdentifier where appropriate
Augie Fackler <augie@google.com> [Mon, 26 Jan 2015 14:31:48 -0500] rev 24218
fileset: use UnknownIdentifier where appropriate
Augie Fackler <augie@google.com> [Mon, 26 Jan 2015 14:31:01 -0500] rev 24217
error: add a new UnknownIdentifier error type
This will be used by the revset and fileset code to communicate more
specific errors to higher levels so that we might be able to offer
suggestions about what function might have been similar.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Mon, 24 Nov 2014 16:42:49 -0500] rev 24216
log: display closing-branch nodes as "_" (BC)
In plain `hg log` there is no indication that a commit closes a
branch. You can use hg log --debug, but this is too verbose. A simple
idea copied from thg and other graphical viewers is to display the
node for a closing-branch commit as a horizontal line.
I think this technically is a BC if we consider the graphlog to be
part of the stdout API, but I really can't imagine who the hell is
parsing the graphlog to determine information about commits.
Matt Mackall <mpm@selenic.com> [Fri, 06 Mar 2015 17:00:42 -0600] rev 24215
manifest: move pure parsing code out of pure
This lets us transition more smoothly.
Augie Fackler <augie@google.com> [Tue, 13 Jan 2015 14:31:38 -0800] rev 24214
manifest.c: new extension code to lazily parse manifests
This lets us iterate manifests in order, but do a _lot_ less work in
the common case when we only care about a few manifest entries.
Many thanks to Mike Edgar for reviewing this in advance of it going
out to the list, which caught many things I missed.
This version of the patch includes C89 fixes from Sean Farley and
many correctness/efficiency cleanups from Martin von
Zweigbergk. Thanks to both!
Durham Goode <durham@fb.com> [Thu, 05 Mar 2015 22:16:28 -0800] rev 24213
workingctx: use normal dirs() instead of dirstate.dirs()
The workingctx class was using dirstate.dirs() as it's implementation. The
sparse extension maintains a pruned down version of the dirstate, so this
resulted in the workingctx reporting an incorrect listing of directories
during merge calculations (it was detecting directory renames when it
shouldn't have).
The fix is to use the default implementation, which uses workingctx._manifest,
which unions the manifest with the dirstate to produce the correct overall
picture. This also produces more accurate output since it will no longer
return directories that have been entirely deleted in the dirstate.
Tests will be added to the sparse extension to detect regressions for this.
Matt Mackall <mpm@selenic.com> [Thu, 05 Mar 2015 15:52:07 -0600] rev 24212
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 03 Mar 2015 21:31:16 -0500] rev 24211
subrepo: only fetch unknown files from git when explicitly requested
Matt Harbison <matt_harbison@yahoo.com> [Tue, 03 Mar 2015 21:24:16 -0500] rev 24210
subrepo: always return scmutil.status() from gitsubrepo.status()
This was accidentally left out of
c95db3208a33.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 03 Mar 2015 21:17:29 -0500] rev 24209
subrepo: explicitly request clean and unknown files in status for git's add
No behavior changes here since gitsubrepo.status() doesn't currently populate
clean, and ignores whether unknown files were actually requested. But this is
in line with other calls to status, and should avoid future surprises.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 01 Mar 2015 18:35:29 -0500] rev 24208
largefiles: handle logging from outside the repo
It's probably possible to refactor so that the 'if m._cwd' check isn't
necessary, but the False case is the typical case (i.e. run from the root of the
repo), and simpler to read.
An exact path to a largefile from outside the repo was previously ignored.
match.rel('.hglf') will handle figuring out both the correct '../' length to the
standin directory if inside the repo, or path/to/repo from outside, at the cost
of a pconvert() to keep the patterns using '/' on Windows.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 01 Mar 2015 14:21:54 -0500] rev 24207
largefiles: don't prefix standin patterns with '.hglf' when logging
When logging '.hglf/foo', the pattern list was being transformed from
['.hglf/foo'] into ['.hglf/foo', '.hglf/.hglf/foo']. Aside from the
pathological case of somebody getting a directory named '.hglf' created inside
the standing directory, the old code shouldn't have had any bad effects.
(amended by mpm to sort patterns for test stability and not upset check-code)
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Feb 2015 23:42:38 -0500] rev 24206
largefiles: teach log to handle patterns
Adding the standin to the patterns list was (possibly) harmless before, but was
wrong, because the pattern list was already updated above that code. Now that
patterns are handled, it was actually harmful. For example, in this test:
$ hg log -G glob:**another*
the adjusted pattern list would have been:
['glob:**another*', '.hglf/.', 'glob:.hglf/**another*']
which causes every largefile in the root to be matched.
I'm not sure why 'glob:a*' picks up the rename of a -> b commit in test-log.t,
but a simple 'a' doesn't. But it doesn't appear to be caused by the largefiles
extension.
Matt Mackall <mpm@selenic.com> [Thu, 05 Mar 2015 13:21:57 -0600] rev 24205
check-code: allow disabling msys path check
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Jan 2015 23:05:45 +0900] rev 24204
revset: extend fullreposet to make "null" revision magically appears in set
As per fullreposet.__and__, it can omit the range check of rev. Therefore,
"null" revision is accepted automagically.
It seems this can fix many query results involving null symbol. Originally,
the simplest "(null)" query did fail if there were hidden revisions. Tests
are randomly chosen.
fullreposet mimics the behavior of localrepo, where "null" revision is not
listed but contained.
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jan 2015 18:09:25 +0900] rev 24203
revset: duplicate spanset.__contains__ to fullreposet for modification
1d7a2771aa36 says we should avoid function calls in __contains__, so
super(fullreposet, self).__contains__(rev) is not an option.
Actually the super call doubled the benchmark result of trivial query:
revisions:
0)
678f53865c68 (tip when I wrote this patch)
1) rev == node.nullrev or super(fullreposet, self).__contains__(rev)
revset #0: tip:0
0) wall 0.008441 comb 0.010000 user 0.010000 sys 0.000000 (best of 282)
1) wall 0.016152 comb 0.010000 user 0.010000 sys 0.000000 (best of 146)
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jan 2015 14:49:50 +0900] rev 24202
revset: have all() filter out null revision
I'm not sure if "all()" should filter out "null", but "all()" is stated as
'the same as "0:tip"' (except that it doesn't reorder the subset, I think.)
This patch is intended to avoid exposing a fullreposet to graphmod.dagwalker(),
which would result in strange drawing in future version:
|
o changeset: 0:
f8035bb17114
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: add a
caused by:
parents = sorted(set([p.rev() for p in ctx.parents()
if p.rev() in revs]))
We cannot add "and p.rev() != nullrev" here because revs may actually include
"null" revision.
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jan 2015 16:41:36 +0900] rev 24201
revset: drop unnecessary calls of getall() with empty argument
If x is None, getall(repo, subset, x) == subset.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 21:47:07 +0900] rev 24200
graphlog: do not bypass commands.log so that -fr works
Since
8b4b9ee6001a, opts dict can be modified in commands.log() before calling
cmdutil.graphlog().
Mateusz Kwapich <mitrandir@fb.com> [Wed, 21 Jan 2015 14:45:24 -0800] rev 24199
histedit: add a config allowing changing histedit rule line length limit
Since many users are using terminals wider than 80 chars there should be an
option to have longer lines in histedit editor.
Even if the summary line is shorter than 80 chars after adding action line
prefixes (like "pick
7c2fd3b9020c") it doesn't fit there anymore. Setting
it to for example 110 would be a nice option to have.
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Mar 2015 00:14:22 +0900] rev 24198
dirstate: make sure rootdir ends with directory separator (
issue4557)
ntpath.join() of Python 2.7.9 does not work as expected if root is a UNC path
to top of share.
This patch doesn't take care of os.altsep, '/' on Windows, because root should
be normalized by realpath().
Alexander Becher <Alexander.Becher@RuD-Steuerungstechnik.De> [Wed, 04 Mar 2015 17:24:12 +0100] rev 24197
i18n-de: fix a typo in the german translation