Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 23506:dc82f1a7436d
graft: give helpful warning for empty grafts
It was just showing a status message with the internal revision number.
Instead, show a warning like
note: graft of 27:3aaa8b6725f0 "28" created no changes to commit
(message tweaked in-flight by mpm)
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 09 Dec 2014 03:38:23 +0100 |
parents | bd5dbb8a05c8 |
children | 67045b5a903a |
comparison
equal
deleted
inserted
replaced
23505:bd5dbb8a05c8 | 23506:dc82f1a7436d |
---|---|
3493 | 3493 |
3494 # commit | 3494 # commit |
3495 node = repo.commit(text=message, user=user, | 3495 node = repo.commit(text=message, user=user, |
3496 date=date, extra=extra, editor=editor) | 3496 date=date, extra=extra, editor=editor) |
3497 if node is None: | 3497 if node is None: |
3498 ui.status(_('graft for revision %s is empty\n') % ctx.rev()) | 3498 ui.warn(_('note: graft of %s created no changes to commit\n') % |
3499 desc) | |
3499 finally: | 3500 finally: |
3500 wlock.release() | 3501 wlock.release() |
3501 | 3502 |
3502 # remove state when we complete successfully | 3503 # remove state when we complete successfully |
3503 if not opts.get('dry_run'): | 3504 if not opts.get('dry_run'): |