• We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Right now I could use the following URL:

      projects/PROJECT_1/repos/rep_1/commits?until=refs/heads...

      to view branch history. There is no way to use non refs/heads branch or commitId as "until" value to view history starting from a particular commit or for a non-standard branch/tag.

      Let user use commit SHA-1 as "until" parameter" or branch ref other than one in the refs/heads.

      We need that, as new version of our SVN Mirror Add-On keeps track of unsynced commits by putting them into "refs/subgit/unsynced" namespace.

      For instance, unsynced commit could appear when user decides to mirror non-empty Git repository with a Subversion project, then, if there are branches already present in both repositories, those on the Git side will be moved to "refs/subgit/unsynced" namespace. Later user is provided with the UI where it is possible to review such branches and merge them back to repository or discard. Same situation could appear when user disables mirror and them enables it back when histories are already diverged - Git side will be moved to "refs/unsynced" namespsace then.

      For that to work smoothly we need two improvements - first is the one above (show history starting from a particular commit or from non refs/heads references) and second is to let pull request use arbitrary commit or non refs/heads branch as a source (this I'll put in a separate issue).

        1. ref.png
          ref.png
          32 kB

          Form Name

            [BSERV-7310] Allow to view history for arbitrary commit

            bain added a comment -

            I have merged a fix for this particular problem. However, its probably not going to give you everything that you want. Let me document exactly what the fix was:

            1. Passing a standard "refs/tags/tag" or "refs/heads/branch" will continue to work as before.
            2. Passing a commitId in will show the list from that commit.
            3. Passing a non standard like "refs/subgit/unsynced" will show the list at that commit. However, it will be shown as if the user had unreferenced the commit . For example this is what the UI looks like when I pass commits?until=refs/random/ref and refs/random/ref == 7288382abb721

            Stash only really handles refs for branches, tags, PRs correctly from the UI to the backend. When you pass in another REF we decided to resolve it to a commit to make this change small. If you need the UI to display your ref as a ref rather than a commit then it will probably have to be raised as a suggestion.

            bain added a comment - I have merged a fix for this particular problem. However, its probably not going to give you everything that you want. Let me document exactly what the fix was: Passing a standard "refs/tags/tag" or "refs/heads/branch" will continue to work as before. Passing a commitId in will show the list from that commit. Passing a non standard like "refs/subgit/unsynced" will show the list at that commit. However, it will be shown as if the user had unreferenced the commit . For example this is what the UI looks like when I pass commits?until=refs/random/ref and refs/random/ref == 7288382abb721 Stash only really handles refs for branches, tags, PRs correctly from the UI to the backend. When you pass in another REF we decided to resolve it to a commit to make this change small. If you need the UI to display your ref as a ref rather than a commit then it will probably have to be raised as a suggestion.

            One more thing to add is that ultimately we'd like to create (or let user create) pull request for the commit referenced by refs/subgit/unsynced/x reference.
            These references are unique for the lifetime of the mirror.

            Alexander Kitaev added a comment - One more thing to add is that ultimately we'd like to create (or let user create) pull request for the commit referenced by refs/subgit/unsynced/x reference. These references are unique for the lifetime of the mirror.

            Alexander Kitaev added a comment - - edited

            Thank you for your question.

            When handling "out-of-sync" mirror state (new changes has been added to SVN while mirror was disabled and those changes conflicts with new Git commits), our add-on creates "refs/subgit/unsynced" references for existing Git branches or tags that are about to be replaced by those from SVN.

            Each "unsynced" reference refers to a commit and we'd like to let user navigate to that reference (so, that reference name is visible)

            Each "unsynced" reference refers to a particular history of commits that, at certain point originates from the "standard" branch or tag. We'd like to let user navigate to that particular commit.

            I.e., if there are two branches (one refers to A (refs/heads/x), and second refers to F (unsynced)):

            A F < /refs/subgit/unsynced/x
            |  |
            B E
            |  /
            C 
            |
            D
            

            We then would like to let user navigate to C (E's parent) and to F.

            So an option to navigate to the history of a particular commit is vital and an option to navigate to the history of a particular reference is important.

            Thank you very much for working on that feature, I'd be glad to provide more information if necessary.

            Alexander Kitaev added a comment - - edited Thank you for your question. When handling "out-of-sync" mirror state (new changes has been added to SVN while mirror was disabled and those changes conflicts with new Git commits), our add-on creates "refs/subgit/unsynced" references for existing Git branches or tags that are about to be replaced by those from SVN. Each "unsynced" reference refers to a commit and we'd like to let user navigate to that reference (so, that reference name is visible) Each "unsynced" reference refers to a particular history of commits that, at certain point originates from the "standard" branch or tag. We'd like to let user navigate to that particular commit. I.e., if there are two branches (one refers to A (refs/heads/x), and second refers to F (unsynced)): A F < /refs/subgit/unsynced/x | | B E | / C | D We then would like to let user navigate to C (E's parent) and to F. So an option to navigate to the history of a particular commit is vital and an option to navigate to the history of a particular reference is important. Thank you very much for working on that feature, I'd be glad to provide more information if necessary.

            bain added a comment -

            For that to work smoothly we need two improvements - first is the one above (show history starting from a particular commit or from non refs/heads references) and second is ....

            kitaev Will your needs be met if Stash only allows seeing the history of a particular commit? Its not 100% clear to me if you need both the commit and the ref to work or if you are trying to say you only need one to work.

            bain added a comment - For that to work smoothly we need two improvements - first is the one above (show history starting from a particular commit or from non refs/heads references) and second is .... kitaev Will your needs be met if Stash only allows seeing the history of a particular commit? Its not 100% clear to me if you need both the commit and the ref to work or if you are trying to say you only need one to work.

              bbain bain
              6a57e6c370d0 Alexander Kitaev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: