-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazaar repository support #15
base: master
Are you sure you want to change the base?
Conversation
* Assumes the version number is of the first line of the output. * Uses shellout * Uses class' instance variables instead of wide-scope class variables, because it's only referenced by class method. * Changed not to cache template_path because it isn't a heavy operation. closes #5117 Test-case-by: Toshi MARUYAMA <[email protected]>
* Now fetches nodeid. * Revision.identifier is omitted. This means to use scmid instead.
…and updated Bazaar adapter to always specify revid in commands
… to fix/update unit and functional tests
…r_and_fetch_changesets
It changes template keyword 'isodate' to 'isodatesec'. 'isodatesec' is supported since Mercurial 8999d1249171, which means Mercurial 1.0 has it. Tested-by: Yuya Nishihara <[email protected]> Tested-on: Redmine trunk r3840
In DVCS, changesets are not in date order. Because Mercurial backend inserts changesets from eariest, 'ORDER BY id' means 'order by revision number'. refs #4455 Signed-off-by: Yuya Nishihara <[email protected]> Tested-on: Redmine trunk r3840
…ry tests other than Bazaar and darcs (which was previously failing) are now passing
…need to add more functionality to tests
… to a requirement in the route
…ts for Bazaar adapter
…t id Signed-off-by: Yuya Nishihara <[email protected]> Test-written-by: Toshi MARUYAMA <[email protected]> Test-written-by: Yuya Nishihara <[email protected]>
It returns revision by default. It can be overriden by repository backends, e.g. Mercurial uses nodeid for identifier. Signed-off-by: Yuya Nishihara <[email protected]>
…n id * use first 8 chars of scmid or revision by default * "rev:scmid" for Mercurial
There was still bug of Bazaar diff controller action. http://github.com/marutosi/redmine/commits/bzr-hg-overhaul-mini-mq-c140cebc |
I'll pull those in. I'm also looking in to some display bugs for bazaar diff and annotate, I should have fixes for those tomorrow. |
I notice Bazaar diff is confusing. And I created a issue at our BTS. |
I fixed the diff display problem with Bazaar, this display problem was also happening with annotate, I've fixed that as well. I noticed though that I'm getting mercurial errors when running any of the mercurial unit or functional tests in the redminehelper.py file since I've pulled your changes, here is one of the errors: Redmine::Scm::Adapters::MercurialAdapter::HgCommandAborted: hg exited with non-zero status: 1 |
Thank you for your feedback. |
I notice bazaar annotate contains spaces and has routing problem. http://bitbucket.org/marutosi/redmine-hgsubversion-allbranches-clean/downloads/bzr-blame-1.png |
Thanks for catching that one. I've fixed the bug that was causing the spaces in the revision links on the annotate page. As far as the spaces on the display (not the link), it still looks like your bzr-blame-1.png graphic, but this is because the table cell's text-align is set to center, I didn't want to change this because I assume it works this way with other VCSes. |
Another note on this pull request. Like git, older revisions can be pulled/pushed in to the branch that Redmine is monitoring at any time, so viewing the repository which fetches the revisions 7 days before the most recent revision isn't enough, the rake test fetch_changesets can be called to get all revisions. However, unlike git, it's possible for previous revisions to get renamed. If you're always pulling in to the repository that Redmine is monitoring, instead of pushing in to it, you won't have this problem, but there's nothing preventing people from merging and pushing in to the repository which will rename revision numbers. I've added the rake redmine:clear_and_fetch_changesets task which clears out the repository and then fetches it. This is the only way to catch when existing revisions get renamed. I have this set up to run as a daily cron task on my server |
Mercurial diff 'rev1:scmid1:rev2:scmid2' is confused.
I merged and resolved conflict with Redmine SVN trunk. Brent, please pull my following new commit. |
I've pulled down all of your changes and pushed up to my fork. I do see that the repository_git_test and repository_svn_test unit tests are failing though, both have similar errors about the event title of an event from the activity fetcher not being correct. |
A month ago I had posted a message on the main Redmine forum about Redmine not working correctly with Bazaar when merges are performed on the repository:
http://www.redmine.org/boards/2/topics/17587
I've been working on modifying Redmine to read all revisions from a Bazaar repository, and believe I have a complete solution along with expanded test code for Bazaar. Toshi Maruyama made comments on a few of my commits and I incorporated his suggestions. I've also been using my changes on the Redmine server at my job with our ~500 revision Bazaar repository and all seems to be working well.
As far as technical details for my changes, I decided to add a "display_name" field to the revisions table. With Bazaar, all revisions have an internal ID that never changes, that is a combination of the author's email, a timestamp, and a hash tag. But it uses a simpler number for display, this is what I'm storing in display_name. A revision on the main branch just increments the revision number that is displayed , but when you merge, the revisions from the branch that you're merging with get renamed to x.x.x for display. Since this revision number for display can change after a merge, I only use display_name for display on the view, all controller and model code and all links use the internal ID, this is what I'm storing in the "revision" and "scmid" fields. Let me know if you have any other questions or suggestions for changes.