D9335: shelve: clear merge state after partial shelve

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9335 AFFECTED FILES mercurial/shelve.py tests/test-shelve.t CHANGE DETAILS d

D9334: tests: show that interactive shelve can leave the repo with a merge state

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If part of a file is shelved (as we already do in a test), there will be an unfinished merge state left after `hg shelve` finishes. There should never be a

D9332: errors: use exit code 10 for parse errors

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There are still some parse errors that are caught in the higher-level dispatch module. I'll try to get back to those later,

D9329: errors: use InputError for some errors on `hg clone`

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9329 AFFECTED FILES mercurial/hg.py tests/test-bundle.t tests/test-clone.t

D9326: errors: use InputError for errors about bad paths

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9326 AFFECTED FILES mercurial/scmutil.py tests/test-add.t tests/test-copy.t

D9330: errors: raise more specific errors from rewriteutil

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9330 AFFECTED FILES mercurial/rewriteutil.py

D9328: errors: raise InputError when given non-existent paths etc

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9328 AFFECTED FILES mercurial/cmdutil.py mercurial/localrepo.py tests/test-c

D9327: errors: use InputError for errors about bad label names (tags etc)

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9327 AFFECTED FILES mercurial/scmutil.py tests/test-bookmarks.t tests/test-b

D9333: errors: raise InputError when line range to followlines() is out of bounds

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9333 AFFECTED FILES mercurial/mdiff.py tests/test-annotate.t CHANGE DETAILS

D9331: dispatch: move some helper functions down into scmutil

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I plan to reuse `formatparse()` in the next patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9331 AFFECT

D9325: histedit: don't crash if commit message is empty

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the commit message is empty, histedit will crash before this patch because it assumes that `summary.splitlines()` is non-

D9324: histedit: disable color while rendering template for use in plan

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9324 AFFECTED FILES hgext/histedit.py tests/

D9323: tests: show how `hg histedit` can put color codes in histedit plan

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9323 AFFECTED FILES hgext/histedit.py tests/

Re: How to use the templater without color (even when ui has color)

2020-11-16 Thread Martin von Zweigbergk via Mercurial-devel
That's not a solution I would have thought of. Thanks! I've sent a fix for `hg split` in https://phab.mercurial-scm.org/D9322. I'll work on one for histedit now. Hopefully testing it is not too annoying. On Sat, Nov 14, 2020 at 1:19 AM Yuya Nishihara wrote: > On Fri, 13 Nov 2020 09:20:24 -0800,

D9321: tests: show how `hg split` can put color codes in commit template

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With D9255 , I made it so `hg split` respects the `commmand-templates.oneline-summary` config. I don't think I realized

D9322: split: disable color while rendering template for use in commit message

2020-11-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9322 AFFECTED FILES hgext/split.py tests/test-split.t CHANGE DETAILS diff --

D9320: rust-status: don't bubble up os errors, translate them to bad matches

2020-11-16 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In the rare cases when either the OS/filesystem throws an error on an otherwise valid action, or because a path is not representable on the filesystem, or bec

D9319: rust-status: properly translate OSError to Python

2020-11-16 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is probably never going to be called after the next few patches, but we might as well make sure this is done correctly for the future rewrite. REPOSITORY