Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 27173:8a8f5d71a49a
graft: improve --continue abort message
before, if you ran hg graft --user ... --date ... --log ... revs,
and if it failed, it would suggest "hg graft --continue",
but if you did that, your --user / --date / --log options
were lost, because they were not persisted anywhere...
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 02 Dec 2015 06:33:52 +0000 |
parents | 4d61c847e06c |
children | 54ace3372f84 |
comparison
equal
deleted
inserted
replaced
27172:4d61c847e06c | 27173:8a8f5d71a49a |
---|---|
3865 # report any conflicts | 3865 # report any conflicts |
3866 if stats and stats[3] > 0: | 3866 if stats and stats[3] > 0: |
3867 # write out state for --continue | 3867 # write out state for --continue |
3868 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] | 3868 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] |
3869 repo.vfs.write('graftstate', ''.join(nodelines)) | 3869 repo.vfs.write('graftstate', ''.join(nodelines)) |
3870 extra = '' | |
3871 if opts.get('user'): | |
3872 extra += ' --user %s' % opts['user'] | |
3873 if opts.get('date'): | |
3874 extra += ' --date %s' % opts['date'] | |
3875 if opts.get('log'): | |
3876 extra += ' --log' | |
3877 hint=_('use hg resolve and hg graft --continue%s') % extra | |
3870 raise error.Abort( | 3878 raise error.Abort( |
3871 _("unresolved conflicts, can't continue"), | 3879 _("unresolved conflicts, can't continue"), |
3872 hint=_('use hg resolve and hg graft --continue')) | 3880 hint=hint) |
3873 else: | 3881 else: |
3874 cont = False | 3882 cont = False |
3875 | 3883 |
3876 # commit | 3884 # commit |
3877 node = repo.commit(text=message, user=user, | 3885 node = repo.commit(text=message, user=user, |