Show More
@@ -334,6 +334,11 b' def _docreatecmd(ui, repo, pats, opts):' | |||||
334 | extra['shelve_unknown'] = '\0'.join(s.unknown) |
|
334 | extra['shelve_unknown'] = '\0'.join(s.unknown) | |
335 | repo[None].add(s.unknown) |
|
335 | repo[None].add(s.unknown) | |
336 |
|
336 | |||
|
337 | if _iswctxonnewbranch(repo) and not _isbareshelve(pats, opts): | |||
|
338 | # In non-bare shelve we don't store newly created branch | |||
|
339 | # at bundled commit | |||
|
340 | repo.dirstate.setbranch(repo['.'].branch()) | |||
|
341 | ||||
337 | def commitfunc(ui, repo, message, match, opts): |
|
342 | def commitfunc(ui, repo, message, match, opts): | |
338 | hasmq = util.safehasattr(repo, 'mq') |
|
343 | hasmq = util.safehasattr(repo, 'mq') | |
339 | if hasmq: |
|
344 | if hasmq: | |
@@ -392,6 +397,9 b' def _isbareshelve(pats, opts):' | |||||
392 | and not opts.get('include', False) |
|
397 | and not opts.get('include', False) | |
393 | and not opts.get('exclude', False)) |
|
398 | and not opts.get('exclude', False)) | |
394 |
|
399 | |||
|
400 | def _iswctxonnewbranch(repo): | |||
|
401 | return repo[None].branch() != repo['.'].branch() | |||
|
402 | ||||
395 | def cleanupcmd(ui, repo): |
|
403 | def cleanupcmd(ui, repo): | |
396 | """subcommand that deletes all shelves""" |
|
404 | """subcommand that deletes all shelves""" | |
397 |
|
405 |
General Comments 0
You need to be logged in to leave comments.
Login now