Show More
@@ -72,7 +72,7 b' def split(ui, repo, *revs, **opts):' | |||
|
72 | 72 | with repo.wlock(), repo.lock(), repo.transaction(b'split') as tr: |
|
73 | 73 | revs = scmutil.revrange(repo, revlist or [b'.']) |
|
74 | 74 | if len(revs) > 1: |
|
75 |
raise error. |
|
|
75 | raise error.InputError(_(b'cannot split multiple revisions')) | |
|
76 | 76 | |
|
77 | 77 | rev = revs.first() |
|
78 | 78 | ctx = repo[rev] |
@@ -82,7 +82,7 b' def split(ui, repo, *revs, **opts):' | |||
|
82 | 82 | ui.status(_(b'nothing to split\n')) |
|
83 | 83 | return 1 |
|
84 | 84 | if ctx.node() is None: |
|
85 |
raise error. |
|
|
85 | raise error.InputError(_(b'cannot split working directory')) | |
|
86 | 86 | |
|
87 | 87 | if opts.get(b'rebase'): |
|
88 | 88 | # Skip obsoleted descendants and their descendants so the rebase |
@@ -98,7 +98,7 b' def split(ui, repo, *revs, **opts):' | |||
|
98 | 98 | rewriteutil.precheck(repo, [rev] + torebase, b'split') |
|
99 | 99 | |
|
100 | 100 | if len(ctx.parents()) > 1: |
|
101 |
raise error. |
|
|
101 | raise error.InputError(_(b'cannot split a merge changeset')) | |
|
102 | 102 | |
|
103 | 103 | cmdutil.bailifchanged(repo) |
|
104 | 104 | |
@@ -170,7 +170,7 b' def dosplit(ui, repo, tr, ctx, opts):' | |||
|
170 | 170 | committed.append(newctx) |
|
171 | 171 | |
|
172 | 172 | if not committed: |
|
173 |
raise error. |
|
|
173 | raise error.InputError(_(b'cannot split an empty revision')) | |
|
174 | 174 | |
|
175 | 175 | scmutil.cleanupnodes( |
|
176 | 176 | repo, |
@@ -51,7 +51,7 b' Nothing to split' | |||
|
51 | 51 | $ hg commit -m empty --config ui.allowemptycommit=1 |
|
52 | 52 | $ hg split |
|
53 | 53 | abort: cannot split an empty revision |
|
54 |
[ |
|
|
54 | [10] | |
|
55 | 55 | |
|
56 | 56 | $ rm -rf .hg |
|
57 | 57 | $ hg init |
@@ -60,7 +60,7 b' Cannot split working directory' | |||
|
60 | 60 | |
|
61 | 61 | $ hg split -r 'wdir()' |
|
62 | 62 | abort: cannot split working directory |
|
63 |
[ |
|
|
63 | [10] | |
|
64 | 64 | |
|
65 | 65 | Generate some content. The sed filter drop CR on Windows, which is dropped in |
|
66 | 66 | the a > b line. |
@@ -103,7 +103,7 b' Split a head' | |||
|
103 | 103 | |
|
104 | 104 | $ hg split 'all()' |
|
105 | 105 | abort: cannot split multiple revisions |
|
106 |
[ |
|
|
106 | [10] | |
|
107 | 107 | |
|
108 | 108 | This function splits a bit strangely primarily to avoid changing the behavior of |
|
109 | 109 | the test after a bug was fixed with how split/commit --interactive handled |
General Comments 0
You need to be logged in to leave comments.
Login now