Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 17:50:23 -0700] rev 24345
record: minor refactoring of dorecord
It prepares the way for introducing the flag to reverse hunk selection
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:42:55 -0700] rev 24344
record: add tests for the curses recording interface
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:24:48 -0700] rev 24343
record: enable curses recording logic with experimental flag
Laurent Charignon <lcharignon@fb.com> [Fri, 13 Mar 2015 10:51:25 -0700] rev 24342
record: change arguments of curses recording function
This way the arguments are the same for both curses and non-curses versions.
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 17:51:37 -0700] rev 24341
record: change interface of the filtering function
This way filtering functions accept chunks and return chunks
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:15:06 -0400] rev 24340
hgweb: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:18:20 -0400] rev 24339
pvec: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:16:26 -0400] rev 24338
scmutil: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:11:15 -0400] rev 24337
templater: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:08:16 -0400] rev 24336
largefiles: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:05:25 -0400] rev 24335
obsolete: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:02:19 -0400] rev 24334
fileset: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Fri, 13 Mar 2015 20:34:52 -0400] rev 24333
filectx: add a repo accessor
This is similar to
a07314472a80 in motivation. All contexts now have this
method, so the rest of the 'ctx._repo' uses can be converted without worrying
about what type of context it is.
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 13:03:55 -0400] rev 24332
run-tests: ignore ENOENT failures when removing old .err results
When the same test runs in multiple threads and the previous run was a
failure, the threads can race to delete the error output. This fixes
that.
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 12:50:53 -0400] rev 24331
run-tests: stop storing start/stop times in a dict by test name
This resolves the last breakage in run-tests that prevented me from
running a single test many times in several threads in parallel. This
will be useful for testing potential fixes to flaky tests.
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 12:47:16 -0400] rev 24330
run-tests: avoid running the same test instance concurrently
There's a fair amount of mutable state stored on test case
instances. That causes many weird failures if you try to do something
like `run-tests.py -j16 --loop test-help.t`. The quick fix is this
slightly weird test-reloading dance, which ensures that every time a
test is executed it runs on a fresh instance of the TestCase subclass.
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 11:21:53 -0400] rev 24329
run-tests: add --runs-per-test flag
This is useful when you're working with a flaky test and want to run
it (for example) 500 times to see if it'll false-fail. This currently
breaks if you use it with more than one thread, but I'm looking into
that now.
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:41:50 -0400] rev 24328
convert: adjust progress bar for octopus merges (
issue4169)
For merges, we walk the files N-1 times, where N is the number of
parents. This means that for an octopus merge with 3 parents and 2
changed files, we actually fetch 6 files. This corrects the progress
output of the convert command when such commits are encountered.
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:31:52 -0400] rev 24327
test-convert-git: show insane progress bar with octopus merge (
issue4169)
This is done as a separate change from the fix so that it's obvious
what is corrected by the bugfix.
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:36:11 -0700] rev 24326
manifest: have context use self.hasdir()
A couple places in context currently use "x in self._dirs" to check for the
existence of the directory, but this requires that all directories be loaded
into a dict. Calling hasdir() instead puts the work on the the manifest to
check for the existence of a directory in the most efficient manner.
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:32:45 -0700] rev 24325
manifest: add hasdir() to context
This is a convenience method that calls to its manifest's hasdir(). There are
parts of context that check to see if a directory exists, and this method will
let implementations of manifest provide an optimal way to find a particular
directory.
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:25:01 -0700] rev 24324
manifest: add manifestdict.hasdir() method
Allows for alternative implementations of manifestdict to decide if a directory
exists in whatever way is most optimal.
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:23:02 -0700] rev 24323
manifest: have context's dirs() call its manifest's dirs()
This lets the context's dirs() method be agnostic towards any alternate
manifest implementations.
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:19:54 -0700] rev 24322
manifest: add dirs() to manifestdict
Manifests should have a method of accessing its own dirs, not just the
context that references the manifest. This makes it easier for other
optimized versions of manifests to compute their own dirs in the most efficient
way.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 22:34:34 +0900] rev 24321
formatter: convert None to json null
It will be used by "annotate" command to represent the workingctx revision.
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Aug 2014 11:35:31 +0900] rev 24320
localrepo: extend "changeid in repo" to return True for workingctx revision
This is necessary to implement "wc" symbol for workingctx, that will be used
as follows:
$ hg annotate -r wc FILE
In principle, "rev in repo" should be True if "repo[rev]" can return a context
object. But when it was implemented by
ea3acaae25bb, lookup() had a long logic
to map all sorts of changeids to nodes, and "None in repo" did crash because
lookup() could not accept None. So I assume that the case of changeid=None was
not considered.
Now "None in repo" doesn't crash, it should be True for workingctx revision.
Behavior of "changeid in repo":
revision "null" existing rev None (workingctx)
---------- ------ ------------ -----------------
original* True True TypeError
current True True False
this patch True True True
(*original:
ea3acaae25bb)
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:41:45 -0500] rev 24319
merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:32:28 -0500] rev 24318
crecord: fix another underbar
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:25:19 -0500] rev 24317
crecord: fiddle with vertical whitespace
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:23:42 -0500] rev 24316
crecord: fix underbar style for orig_stdout
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:22:37 -0500] rev 24315
crecord: use encoding.ucolwidth
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 12:58:06 -0500] rev 24314
crecord: more import style
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 12:55:21 -0500] rev 24313
crecord: fix some import style
Matt Harbison <matt_harbison@yahoo.com> [Fri, 13 Mar 2015 22:50:40 -0400] rev 24312
manifest.c: ensure realloc_if_full() returns 1 or 0
This fixes an MSVC 2008 warning that I don't see with gcc 4.6.3-2:
warning C4047: 'return' :
'bool' differs in levels of indirection from 'line *'
More importantly, the truncation from pointer to 'unsigned char' would have
returned 0 if self->lines pointed to an address divisible by 0xFF, which causes
find_lines() to return MANIFEST_OOM. I was able to cause this to happen in a
trivial program with the gcc compiler.
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:20:32 -0700] rev 24311
record: change recording function to work with crecord
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:19:11 -0700] rev 24310
record: add crecord's ui logic to core
Code adapted from https://bitbucket.org/edgimar/crecord/src to respect
coding convention an record's interface
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 16:39:38 -0700] rev 24309
record: change interface of dorecord to accept new filters
This makes it easier to add different filtering logic (record /crecord ...)
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 16:18:47 -0700] rev 24308
record: remove duplicated tests
Since the record and commit -i commands are identical we simplify record's test
to just cover the help message and minimal smoke testing.
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 15:54:11 -0700] rev 24307
record: make record use commit -i
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 13 Mar 2015 17:00:06 -0400] rev 24306
style: kill ersatz if-else ternary operators
Although Python supports `X = Y if COND else Z`, this was only
introduced in Python 2.5. Since we have to support Python 2.4, it was
a very common thing to write instead `X = COND and Y or Z`, which is a
bit obscure at a glance. It requires some intricate knowledge of
Python to understand how to parse these one-liners.
We change instead all of these one-liners to 4-liners. This was
executed with the following perlism:
find -name "*.py" -exec perl -pi -e 's,(\s*)([\.\w]+) = \(?(\S+)\s+and\s+(\S*)\)?\s+or\s+(\S*)$,$1if $3:\n$1 $2 = $4\n$1else:\n$1 $2 = $5,' {} \;
I tweaked the following cases from the automatic Perl output:
prev = (parents and parents[0]) or nullid
port = (use_ssl and 443 or 80)
cwd = (pats and repo.getcwd()) or ''
rename = fctx and webutil.renamelink(fctx) or []
ctx = fctx and fctx or ctx
self.base = (mapfile and os.path.dirname(mapfile)) or ''
I also added some newlines wherever they seemd appropriate for readability
There are probably a few ersatz ternary operators still in the code
somewhere, lurking away from the power of a simple regex.
Augie Fackler <raf@durin42.com> [Fri, 13 Mar 2015 14:20:13 -0400] rev 24305
cvsps: use a different tiebreaker to avoid flaky test
After adding some sneaky debug printing[0], I determined that this
test flaked when a CVS commit containing two files starts too close to
the end of a second, thus putting file "a" in one second and "b/c" in
the following second. The secondary sort key meant that these changes
sorted in a different order when the timestamps were different than
they did when they matched. As far as I can tell, CVS walks through
the files in a stable order, so by sorting on the filenames in cvsps
we'll get stable output. It's fine for us to switch from sorting on
the branchpoint as a secondary key because this was already the point
when we didn't care, and we're just trying to break ties in a stable
way. It's unclear to be if having the branchpoint present matters
anymore, but it doesn't really hurt to leave it.
With this change in place, I was able to run test-convert-cvs over 650
times in a row without a failure. test-convert-cvcs-synthetic.t
appears to still be flaky, but I don't think it's *worse* than it was
before - just not better (I observed one flaky failure in 200 runs on
that test).
0: The helpful debug hack ended up being this, in case it's useful to
future flaky test assassins:
--- a/hgext/convert/cvsps.py
+++ b/hgext/convert/cvsps.py
@@ -854,6 +854,8 @@ def debugcvsps(ui, *args, **opts):
ui.write(('Branch: %s\n' % (cs.branch or 'HEAD')))
ui.write(('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1],
','.join(cs.tags) or '(none)')))
+ if cs.comment == 'ci1' and (cs.id == 6) == bool(cs.branchpoints):
+ ui.write('raw timestamp %r\n' % (cs.date,))
if cs.branchpoints:
ui.write(('Branchpoints: %s \n') %
', '.join(sorted(cs.branchpoints)))
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Mar 2015 22:34:27 +0900] rev 24304
templates: fix "log -q" output of default style
It was changed at
0ded0f0b1c04 unintentionally due to name conflicts.
Matt Mackall <mpm@selenic.com> [Fri, 13 Mar 2015 17:55:04 -0500] rev 24303
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:59:52 -0400] rev 24302
subrepo: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:55:35 -0400] rev 24301
files: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:54:53 -0400] rev 24300
context: add a repo accessor
There are 29 instances of 'ctx._repo' in the code, so make the ability
to access more official.
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:49:20 -0400] rev 24299
test-histedit-edit.t: demonstrate qnew fails during a histedit (
issue4366)
This was accidentally fixed by other work, but given that it's been
broken in the past, I'd like to have a test defending us against
regressions in this area, especially as we add more functionality to
histedit.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 18:18:29 -0700] rev 24298
lazymanifest: make __iter__ generate filenames, not 3-tuples
The _lazymanifest type(s) behave very much like a sorted dict with
filenames as keys and (nodeid, flags) as values. It therefore seems
surprising that its __iter__ generates 3-tuples of (path, nodeid,
flags). Let's make it match dict's behavior of generating the keys
instead, and add a new iterentries method for the 3-tuples. With this
change, the "x" in "if x in lm" and "for x in lm" now have the same
type (a filename string).
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 18:53:44 -0700] rev 24297
lazymanifest: fix pure hg iterkeys()
I broke pure hg when I just added iterkeys() to the native version in
2b7ab29627fd. I forgot to make the pure version sorted. Fix it.
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Mar 2015 21:18:59 +0900] rev 24296
hgweb: prevent loading style map from directories other than specified paths
A style name should not contain "/", "\", "." and "..". Otherwise, templates
could be loaded from outside of the specified templates directory by invalid
?style= parameter. hgweb should not allow such requests.
This change means subdir/name is also rejected.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:46:15 -0700] rev 24295
lazymanifest: add iterkeys() method
So we don't have to iteratate over (path, node, flags) tuples only to
throw away the node and flags.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:15:26 -0700] rev 24294
lazymanifest: extract function for iterating to next line
This will soon be reused by keys iterator.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:35:34 -0700] rev 24293
lazymanifest: fail if path or hash strings cannot be created
While generating (path, hash, flags), we fail if flags cannot be
created. We should also fail if path or hash cannot be created.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 08:28:56 -0700] rev 24292
manifest: rewrite find(node, f) in terms of read(node)
Since find() now always works with a full manifest, we can simplify by
calling read() to give us that manifest. That way, we also populate
the manifest cache. However, now that we no longer parse the manifest
text into a Python type (thanks, lazymanifest/Augie), the cost of
parsing (scanning for newlines, really) is small enough that it seems
generally drowned by revlog reading.
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Feb 2015 22:54:13 +0900] rev 24291
ssl: load CA certificates from system's store by default on Python 2.7.9
This will make it easy to manage in-house CA certificates, which are often
used in corporate environment and installed into the Windows' certs store.
Unlike Apple python, the dummycert trick isn't necessary on Python 2.7.9.
The default web.cacerts will be set as follows:
environment web.cacerts behavior
------------- ----------- -----------------------------------------
Apple Python dummycert fall back to system's store
Python 2.7.8 '!' never use CA certs (show warning instead)
Python 2.7.9+ None load CA certs from system's store
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 23:27:04 +0900] rev 24290
ssl: set explicit symbol "!" to web.cacerts to disable SSL verification (BC)
The next patch will enable verification by using the system's CA store if
possible, which means we would have to distinguish None (=use default) from
'' (=--insecure). This smells bug-prone and provides no way to override
web.cacerts to forcibly use the system's store by --config argument.
This patch changes the meaning of web.cacerts as follows:
value behavior
------- ---------------------------------------
None/'' use default
'!' never use CA certs (set by --insecure)
<path> verify by the specified CA certificates
Values other than <path> are for internal use and therefore undocumented.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 22:41:48 +0900] rev 24289
test-https: enable dummycert test only if Apple python is used (
issue4500)
The dummycert trick works only if Python is linked to Apple's patched OpenSSL.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 22:27:01 +0900] rev 24288
ssl: extract function that returns dummycert path on Apple python
This function will be the condition to switch DISABLEOSXDUMMYCERT in
test-https.t.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 21:36:48 -0700] rev 24287
largefiles: don't create chain of __contains__ calls
Matt Harbison pointed out that my recent
2720f967a7b1 might cause
__contains__ to continously get replaced by another version that calls
itself, since the manifest instance returned by the super method is
always the same instance due to @propertycache. He also suggested
replacing the class instead, as is done with the context class in the
surrounding code. Do so.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 09:06:45 -0700] rev 24286
lazymanifest: don't depend on printf's 'hh' format to work
Where we convert a 20-byte binary to a 40-byte hex string in
lazymanifest_setitem(), we use sprintf("%02hhx", hash[i]). As Matt
Harbison found out, 'hh' seems to be ignored on some platforms (Visual
Studio?). If char is signed on such platforms, the value gets
sign-extended as it gets promoted into an int when passed into the
variadic sprintf(). The resulting integer value will then be printed
with leading f's (14 of them on 64-bit systems), since the '2' in the
format string indicates only minimum number of characters. This is
both incorrect and runs the risk of writing outside of allocated
memory (as Matt reported).
To fix, let's cast the value to unsigned char before passing it to
sprintf(). Also drop the poorly supported 'hh' formatting that now
becomes unnecessary.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 11 Mar 2015 17:53:50 -0700] rev 24285
bundle2: test hooking using the new transaction-level hook
There is no strong reason to keep a bundle2-level hook as we can use the
transaction-level hook.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:50:49 -0700] rev 24284
hook: add a generic hook right before we commit a transaction
We are adding a 'txnclose' hook that will be run right before a transaction is
closed. Hooks running at that time will have access to the full transaction
content through both 'hookargs' content and on-disk reading. They will be able
to abort the transaction.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:43:36 -0700] rev 24283
transaction: add a validation stage
The 'transaction' object can now be fed a 'validator' function. This function
will be run right before the transaction is closed to validate its content. The
target usage is hooks. The validation function is expected to raise an exception
when it wants to abort the transaction.
This only introduce the idea with a default no-op validator. Actual usage is in
the next changeset.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:36:56 -0700] rev 24282
hook: add a generic hook after transaction has been closed
We are adding generic hooking for all transactions. We may have useful
information about what happened during the transaction, user of the transaction
should have filled the 'hookargs' dictionnary of the transaction. This hook is
simple because it has no power to rollback the transaction.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Dec 2014 18:19:49 -0800] rev 24281
hook: have a generic hook for transaction opening
We are adding generic hooking for all transactions. We do not really have any
useful information to include when opening the transaction but this is a
useful time to allow a hook anyway. We better let people abort transaction before
they happen than after multiple seconds/minutes of processing.
Yuya Nishihara <yuya@tcha.org> [Tue, 24 Feb 2015 00:04:55 +0900] rev 24280
templater: allow piping generator-type function output to filters
Template functions use "yield"s assuming that the result will be combined
into a string, which means both "f -> str" and "f -> generator" should behave
in the same way.
Before this patch, piping generator function resulted in a cryptic error.
We had to insert "|stringify" in this case.
$ hg log --template '{if(author, author)|user}\n'
abort: template filter 'userfilter' is not compatible with keyword
'[(<function runsymbol at 0x
7f5af2e8d8c0>, 'author'),
(<function runsymbol at 0x
7f5af2e8d8c0>, 'author')]'
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 15:22:34 -0700] rev 24279
record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 15:22:04 -0700] rev 24278
record: add interactive option to the commit command
Martin von Zweigbergk <martinvonz@google.com> [Tue, 10 Mar 2015 16:26:13 -0700] rev 24277
manifest: don't let find() look inside manifestdict
The find() method is currently implemented by looking inside the _lm
field of the manifest dict. Future manifests types (tree manifests)
may not have such a field, so add a method for getting to the data
instead.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 09 Mar 2015 17:13:22 -0700] rev 24276
largefiles: replace manifestdict.__contains__, don't extend class
We're soon going to add an alternative manifest class
(treemanifest). Rather than extending both those classes by
largesfiles versions, let's replace the method on the manifest
instances.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Mar 2015 16:50:57 -0400] rev 24275
files: split reusable implementation into cmdutil for subrepo support
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Mar 2015 16:45:29 -0400] rev 24274
files: use ctx object to access dirstate
This allows the cmdutil method to not need to be passed the repo as well as the
ctx.
Durham Goode <durham@fb.com> [Tue, 10 Mar 2015 13:56:05 -0700] rev 24273
copies: added manifests to computenonoverlap
Commit
30219bd46ed7 changed the computenonoverlap api's to not require the
manifests. We actually need the manifests in the remotefilelog extension so
we can find the file nodes for the various files that change. Let's add it
back to the function signature with a note explaining why.
This doesn't affect any behavior.
Laurent Charignon <lcharignon@fb.com> [Tue, 10 Mar 2015 17:14:33 -0700] rev 24272
record: move dorecord from record to cmdutil
Part of a serie of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Tue, 10 Mar 2015 17:09:07 -0700] rev 24271
record: remove dependency on hg module in record
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Tue, 10 Mar 2015 17:03:40 -0700] rev 24270
record: remove dependency on extensions module in dorecord
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Tue, 10 Mar 2015 14:42:07 -0700] rev 24269
record: move filterpatch from record to patch
Part of a series of patches to move record from hgext to core
Siddharth Agarwal <sid0@fb.com> [Tue, 10 Mar 2015 17:34:42 -0700] rev 24268
patch.internalpatch: add a default value for prefix
Rev
60c279ab7bd3 adding a parameter here. This breaks third-party extensions
like crecord and also makes the issue fairly hard to fix on the extension's
side if it wants to retain compatibility across Mercurial versions -- in old
versions, the positional argument will be passed into the next unknown
argument, which is 'files'.
The patch also undoes a change to the record extension that is no longer
necessary.
Durham Goode <durham@fb.com> [Wed, 11 Mar 2015 07:19:55 -0700] rev 24267
histedit: remove extra histedit constructor call
In a previous commit we removed the extra histedit object instance being
constructed in --continue and --abort. The new --edit-todo missed this fix
though (which means the state object it produces doesn't have the locks on it).
It's not breaking anything now, but let's go ahead and clean that up before we
forget.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 11 Mar 2015 09:34:22 -0400] rev 24266
color: consolidate cut-and-paste code
This fixes a mild case of cut-and-paste code regarding failing to set
terminal modes. This is evident in the win32 comment that is misplaced
for the terminfo mode since cset
ad6ad51cc0dd.
Instead, we refactor this C&P into a small local function.
Laurent Charignon <lcharignon@fb.com> [Mon, 09 Mar 2015 13:16:25 -0700] rev 24265
record: move parsepatch from record to patch
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Mon, 09 Mar 2015 13:14:31 -0700] rev 24264
record: move scanpatch from record to patch
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Mon, 09 Mar 2015 13:09:15 -0700] rev 24263
record: move hunk class from record to patch
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Mon, 09 Mar 2015 13:08:19 -0700] rev 24262
record: move countChanges in the hunk class
Part of a series of patches to move record from hgext to core
Laurent Charignon <lcharignon@fb.com> [Mon, 09 Mar 2015 13:04:50 -0700] rev 24261
record: move header class from record to patch
Part of a series of patches to move record from hgext to core
Siddharth Agarwal <sid0@fb.com> [Tue, 10 Mar 2015 13:06:38 -0700] rev 24260
cmdutil.tryimportone: allow importing relative patches with --bypass
Siddharth Agarwal <sid0@fb.com> [Mon, 09 Mar 2015 18:22:24 -0700] rev 24259
cmdutil.tryimportone: allow importing relative patches into the working dir
This makes hg import --prefix dir/ (without bypass) work.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Mar 2015 22:56:19 -0800] rev 24258
commands.import: accept a prefix option
The --prefix option is meant to be relative to the root rather than the current
working directory. This is for consistency with the rest of 'hg import' --
paths in patches are otherwise considered to be relative to the root.
In upcoming patches we'll hook this option up to the patch functions.
--exact with --prefix is currently disallowed because I can't really come up
with sensible semantics for it, especially when only part of the patch is
preserved.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 10 Mar 2015 11:01:10 -0700] rev 24257
test: make version based test-extensions failure more explanatory
A buggy __version__ content (usually from setup.py's hg being unable to read the
repo) can make this test fails in an obscure manner. We make the root of the
failure more explicit.
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.