- May 28, 2018
-
-
Matt Harbison authored
The problem here was that `default:pushurl` and `default` get translated to a single entry in `ui.paths` named 'default', with an attribute for 'pushloc', 'loc', and 'rawloc'. ui.expandpath() then always takes the `rawloc` attribute. Maybe the ui.expandpath() API is busted and should be removed? Or maybe getpath() should return a copy that adds an attribute reflecting the URL of the path chosen? I thought that I could remove the code in hg._outgoing() and pass the location resolved in commands.py as `dest`, but unfortunately that code is needed there to resolve #branch type URLs. Maybe that should be pulled up to commands.py, because I can't see any reasonable behavior for a subrepo path that's constructed out of that type of URL. The push command already resolves this early, so that works properly. But it looks like bundle, histedit, largefiles, patchbomb, and summary use a similar pattern, so they are likely similarly affected.
-
- Apr 21, 2018
-
-
Paul Morelle authored
Previously, as 'rev' was our iterator, we were always caching the chain base for the second revision of the chain, or for the base itself.
-
- Mar 07, 2018
-
-
Paul Morelle authored
Like in previous cases, update the set of tested revisions after yielding
-
- Mar 26, 2018
-
-
Martin von Zweigbergk authored
No callers cared about the nodeid and I want to make getrenamed() not look up the node (although it's currently free, I hope to store copy info in changesets and not include the nodeid). Differential Revision: https://phab.mercurial-scm.org/D3666
-
- May 26, 2018
-
-
Yuya Nishihara authored
Unlike its name, tempfile.NamedTemporaryFile is not a class, so I renamed the pycompat version to look like a plain function. Since temp.name uses in the infinitepush extension aren't bytes-safe, this patch leaves them unmodified. Another weird thing is tempfile.mktemp(), which does not accept bytes suffix nor prefix. Sigh.
-
Yuya Nishihara authored
This also flips the default to use a bytes path on Python 3.
-
Yuya Nishihara authored
This patch just flips the default to use a bytes path on Python 3. ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
-
- May 03, 2018
-
-
Yuya Nishihara authored
It's no longer used.
-
Yuya Nishihara authored
With chg where demandimport disabled, and if disk cache not warm, it took more than 5 seconds to get "unknown command" error when you typo a command name. This is horrible UX. The new implementation is less accurate than the original one as Python can do anything at import time and cmdtable may be imported from another module, but I think it's good enough. Note that the new implementation has to parse .py files, which is slightly slower than executing .pyc if demandimport is enabled.
-
- Apr 27, 2018
-
-
Matt Harbison authored
It wasn't obvious that LFS was involved from the error messages when `hg verify` fails.
-
- May 23, 2018
-
-
Matt Harbison authored
Recent additional testing revealed this problem on Windows: --- tests/test-status.t.err +++ tests/test-status.t.err @@ -109,7 +109,7 @@ tweaking defaults works $ hg status --cwd a --config ui.tweakdefaults=yes - ? . + ? ../a/ ? ../b/ ? ../in_root $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes @@ -120,7 +120,7 @@ ? b/in_b (glob) ? in_root $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes - ? . + ? ..\a\ ? ../b/ ? ../in_root (glob) AFAICT, the status list (input and output here) is always in '/' format. The '\' printed output on Windows is because each file is run through repo.pathto() -> dirstate.pathto() -> util.pathto(). (And that function states that the argument uses '/' separators.) I fixed a similar issue in 362096cfdb1f, and given the apparent need for these strings to be in '/' format, I wonder if cmdutil.dirnode() should be rewritten to avoid os.path.join(). But it looks like all entries added to the temporary terse dict should use '/' now, and cmdutil.tersedir() looks like the only user.
-
- May 24, 2018
-
-
hindlemail authored
-
- May 22, 2018
-
-
Boris Feld authored
Same motivation as for `mutablephases`, having a single definition helps with updating phases logic.
-
Boris Feld authored
Such tuple was already manually defined in a couple of place. Having an official definition makes it easy to introduce of new phases.
-
- May 21, 2018
-
-
Boris Feld authored
This reuses a precomputed set, being much faster than manual iteration. Computing the "unserved" filter speed up by 55%. before: wall 0.014671 comb 0.020000 user 0.020000 sys 0.000000 (best of 180) after: wall 0.006623 comb 0.010000 user 0.010000 sys 0.000000 (best of 401) The "unserved" filter is used to restrict the revisions client can pull from a server. (eg: secret changesets)
-
- May 25, 2018
-
-
Pulkit Goyal authored
After previous patch, we have started preserving user and date values in graftstate and reusing them during `hg graft --continue`. Now passing --user and --date again with --continue makes no sense. Let's drop them from the hint. Differential Revision: https://phab.mercurial-scm.org/D3660
-
Pulkit Goyal authored
Reading the user and date information from graftstate during `hg graft --continue` will help us in preserving the user and date arguments passed when `hg graft` was called. This patch reads that information and reuses that while running `hg graft --continue`. So after this patch, --user and --date values are preserved even if conflicts occur and user don't need to pass them again. The test changes demonstrate the fix. This is a backward incompatible change but I think of this more as a bug fix. Also thinking about removing the line from `hg help graft` which says --continue does not reapply other flags but need to check what are the other flags which needs to be preserved. Differential Revision: https://phab.mercurial-scm.org/D3659
-
Pulkit Goyal authored
This patch adds test showing that we don't preserve the user passed --date and --user values in `hg graft`. I was fixing that and realized this is untested. Adding tests before so that behavior change or the fix is easy to realize. Differential Revision: https://phab.mercurial-scm.org/D3658
-
Pulkit Goyal authored
Right now, `hg help graft` says: The -c/--continue option does not reapply earlier options, except for --force. which should be treated as a bug. A good user experience is that the commands remember the arguments passed initially and preserve them during `hg graft --continue`. This patch starts storing the user and date information in graftstate if user passed it. Upcoming patches will make sure we preserve that information during --continue and them don't allow user to pass any new arguments with --continue. I don't think there is any another `--continue` flag which allows new options to be passed with it. Differential Revision: https://phab.mercurial-scm.org/D3657
-
Pulkit Goyal authored
Previous patches start using state.cmdstate() class for statefiles. The class has a function delete() to delete the state file. This patch replaces the existing repo.vfs.unlink() with that delete() function. Differential Revision: https://phab.mercurial-scm.org/D3656
-
John Stiles authored
the graph to the ui. This allows a cleaner entrypoint for extensions to tweak the graph output without needing to rewrite all of ascii(), or needing to manually guess where the graph nodes/edges end and the rev note portion begins. This patch does not affect graph output or behavior in any way. Differential Revision: https://phab.mercurial-scm.org/D3655
-
- Feb 27, 2018
-
-
Pulkit Goyal authored
This tests the reading of old graftstate file using the new logic. The tests shows that if user is in middle of a graft and then updates their mercurial to the version where we have new graftstate format, we can still read the old graft state format files correctly. Differential Revision: https://phab.mercurial-scm.org/D2597
-
- May 24, 2018
-
-
Pulkit Goyal authored
This patch replaces the logic to read and write data to graftstate file to use the state.cmdstate() class. The previous graftstate format didn't had any version number on top of that, so we have to catch the CorruptedState error and then read the graftstate in case of old state files. This will help us to implement nice additions to graft commands like `--no-commit`, `--abort`, `--stop` flags. Passing on test-graft.t shows that things are working fine. Differential Revision: https://phab.mercurial-scm.org/D3654
-
Pulkit Goyal authored
This is a step towards make graft use the new state.cmdstate() class. This patch replaces the ugly try-except with nice if-else conditionals. Differential Revision: https://phab.mercurial-scm.org/D3652
-
Pulkit Goyal authored
Fatcoring out the logic in a separate function will help us in adding conditional logic for different versions of graft state files. Differential Revision: https://phab.mercurial-scm.org/D3651
-
Pulkit Goyal authored
The cmdstate class used to have a class variable opts which used to be a dict which stored all the data for the state. Recent cleanups removed the use of that variable. There were couple of instances left which are removed by this patch. Differential Revision: https://phab.mercurial-scm.org/D3653
-
Yuya Nishihara authored
-
Matt Harbison authored
-
Matt Harbison authored
There are several instances of multiple sentence output, which I left alone. That is already nonstandard style, so dropping the period doesn't seem like an improvement.
-
- Apr 04, 2018
-
-
Yuya Nishihara authored
They were lists of mappings.
-
Yuya Nishihara authored
It wasn't Py3 compatible because mapping keys must be bytes.
-
Yuya Nishihara authored
The diffopts here is a plain dict, which should be wrapped by hybriddict.
-
Yuya Nishihara authored
It's a generator of at most two mappings, which has to be wrapped.
-
Yuya Nishihara authored
No bare generator of mappings should be put in a template mapping.
-
Yuya Nishihara authored
No bare generator of mappings should be put in a template mapping.
-
Yuya Nishihara authored
It was an 1-length list of a mapping, can be wrapped with a mappinglist.
-
Yuya Nishihara authored
They were functions returning a generator of mappings. The laziness is handled by the mappinggenerator class.
-
- May 22, 2018
-
-
Pulkit Goyal authored
There are old state files which don't have a version number in top of them and hence we have to read them to check whether they are good or not. ProgrammingError is not apt for this case. Thanks to Yuya for suggesting CorruptedState error. Differential Revision: https://phab.mercurial-scm.org/D3644
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D3643
-
- May 15, 2018
-
-
David Demelier authored
-