- May 09, 2017
-
-
Siddharth Agarwal authored
This helps both users and the people who support them figure out why a stream clone couldn't be performed. In an upcoming patch we're going to add a way for servers to hard abort on a full getbundle. In those cases servers might expect clients to perform a stream clone, so it's important to communicate why one couldn't be done.
-
Siddharth Agarwal authored
Turns out we had no coverage for this important case.
-
Siddharth Agarwal authored
At the moment this isn't used and all stream clones use the legacy protocol. In an upcoming diff, canperformstreamclone will print out a message if a stream clone was requested but couldn't happen for some reason. Removing this call ensures the message isn't printed twice.
-
- May 12, 2017
-
-
Katsunori FUJIWARA authored
Before this patch, there is no convenient way to know which merge tool is chosen for each managed files without actual merging.
-
Katsunori FUJIWARA authored
Internal merge tool :dump implies premerge. Therefore, files aren't dumped, if premerge runs successfully. This undocumented behavior might confuse users, if they want to always dump files. But just making :dump omit premerge might cause backward compatibility issue for existing automation. This patch adds new internal merge tool :forcedump, which works as same as :dump, but omits premerge always. Internal tools annotated with "nomerge" should merge "change and delete" correctly, but _forcedump() can't. Therefore, it is annotated with "mergeonly" to always omit premerge, even though it doesn't merge files actually. This patch also adds explanation about premerge to :dump, to clarify how :dump actually works. BTW, this patch specifies internal tools with "internal:" prefix in newly added test scenario in test-merge-tools.t, even though this prefix is already deprecated. This is only for similarity to other tests in test-merge-tools.t.
-
Katsunori FUJIWARA authored
Before this patch, " specified for " part of warning messages (e.g. "couldn't find merge tool TOOL specified for PAT") isn't translatable.
-
Katsunori FUJIWARA authored
Before this patch, internal merge tool :prompt shows "no tool found to merge FILE" line, even if :prompt is explicitly specified as a tool to be used. This patch shows warning message about choice of :prompt only at an actual fallback, in which case any tool is rejected by capability for binary or symlink. It is for backward compatibility to omit warning message in "changedelete" case.
-
- May 09, 2017
-
-
Durham Goode authored
Previously we relied on the opener options to tell the revlog to be a tree manifest. This makes it complicated for extensions to create treemanifests and normal manifests at the same time. Let's add a construtor argument to create a treemanifest revlog as well. I considered removing the options['treemanifest'] logic from manifestrevlog entirely, but doing so shifts the responsibility to the caller which ends up requiring changes in localrepo, bundlerepo, and unionrepo. I figured having the dual mechanism was better than polluting other parts of the code base with treemanifest knowledge.
-
- Apr 26, 2017
-
-
Yuya Nishihara authored
We're going to make the 'c' policy more strict, where no missing attribute will be allowed. Since we want to run 'hg bisect' without rebuilding the C extension modules, we'll need a looser policy for development environment. The default for system installation isn't changed. Note that the current 'c' policy is practically 'allow'-ish as we have lots of adhoc fallbacks to pure functions.
-
- May 11, 2017
-
-
Jun Wu authored
Previously, verify only checks "rawsize == len(rawtext)", if "len(fl.read()) != fl.size()". With flag processor, "len(fl.read()) != fl.size()" does not necessarily mean "rawsize == len(rawtext)". So we may miss a useful check. This patch removes the "if len(fl.read()) != fl.size()" condition so the rawsize check is always performed. With the condition removed, "fl.read(n)" looks unnecessary so a comment was added to explain the side effect is wanted.
-
- May 12, 2017
-
-
Martin von Zweigbergk authored
The help text for rebase calls it "the destination" (never "target"), so let's use that in messages as well.
-
Martin von Zweigbergk authored
It took me a while to figure out that "target" was actually what's passed to --dest.
-
- May 11, 2017
-
-
Gregory Szorc authored
We dropped support for Python 2.6. So this code to work around a missing feature on 2.6 is no longer necessary.
-
- May 12, 2017
-
-
Phil Cohen authored
Most merge.py code goes through the vfs instead of maniulating files directly, so let's do the same here.
-
Martin von Zweigbergk authored
-
- May 10, 2017
-
-
Jun Wu authored
"addrawrevision" will be the public API to reuse revision rawdata elsewhere. It will be used by a future patch.
-
Jun Wu authored
The end goal is to make it possible to avoid potential expensive fctx.data() when unnecessary. While memctx is useful for creating new file contexts, there are many cases where we could reuse an existing raw file revision (amend, histedit, rebase, process a revision constructed by a remote peer, etc). The overlayfilectx class is made to support such reuse cases. Together with a later patch, hash calculation and expensive flag processor could be avoided.
-
Jun Wu authored
It does not seem to be used anywhere, and breaks a later patch.
-
- May 09, 2017
-
-
Jun Wu authored
The new method returns the low-level revlog flag. We already have "rawdata" so a "rawflags" makes sense. Both "rawflags" and "rawdata" will be used in a later patch.
-
- May 10, 2017
-
-
Jun Wu authored
See previous patch for context - avoid code duplication.
-
Jun Wu authored
See previous patch for context - mainly to avoid code duplication.
-
Jun Wu authored
Make basefilectx._flags a property cache, so basefilectx.flags() could be reasonably reused. This avoids code duplication between memfilectx and a class added in a later patch.
-
- Apr 30, 2017
-
-
Jun Wu authored
bindsocket now handles listen automatically. "printbanner" seems to be just a part of "bindsocket". This simplifies the interface a bit.
-
Jun Wu authored
This enables chg to replace a server socket in an atomic way: 1. bind to a temp address 2. listen 3. rename Currently 3 happens before 2 so a client may see the socket file but fails to connect to it.
-
- May 08, 2017
-
-
Gregory Szorc authored
It is now unused. And we require Python 2.7+ now so this check is not necessary.
-
Gregory Szorc authored
We just removed support for Python 2.7. This test is dead since it only ran on <2.7.
-
- May 02, 2017
-
-
Gregory Szorc authored
Per discussion on the mailing list and elsewhere, we've decided that Python 2.6 is too old to continue supporting. We keep accumulating hacks/fixes/workarounds for 2.6 and this is taking time away from more important work. So with this patch, we officially drop support for Python 2.6 and require Python 2.7 to run Mercurial.
-
- May 06, 2017
-
-
Gregory Szorc authored
We don't need to measure the time it takes to open the revlog or calculate its length. This is more consistent with what other perf* functions do. While I was here, I also renamed the revlog variable from "r" to "rl" - again in the name of consistency.
-
Gregory Szorc authored
cmdutil.openrevlog() may return a cached revlog instance. This /may/ be a recent "regression" due to refactoring of the manifest API. I'm not sure. Either way, this perf command was broken for at least manifests because subsequent invocations of the perf function would get cache hits from previous invocations, invalidating results. In the extreme case, testing the last revision in the revlog resulted in near-instantanous execution of subsequent runs (since the fulltext is cached). A time of ~1us would be reported in this case.
-
Gregory Szorc authored
-
Gregory Szorc authored
This completes our rename of internal revlog methods to distinguish between low-level raw revlog data "segments" and higher-level, per-revision "chunks." perf.py has been updated to consult both names so it will work against older Mercurial versions.
-
Gregory Szorc authored
To prepare for renaming revlog._chunkraw, we stuff a reference to this metho in a local variable. This does 2 things. First, it moves the attribute lookup outside of a loop, which more accurately measures the time of the code being invoked. Second, it allows us to alias to different methods depending on their presence (perf.py needs to support running against old Mercurial versions). Removing an attribute lookup from a tigh loop appears to shift the numbers slightly with mozilla-central: $ hg perfrevlogchunks -c ! read ! wall 0.354789 comb 0.340000 user 0.330000 sys 0.010000 (best of 28) ! wall 0.335932 comb 0.330000 user 0.290000 sys 0.040000 (best of 30) ! read w/ reused fd ! wall 0.342326 comb 0.340000 user 0.320000 sys 0.020000 (best of 29) ! wall 0.332857 comb 0.340000 user 0.290000 sys 0.050000 (best of 30) ! read batch ! wall 0.023623 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023666 comb 0.020000 user 0.000000 sys 0.020000 (best of 125) ! read batch w/ reused fd ! wall 0.023828 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023556 comb 0.020000 user 0.000000 sys 0.020000 (best of 126)
-
Gregory Szorc authored
Currently, "chunk" is overloaded in revlog terminology to mean multiple things. One of them refers to a segment of raw data from the revlog. This commit renames various methods only used within revlog.py to have "segment" in their name instead of "chunk." While I was here, I also made the names more descriptive. e.g. "_loadchunk()" becomes "_readsegment()" because it actually does I/O.
-
Jun Wu authored
In the future, chg may prefill repo's dirstate filecache so it's valuable and should be kept. Previously we drop both filecache and property cache for dirstate during fsmonitor reposetup, this patch changes it to only drop property cache but keep the filecache.
-
Gregory Szorc authored
This is more consistent with other perf* functions.
-
Gregory Szorc authored
Previously, the "startrev" argument would be ignored due to "startrev = 0" in the benchmark function. This meant that `hg perfrevlog` always started at revision 0. Rename the local variable to "beginrev" so the variable does the right thing.
-
- May 05, 2017
-
-
Pierre-Yves David authored
This should help performance when unbundling.
-
Pierre-Yves David authored
This will help us reusing the logic for `hg bundle`.
-
Pierre-Yves David authored
The current function ('writebundle') is focussing on getting an existing changegroup to disk. It is no easy ways to includes more part in the generated bundle2. So we introduce a slightly higher level function that is fed the 'outgoing' object (that defines the bundled spec) and the bundlespec parameters (to control the changegroup generation and inclusion of other parts). This is creating the third logic dedicated to create a consistent bundle2 (the other 2 are the push code and the getbundle code). We should probably reconcile them at some points but they all takes different types of input. So we need to introduce an intermediate "object" that each different input could be converted to. Such unified "bundle2 specification" could be fed to some unified code. We start by having the `hg bundle` related code on its own to helps defines its specific needs first. Once the common and specific parts of each logic will be known we can start unification.
-
- May 04, 2017
-
-
Pierre-Yves David authored
We can also handle that part before starting any generation.
-