Show More
@@ -579,31 +579,31 b' def trackedcmd(ui, repo, remotepath=None' | |||||
579 | fm.end() |
|
579 | fm.end() | |
580 | return 0 |
|
580 | return 0 | |
581 |
|
581 | |||
582 | oldincludes, oldexcludes = repo.narrowpats |
|
582 | with repo.wlock(), repo.lock(): | |
|
583 | oldincludes, oldexcludes = repo.narrowpats | |||
583 |
|
584 | |||
584 | # filter the user passed additions and deletions into actual additions and |
|
585 | # filter the user passed additions and deletions into actual additions and | |
585 | # deletions of excludes and includes |
|
586 | # deletions of excludes and includes | |
586 | addedincludes -= oldincludes |
|
587 | addedincludes -= oldincludes | |
587 | removedincludes &= oldincludes |
|
588 | removedincludes &= oldincludes | |
588 | addedexcludes -= oldexcludes |
|
589 | addedexcludes -= oldexcludes | |
589 | removedexcludes &= oldexcludes |
|
590 | removedexcludes &= oldexcludes | |
590 |
|
591 | |||
591 | widening = addedincludes or removedexcludes |
|
592 | widening = addedincludes or removedexcludes | |
592 | narrowing = removedincludes or addedexcludes |
|
593 | narrowing = removedincludes or addedexcludes | |
593 |
|
594 | |||
594 | if update_working_copy: |
|
595 | if update_working_copy: | |
595 | with repo.wlock(), repo.lock(), repo.transaction( |
|
596 | with repo.transaction(b'narrow-wc'), repo.dirstate.changing_parents( | |
596 |
|
|
597 | repo | |
597 | ), repo.dirstate.changing_parents(repo): |
|
598 | ): | |
598 | narrowspec.updateworkingcopy(repo) |
|
599 | narrowspec.updateworkingcopy(repo) | |
599 | narrowspec.copytoworkingcopy(repo) |
|
600 | narrowspec.copytoworkingcopy(repo) | |
600 | return 0 |
|
601 | return 0 | |
601 |
|
602 | |||
602 | if not (widening or narrowing or autoremoveincludes): |
|
603 | if not (widening or narrowing or autoremoveincludes): | |
603 | ui.status(_(b"nothing to widen or narrow\n")) |
|
604 | ui.status(_(b"nothing to widen or narrow\n")) | |
604 | return 0 |
|
605 | return 0 | |
605 |
|
606 | |||
606 | with repo.wlock(), repo.lock(): |
|
|||
607 | cmdutil.bailifchanged(repo) |
|
607 | cmdutil.bailifchanged(repo) | |
608 |
|
608 | |||
609 | # Find the revisions we have in common with the remote. These will |
|
609 | # Find the revisions we have in common with the remote. These will |
General Comments 0
You need to be logged in to leave comments.
Login now