Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46714

Add support for Mercurial's ShareExtension for subrepositories

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • mercurial-plugin
    • None

      The ShareExtension allows the .hg folder of a checkout to share it's store with other checkouts, thus reducing the disk usage (cf. JENKINS-11363). However, this isn't applied (yet) for subrepositories.

      So: for a simple repository "Repo" with one subrepository "Subrepo", i.e., 

      • Repo 
        • Subrepo

       Checkouts of "Repo" use the sharing and does not contain it's own .hg/store.

       The recursive checkout of "Subrepo" does have it's own .hg/store, no data is shared.

      Especially for large subrepositories, it would be nice if the .hg data could also be shared.

          [JENKINS-46714] Add support for Mercurial's ShareExtension for subrepositories

          Jesse Glick added a comment -

          Not something I am likely to ever touch. If you are able to produce a PR fixing this which (a) has test coverage demonstrating its effectiveness, (b) clearly does not introduce any risk to existing use cases, then that would be considered.

          Jesse Glick added a comment - Not something I am likely to ever touch. If you are able to produce a PR fixing this which (a) has test coverage demonstrating its effectiveness, (b) clearly does not introduce any risk to existing use cases, then that would be considered.

          kpop added a comment -

          I'm unsure if changes are required in the ShareExtension itself: it has been identified as a bug in hg itself (cf. https://bz.mercurial-scm.org/show_bug.cgi?id=5675 ). I'll keep this updated with the status of the hg issue.

          kpop added a comment - I'm unsure if changes are required in the ShareExtension itself: it has been identified as a bug in hg itself (cf. https://bz.mercurial-scm.org/show_bug.cgi?id=5675  ). I'll keep this updated with the status of the hg issue.

          kpop added a comment -

          A fix has been applied for hg to use the share extension with subrepositories (cf. https://www.mercurial-scm.org/repo/hg/rev/68e0bcb90357 ). However, it does not play nice with the repository caching because it still tries to access the remote repository and not the cache for subrepositories. Moreover, I've discovered that subrepositories are always downloaded completely from the remote server instead of using caches, even when the ShareExtension is disabled. Is this intentional, because the plugin does not (fully) support subrepositories (cf. JENKINS-4838)?

          kpop added a comment - A fix has been applied for hg to use the share extension with subrepositories (cf. https://www.mercurial-scm.org/repo/hg/rev/68e0bcb90357  ). However, it does not play nice with the repository caching because it still tries to access the remote repository and not the cache for subrepositories. Moreover, I've discovered that subrepositories are always  downloaded completely from the remote server instead of using caches, even when the ShareExtension is disabled. Is this intentional, because the plugin does not (fully) support subrepositories (cf.  JENKINS-4838 )?

            Unassigned Unassigned
            kpop kpop
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: