Mercurial > hg
comparison hgext/rebase.py @ 20248:3bff26f67169
rebase: improve error message for empty --source set
Before, it just said 'nothing to rebase' in this case. Now, it aborts
mentioning the reason: 'empty "source" revision set'.
Specifying revisions that cannot be rebased is a 'soft' error, but specifying
an empty set deserves an abort that explains exactly what the problem is.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 17 Nov 2013 18:21:58 -0500 |
parents | a259f7b488ab |
children | dc5157841361 |
comparison
equal
deleted
inserted
replaced
20247:a259f7b488ab | 20248:3bff26f67169 |
---|---|
224 if not rebaseset: | 224 if not rebaseset: |
225 raise util.Abort(_('empty "rev" revision set - ' | 225 raise util.Abort(_('empty "rev" revision set - ' |
226 'nothing to rebase')) | 226 'nothing to rebase')) |
227 elif srcf: | 227 elif srcf: |
228 src = scmutil.revrange(repo, [srcf]) | 228 src = scmutil.revrange(repo, [srcf]) |
229 if not src: | |
230 raise util.Abort(_('empty "source" revision set - ' | |
231 'nothing to rebase')) | |
229 rebaseset = repo.revs('(%ld)::', src) | 232 rebaseset = repo.revs('(%ld)::', src) |
233 assert rebaseset | |
230 else: | 234 else: |
231 base = scmutil.revrange(repo, [basef or '.']) | 235 base = scmutil.revrange(repo, [basef or '.']) |
232 rebaseset = repo.revs( | 236 rebaseset = repo.revs( |
233 '(children(ancestor(%ld, %d)) and ::(%ld))::', | 237 '(children(ancestor(%ld, %d)) and ::(%ld))::', |
234 base, dest, base) | 238 base, dest, base) |