Mercurial > hg
comparison hgext/record.py @ 11238:a5922547b5cc
Merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 31 May 2010 13:55:47 +0200 |
parents | 49a07f441496 feb2a58fc592 |
children | 324cd681fa47 |
comparison
equal
deleted
inserted
replaced
11234:1ebe048902d9 | 11238:a5922547b5cc |
---|---|
294 _('&?')) | 294 _('&?')) |
295 r = ui.promptchoice("%s %s" % (query, resps), choices) | 295 r = ui.promptchoice("%s %s" % (query, resps), choices) |
296 ui.write("\n") | 296 ui.write("\n") |
297 if r == 7: # ? | 297 if r == 7: # ? |
298 doc = gettext(record.__doc__) | 298 doc = gettext(record.__doc__) |
299 c = doc.find(_('y - record this change')) | 299 c = doc.find('::') + 2 |
300 for l in doc[c:].splitlines(): | 300 for l in doc[c:].splitlines(): |
301 if l: | 301 if l.startswith(' '): |
302 ui.write(l.strip(), '\n') | 302 ui.write(l.strip(), '\n') |
303 continue | 303 continue |
304 elif r == 0: # yes | 304 elif r == 0: # yes |
305 ret = True | 305 ret = True |
306 elif r == 1: # no | 306 elif r == 1: # no |
378 | 378 |
379 d - done, skip remaining changes and files | 379 d - done, skip remaining changes and files |
380 a - record all changes to all remaining files | 380 a - record all changes to all remaining files |
381 q - quit, recording no changes | 381 q - quit, recording no changes |
382 | 382 |
383 ? - display help''' | 383 ? - display help |
384 | |
385 This command is not available when committing a merge.''' | |
384 | 386 |
385 dorecord(ui, repo, commands.commit, *pats, **opts) | 387 dorecord(ui, repo, commands.commit, *pats, **opts) |
386 | 388 |
387 | 389 |
388 def qrecord(ui, repo, patch, *pats, **opts): | 390 def qrecord(ui, repo, patch, *pats, **opts): |
417 non-interactive commit command such as 'commit' or 'qrefresh'. | 419 non-interactive commit command such as 'commit' or 'qrefresh'. |
418 | 420 |
419 After the actual job is done by non-interactive command, working dir | 421 After the actual job is done by non-interactive command, working dir |
420 state is restored to original. | 422 state is restored to original. |
421 | 423 |
422 In the end we'll record intresting changes, and everything else will be | 424 In the end we'll record interesting changes, and everything else will be |
423 left in place, so the user can continue his work. | 425 left in place, so the user can continue his work. |
424 """ | 426 """ |
427 | |
428 merge = len(repo[None].parents()) > 1 | |
429 if merge: | |
430 raise util.Abort(_('cannot partially commit a merge ' | |
431 '(use hg commit instead)')) | |
425 | 432 |
426 changes = repo.status(match=match)[:3] | 433 changes = repo.status(match=match)[:3] |
427 diffopts = mdiff.diffopts(git=True, nodates=True) | 434 diffopts = mdiff.diffopts(git=True, nodates=True) |
428 chunks = patch.diff(repo, changes=changes, opts=diffopts) | 435 chunks = patch.diff(repo, changes=changes, opts=diffopts) |
429 fp = cStringIO.StringIO() | 436 fp = cStringIO.StringIO() |