equal
deleted
inserted
replaced
628 """Clears include/exclude rules from the sparse config. |
628 """Clears include/exclude rules from the sparse config. |
629 |
629 |
630 The remaining sparse config only has profiles, if defined. The working |
630 The remaining sparse config only has profiles, if defined. The working |
631 directory is refreshed, as needed. |
631 directory is refreshed, as needed. |
632 """ |
632 """ |
633 with repo.wlock(): |
633 with repo.wlock(), repo.dirstate.parentchange(): |
634 raw = repo.vfs.tryread(b'sparse') |
634 raw = repo.vfs.tryread(b'sparse') |
635 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse') |
635 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse') |
636 |
636 |
637 if not includes and not excludes: |
637 if not includes and not excludes: |
638 return |
638 return |
706 |
706 |
707 Only one of the actions may be performed. |
707 Only one of the actions may be performed. |
708 |
708 |
709 The new config is written out and a working directory refresh is performed. |
709 The new config is written out and a working directory refresh is performed. |
710 """ |
710 """ |
711 with repo.wlock(): |
711 with repo.wlock(), repo.dirstate.parentchange(): |
712 raw = repo.vfs.tryread(b'sparse') |
712 raw = repo.vfs.tryread(b'sparse') |
713 oldinclude, oldexclude, oldprofiles = parseconfig( |
713 oldinclude, oldexclude, oldprofiles = parseconfig( |
714 repo.ui, raw, b'sparse' |
714 repo.ui, raw, b'sparse' |
715 ) |
715 ) |
716 |
716 |