- Jun 28, 2017
-
-
Martin von Zweigbergk authored
We were passing it as a revision number in one place and as a context in another. It worked because the only use was in "repo[dest].rev()", but it was confusing. By always passing a revision number, we can also remove that unnecessary lookup.
-
- Jun 26, 2017
-
-
Pierre-Yves David authored
We have a new 'obsutil' module now. We move the high level utility there to bring 'obsolete.py' back to a more reasonable size.
-
- Jun 29, 2017
-
-
Martin von Zweigbergk authored
-
- Jun 26, 2017
-
-
Gregory Szorc authored
As part of using `hg show` in my daily workflow, I've found it slightly annoying to have to type full view names, complete with a space. I've locally registered an alias for "swork = show work." I think others will have this same complaint and could benefit from some automation to streamline the creation of aliases. So, this commit introduces a config option that allows `hg show` views to be automatically aliased using a given prefix. e.g. a value of "s" will automatically register "swork" and "sbookmarks." Multiple values can be given for ultimate flexibility. This arguably isn't needed now. But since we don't register aliases if there will be a collision and we're bound to have a collision, it makes sense to allow multiple prefixes so specific views can avoid collisions by using different prefixes.
-
- Jun 18, 2017
-
-
Pierre-Yves David authored
Now that the default value is also converted we can use a human readable version for it. This will be useful if we start to automatically display the default config value in various place.
-
- Jun 17, 2017
-
-
Pierre-Yves David authored
This exercise the default value handling in 'configbytes'.
-
Pierre-Yves David authored
The version declaration should come first in my opinion. This will help gather the command table with the config table.
-
- Jun 27, 2017
-
-
Pierre-Yves David authored
Having a single transaction for rebase means the whole transaction gets rolled back on error. To work around this a small hack has been added to detect merge conflict and commit the work done so far before exiting. This hack works because there is nothing transaction related going on during the merge phase. However, if a hook blocks the rebase to create a changeset, it is too late to commit the work done in the transaction before the problematic changeset was created. This leads to the whole rebase so far being rolled back. Losing merge resolution and other work in the process. (note: rebase state will be fully lost too). Since issue5610 is a pretty serious regression and the next stable release is a couple day away, we are taking the backout route until we can figure out something better to do.
-
Pierre-Yves David authored
In the process of fixing issue5610 in 4.2.2, we are trying to backout cf8ad0e6c0e4. This changeset is making changes that depend on cf8ad0e6c0e4, so we need to back it out first. Since issue5610 is pretty serious regression and the next stable release is a couple of days away, we are taking the backout route until we can figure out something better to do.
-
- Jun 25, 2017
-
-
Katsunori FUJIWARA authored
Before this patch, some functions are wrapped in reposetup(), but this causes redundant nested wrapping, if two ore more repositories enable keyword extension (e.g. hgweb serves multiple repositories). Now, there is no need to define these wrapper functions in reposetup(), because previous patches made them not directly refer to kwtemplater instanciated in reposetup(). This patch factors these wrapper functions out from reposetup(), and uses them to wrap functions only at once at loading keyword extension.
-
Katsunori FUJIWARA authored
Now, kwtemplater instance can be obtained via _keywordkwt property of repository.
-
Katsunori FUJIWARA authored
Wrapper functions of keyword extension are defined in reposetup(), because they refer to kwtemplater instantiated in reposetup(). This patch makes them obtain kwtemplater instance via repository at runtime. For reviewability, this patch focuses on wrapper functions, which handle generator. This is a part of preparations for defining them statically.
-
Katsunori FUJIWARA authored
Wrapper functions of keyword extension are defined in reposetup(), because they refer to kwtemplater instantiated in reposetup(). This patch makes them obtain kwtemplater instance via repository at runtime. This is a part of preparations for defining them statically.
-
Katsunori FUJIWARA authored
Wrapper functions of keyword extension are defined in reposetup(), because they refer to kwtemplater instantiated in reposetup(). But these functions can be defined statically, if kwtemplater can be obtained via repository at runtime. This is a part of preparations for defining them statically. To avoid cyclic reference, this patch makes kwtemplater use weakref to refer related repository instance.
-
Katsunori FUJIWARA authored
Before this patch, diff in "comparison" webcommand doesn't suppress keyword expansion as same as diff output of other webcommands.
-
Katsunori FUJIWARA authored
Before this patch, kwweb_skip doesn't restore kwtemplater.match after wrapped webcommands. This suppresses keyword expansion at wrapped webcommands. Typical usecase of this issue is "file" webcommand after annotate, changeset, filediff or so on. To ensure kwtemplater.match=util.never while original webcommand running, this patch makes kwweb_skip yield values returned by it, because it returns generator object.
-
Katsunori FUJIWARA authored
Before this patch, kwdiff doesn't restore kwtemplater.restrict after invocation of wrapped patch.diff(). This suppresses keyword expansion at subsequent filelog.read(). Typical usecase of this issue is "hg cat" after "hg diff" with command server. In this case, kwtemplater.restrict=True is kept in command server process even after "hg diff". To ensure kwtemplater.restrict=True while original patch.diff() running, this patch makes kwdiff() yield values returned by it, because it returns generator object. Strictly speaking, if filelog.read() is invoked before completely evaluating the result of previous patch.diff(), keyword expansion is still suppressed, because kwtemplater.restrict isn't restored yet. But this fixing should be reasonable enough, because patch.diff() is consumed immediately, AFAIK.
-
Jun Wu authored
Previously, rebase assumes the following pattern: rebase: with transaction as tr: # top-level ... tr.__close__ writes rebasestate unlink('rebasestate') However it's possible that "rebase" was called inside a transaction: with transaction as tr1: rebase: with transaction as tr2: # not top-level ... tr2.__close__ does not write rebasestate unlink('rebasestate') tr1.__close__ writes rebasestate That leaves a rebasestate on disk incorrectly. This patch adds "removefilegenerator" to notify transaction code that the state file is no longer needed therefore fixes the issue.
-
- Jun 24, 2017
-
-
Gregory Szorc authored
Previously, we constructed a formatter from a specific template topic. Then from show() we reached into the internals of the formatter to resolve a template string to be used to construct a changeset templater. A downside to this approach was it limited us to having the entire template defined in a single entry in the map file. You couldn't reference other entries in the map file and this would lead to long templates and redundancy in the map file. This commit teaches @showview how to instantiate a changeset templater so we can construct a templater with full access to the map file. To prove it works, we've split "showwork" into components.
-
- Jun 22, 2017
-
-
Martin von Zweigbergk authored
-
- Jun 16, 2017
-
-
Martin von Zweigbergk authored
This is one step towards removing a bunch of "if isinstance(gen, unbundle20)" by treating bundle1 and bundle2 more similarly. The name may sounds ironic for a method in the bundle2 module, but I didn't think it was worth it yet to create a new 'bundle' module that depends on the 'bundle2' module. Besides, we'll inline the method again later.
-
- Jun 24, 2017
-
-
Yuya Nishihara authored
check-code.py has the rule, but it isn't smart enough to catch this.
-
- Jun 21, 2017
-
-
Pulkit Goyal authored
-
- Jun 23, 2017
-
-
Katsunori FUJIWARA authored
Before this patch, -e/--edit and -e/--ssh of fetch command collide against each other. This causes that -e is treated as shorthand of --edit but doesn't work as same as --edit. Therefore, -e works as neither --edit nor --ssh, in practice. This issue was introduced at 595a69a01129 (or 1.0), which renamed -f/--force-editor to -e/--edit. At that point, -e was already used as shorthand of --ssh. After this patch, -e is treated as shorthand of --ssh. This patch is marked as "(BC)", because -e as shorthand of --edit in existing scripts causes failure (or unexpected result) after this patch. This impact should be less enough, because --edit mainly focuses on interactive use. BTW, test-duplicateoptions.py (since 7d171c05a631 or 1.9) can't detect this kind of issues as expected, because direct invocation of extensions.loadall() doesn't involve registration of commands defined in extensions (this issue is fixed in subsequent patch).
-
Rishabh Madan authored
Earlier, on parsing the bullet points from existing release notes the bullet points after the first one weren't written correctly to the notes file. This patch makes changes to parsereleasenotesfromfile() function that introduces a new bullet_points data structure that tracks the bullets and associated subparagraph. It also makes necessary changes to the tests related to merging of bullets.
-
Pierre-Yves David authored
Since its introduction in 9dfee83c93c8, the parameter has always been name "error". Yet the eol extension have been using 'haserror' as the argument name, breaking extensions with subclass passing 'error' as a keyword argument.
-
Pierre-Yves David authored
We need the 'error' name available to fix another bug, so we rename the imported module.
-
- Jun 21, 2017
-
-
Jun Wu authored
Previously, there is a 100 changes limit per name (bookmark or named branch). And the user will get "too many shelved changes named %s" when they are trying to shelve the 101th change. I hit that error message today. This limit was introduced by the shelve extension since the beginning. The function generating the names was called "gennames", under "getshelvename". There is another "gennames" under "backupfilename": def backupfilename(self): def gennames(base): yield base base, ext = base.rsplit('.', 1) for i in itertools.count(1): yield '%s-%d.%s' % (base, i, ext) "itertools.count" is an endless counter. Since the other "gennames" generates unlimited number of names, and the changeset introducing the limit (49d4919d21c2) does not say why the limit is useful. It seems safe to just remove the limit. The format "%02d" was kept intentionally so existing shelved changes won't break.
-
- Jun 20, 2017
-
-
Augie Fackler authored
-
Christian Ebert authored
-
- Jun 16, 2017
-
-
Martin von Zweigbergk authored
I think passing in the transaction makes it a little clearer and more consistent with bundle2.
-
- Jun 19, 2017
-
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
-
durin42 authored
I tripped on some weirdness relating to _thread vs threading way down in a dep of highlight recently. I'm not really sure why I'm only just seeing this defect now, but experimentally this fixes the problem, and shouldn't cause any load-time slowness for people until pygments is actually about to be used since highlight.highlight is still lazily loaded in the highlight/__init__.py file.
-
- Jun 18, 2017
-
-
Martin von Zweigbergk authored
children() is slow
-
Martin von Zweigbergk authored
children() is slow
-
- Jun 17, 2017
-
-
Pulkit Goyal authored
-
- Jun 16, 2017
-
-
Martin von Zweigbergk authored
-