Wed, 24 May 2017 17:50:17 +0200 util: raise ParseError when parsing dates (BC)
Boris Feld <boris.feld@octobus.net> [Wed, 24 May 2017 17:50:17 +0200] rev 32496
util: raise ParseError when parsing dates (BC) a7dce526c462 refactored util.parsedate in order to raise ValueError instead of Abort for using with ui.configwith. It causes several problems, putting arbitrary bytes in ValueError can cause issues with Python 3. Moreover, we added a function to convert ValueError exceptions back to Abort. A better approach would be to make parsedate raises ParseError, removing the convert function and update configwith to also catch ParseError. The side-effect is that error message when giving an invalid date in CLI change from: abort: invalid date: 'foo bar' to: hg: parse error: invalid date: 'foo bar' I'm not sure if it's an acceptable change, I found personally the error message more clear but more verbose too.
Tue, 16 May 2017 14:31:21 -0700 match: fix visitdir for roots of includes
Martin von Zweigbergk <martinvonz@google.com> [Tue, 16 May 2017 14:31:21 -0700] rev 32495
match: fix visitdir for roots of includes I'm hoping to rewrite the matcher so excludes are handled by composition of one matcher with another matcher where the second matcher has only includes. For that to work, we need to make visitdir() to return 'all' for directory 'foo' for a '-I foo' matcher.
Wed, 17 May 2017 23:02:42 -0700 match: make subdirmatcher extend basematcher
Martin von Zweigbergk <martinvonz@google.com> [Wed, 17 May 2017 23:02:42 -0700] rev 32494
match: make subdirmatcher extend basematcher This makes the subdirmatcher not depend on the main matcher, giving us more freedom to modify that (specifically, it will lose it _always field in a while).
Fri, 19 May 2017 10:17:08 -0700 match: make basematcher._files a @propertycache
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 10:17:08 -0700] rev 32493
match: make basematcher._files a @propertycache This will make it easier to override in subclasses (otherwise the function @propertycache object will be replaced by the super-constructor call)..
Wed, 17 May 2017 23:45:13 -0700 match: extract base class for matchers
Martin von Zweigbergk <martinvonz@google.com> [Wed, 17 May 2017 23:45:13 -0700] rev 32492
match: extract base class for matchers We will soon start splitting up the current matcher class into more specialized classes, so we'll want a base class for all the things that don't vary much between different matchers.
Mon, 22 May 2017 11:08:52 -0700 debugwalk: also print matcher representation
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 11:08:52 -0700] rev 32491
debugwalk: also print matcher representation This will make the effect of coming patches clearer.
Thu, 25 May 2017 01:45:52 +0200 transaction: run _writejournal unfiltered
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 01:45:52 +0200] rev 32490
transaction: run _writejournal unfiltered The function use the length of the repository, something affected by filtering. It seems better to use the unfiltered length here. Credit for finding this goes to Durham Goode.
Mon, 22 May 2017 19:18:12 -0400 bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com> [Mon, 22 May 2017 19:18:12 -0400] rev 32489
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC) I just burned myself on this today because I left out the -r in my `hg bookmark` command, which then left me confused because I didn't notice the bookmark I created in the wrong place that was silently shadowing the revision I was trying to check out. Let's warn the user. This patch only enforces the check on bookmark names 4 characters long or longer. We can tweak that if we'd like, I selected that since that's the fewest characters shortest will use in the templater output. A previous version of this patch rejected such bookmarks. It was proposed during review (and I agree) that the behavior change for a bookmark named "cafe" or similar as history accumulated was a little too weird, but that the warning definitely has merit.
Thu, 04 May 2017 11:51:07 +0900 pycompat: try __bytes__() to convert object to bytestr
Yuya Nishihara <yuya@tcha.org> [Thu, 04 May 2017 11:51:07 +0900] rev 32488
pycompat: try __bytes__() to convert object to bytestr It should be better than using __str__() unconditionally.
Tue, 23 May 2017 15:44:50 +0200 ui: fix ui.configdate for invalid dates
Boris Feld <boris.feld@octobus.net> [Tue, 23 May 2017 15:44:50 +0200] rev 32487
ui: fix ui.configdate for invalid dates a7dce526c462 introduced util._parsedate with the aim to be used in ui.configdate but ui.configdate was using util.parsedate instead. It have the impact of raising an AbortError in case of an invalid date instead of a ConfigError exception. Fix ui.configdate to use the right function and add a test for invalid dates. Thanks to Yuya for the catch!
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip