##// END OF EJS Templates
shelve: only save mq state if enabled...
Sean Farley -
r19885:6cc69617 default
parent child Browse files
Show More
@@ -156,11 +156,14 b' def createcmd(ui, repo, pats, opts):'
156 # check modified, added, removed, deleted only
156 # check modified, added, removed, deleted only
157 for flist in repo.status(match=match)[:4]:
157 for flist in repo.status(match=match)[:4]:
158 shelvedfiles.extend(flist)
158 shelvedfiles.extend(flist)
159 saved, repo.mq.checkapplied = repo.mq.checkapplied, False
159 hasmq = util.safehasattr(repo, 'mq')
160 if hasmq:
161 saved, repo.mq.checkapplied = repo.mq.checkapplied, False
160 try:
162 try:
161 return repo.commit(message, user, opts.get('date'), match)
163 return repo.commit(message, user, opts.get('date'), match)
162 finally:
164 finally:
163 repo.mq.checkapplied = saved
165 if hasmq:
166 repo.mq.checkapplied = saved
164
167
165 if parent.node() != nullid:
168 if parent.node() != nullid:
166 desc = parent.description().split('\n', 1)[0]
169 desc = parent.description().split('\n', 1)[0]
@@ -438,3 +438,18 b' test bookmarks'
438 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
438 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
439 $ hg bookmark
439 $ hg bookmark
440 * test 5:01ba9745dc5a
440 * test 5:01ba9745dc5a
441
442 shelve should still work even if mq is disabled
443
444 $ hg --config extensions.mq=! shelve
445 shelved as test
446 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
447 $ hg --config extensions.mq=! shelve --list
448 test (1s ago) create conflict
449 $ hg --config extensions.mq=! unshelve
450 unshelving change 'test'
451 adding changesets
452 adding manifests
453 adding file changes
454 added 1 changesets with 1 changes to 7 files
455 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now