Mercurial > hg
comparison hgext/shelve.py @ 20960:8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Using a fixed date makes hashes stable and makes debugging simpler. The date
and hashes of this changeset are normally not exposed.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 07 Apr 2014 23:10:20 +0200 |
parents | df33c9014430 |
children | 1df99f1ea28d |
comparison
equal
deleted
inserted
replaced
20959:b6e0616d08cb | 20960:8e5b21ce8ee9 |
---|---|
456 [('a', 'abort', None, | 456 [('a', 'abort', None, |
457 _('abort an incomplete unshelve operation')), | 457 _('abort an incomplete unshelve operation')), |
458 ('c', 'continue', None, | 458 ('c', 'continue', None, |
459 _('continue an incomplete unshelve operation')), | 459 _('continue an incomplete unshelve operation')), |
460 ('', 'keep', None, | 460 ('', 'keep', None, |
461 _('keep shelve after unshelving'))], | 461 _('keep shelve after unshelving')), |
462 ('', 'date', '', | |
463 _('set date for temporary commits (DEPRECATED)'), _('DATE'))], | |
462 _('hg unshelve [SHELVED]')) | 464 _('hg unshelve [SHELVED]')) |
463 def unshelve(ui, repo, *shelved, **opts): | 465 def unshelve(ui, repo, *shelved, **opts): |
464 """restore a shelved change to the working directory | 466 """restore a shelved change to the working directory |
465 | 467 |
466 This command accepts an optional name of a shelved change to | 468 This command accepts an optional name of a shelved change to |
551 if hasmq: | 553 if hasmq: |
552 repo.mq.checkapplied = saved | 554 repo.mq.checkapplied = saved |
553 | 555 |
554 tempopts = {} | 556 tempopts = {} |
555 tempopts['message'] = "pending changes temporary commit" | 557 tempopts['message'] = "pending changes temporary commit" |
558 tempopts['date'] = opts.get('date') | |
556 ui.quiet = True | 559 ui.quiet = True |
557 node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) | 560 node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) |
558 tmpwctx = repo[node] | 561 tmpwctx = repo[node] |
559 | 562 |
560 try: | 563 try: |