Edgewall Software
Modify

Opened 16 years ago

Last modified 11 years ago

#342 new defect

[PATCH] Can't tell bitten which branch to use, when using monotone (TracMonotone)

Reported by: alien.technology+trac@… Owned by: osimons
Priority: major Milestone: 0.7
Component: General Version: dev
Keywords: monotone tracmtn bitten Cc: jhampton, sahendrickson@…, ninix@…
Operating System: Linux

Description

Using monotone as the VCS: When configuring the first build, there's no way to tell bitten which branch to use. When specifying a monotone branch, I get an error in the web interface:

No node /mybranch at revision 2c699fecba...

Using trac, bitten and Trac Monotone?. Also installed Web Admin? plugin as suggested on the bitten installation page.

Apart from that, Bitten seems to work really fine, but it seems to just pick one arbitrary repository revision to build, which isn't the branch I want to build. I guess it's using the latest check-in on any branch?

Also, it seems to build only one build regardless of how many revisions are in the repository, even though I've got master setting 'Build all revisions' set, so it's ignoring that setting.

Using: Trac-0.11.2.1, Genshi 0.51, tracmtn 65cc6f5a3ee53454c0232be02a6d63ba5c973fdb, bitten r562, Trac Web Admin?-0.1.2dev.

Attachments (11)

bitten-trac0.11-r571.patch (7.2 KB) - added by alien.technology+trac@… 16 years ago.
Patch on the experimental/trac-0.11 branch, revision r571 works with trac multirepos support
t342_multi_repos.patch (13.2 KB) - added by jhampton 15 years ago.
Corrected patch. Last one lacked the new util/repository.py file
t342_multi_repos.2.patch (12.4 KB) - added by jhampton 15 years ago.
Updated patch. Cleans up tests. Must apply on top of previous patch
t342_multi_repos_r742.patch (26.7 KB) - added by jhampton 15 years ago.
Updated patch against r742
t342_multi_repos_r777.patch (26.7 KB) - added by jhampton 15 years ago.
Updated patch against r777
t342_multi_repos_r880_trac_r9798_no_authz.patch (22.2 KB) - added by sahendrickson@… 14 years ago.
Updated patch works with bitten r880 and trac r9798. No svn.authz support yet
t342_multi_repos_r880_trac_r9798_no_authz_v2.patch (24.4 KB) - added by sahendrickson@… 14 years ago.
Updated patch (with missing file) works with bitten r880 and trac r9798. No svn.authz support yet
t342_multi_repos_r880_trac_r9798_no_authz_v3.patch (22.2 KB) - added by pferreir 14 years ago.
Corrected patch (self.env -> env)
t342_multi_repos_r880_trac_r9798_no_authz_v4.patch (24.4 KB) - added by anonymous 14 years ago.
add miss file bitten/util/repository.py
t342_multi_repos_r1007_trac_0.12.2.patch (19.7 KB) - added by kot4my@… 13 years ago.
t342_multi_repos_r1007_trac_0.12.2.patch
t342_multi_repos_r1010.patch (22.3 KB) - added by David Kühling <dvdkhlng@…> 13 years ago.
Rebased t342_multi_repos_r1007_trac_0.12.2.patch on top of r1010, added missing file util/repository.py from t342_multi_repos_r880_trac_r9798_no_authz_v4.patch

Download all attachments as: .zip

Change History (34)

comment:1 Changed 16 years ago by alien.technology+trac@…

btw, I've done python development, do you accept patches? Give me a rough idea of where I should be looking, I'm take a look.

comment:2 Changed 16 years ago by wbell

It's likely to be an issue related to how the queue code interacts with trac's view of the repository. Bitten should be using the revision timestamp (when it was checked in) in all cases, so you should be good there.

comment:3 in reply to: ↑ description Changed 16 years ago by anonymous

The method in Trac Monotone? which eventually ends up being called by Bitten has a FIXME note in it, and only returns a single revision, that being the latest one in the repository, so that seems implicated in the problem.

But this extends further, see some Trac-related discussions, see:

Monotone users will want to specify to Trac/Bitten? which branches should be studied, and that doesn't look possible at the moment.

I'll continue to hack around, but it looks like changes to some infrastructure in Trac/Bitten? would be needed to properly support monotone.

comment:4 in reply to: ↑ description Changed 16 years ago by alien.technology+trac@…

Following brief discussion on trac-dev, it's clear that the multirepos branch will make this a lot easier. I've got this working, and have 3 patches which get this working for me:

  • One on trac which would need to go on the multirepos branch (http://trac.edgewall.org/ticket/7920).
  • One on tracmtn, which I'll offer to the tracmtn developers.
  • One on bitten, which helps bitten understand the multirepos work.

Would it be possible to get an experimental branch going on bitten to mirror the multirepos work on trac, to kick off with this patch?

Changed 16 years ago by alien.technology+trac@…

Patch on the experimental/trac-0.11 branch, revision r571 works with trac multirepos support

comment:5 Changed 16 years ago by wbell

I can help setup the build. I'm still in a holding pattern waiting for permissions to be able to do higher level trac modifications (I can commit, but not rearrange/create branches.)

comment:6 Changed 16 years ago by anonymous

  • Summary changed from Can't tell bitten which branch to use, when using monotone (TracMonotone) to [PATCH] Can't tell bitten which branch to use, when using monotone (TracMonotone)

comment:7 Changed 16 years ago by anonymous

This patch was dependent on a patch offered to trac here: http://trac.edgewall.org/ticket/7920 but the patch wasn't accepted to trac. All the get_repository_by_path calls need to be changed:

 RepositoryManager(self.env).get_repository_by_path(path, authname)

comment:8 Changed 15 years ago by jhampton

  • Cc jhampton added

Attached an updated patch that works with the current multirepos (r8448) branch.

Additionally, it tests whether or not a multirepos install is present and adjusts accordingly.

The patch isn't complete, so there is still some breakage. I have managed to get configuration and running builds. If someone wants to help test, I would be appreciated.

Changed 15 years ago by jhampton

Corrected patch. Last one lacked the new util/repository.py file

Changed 15 years ago by jhampton

Updated patch. Cleans up tests. Must apply on top of previous patch

comment:9 Changed 15 years ago by jhampton

Cleaned up my patch. All tests now succeed. However, the multi-repos part isn't really being tested. I need to create a new suite of tests for that.

Note, patch must be applied on top of previous patch.

comment:10 Changed 15 years ago by osimons

  • Milestone changed from 0.6 to 0.6.1

Thanks for the patch, John! I'll target it for 0.6.1 tentatively while waiting for multi-repos completion and merge to trunk at the Trac project.

Changed 15 years ago by jhampton

Updated patch against r742

comment:11 Changed 15 years ago by jhampton

ok, updated patch against r742. No need for the other patches now. Simply svn up and apply the patch.

There are two tests failing. This is due to an API change in the way the version control subsystem handles the get_resource_url() call in 0.12-multirepos. The test is designed for 0.11, and when run on a box where 0.12-multirepos is installed, it fails, because the implementation has changed. I haven't thought of a good way of fixing the test. I'm open to suggestions.

Changed 15 years ago by jhampton

Updated patch against r777

comment:12 Changed 15 years ago by jhampton

Another updated patch. This time against r777. It's the full patch, so apply it to a clean checkout.

Fixed an issue with the Coverage links that was due to the new behavior of Resource('source') in the multirepos branch

Same tests still fail. Oh well.

comment:13 Changed 14 years ago by anonymous

Hello.

Can someone update this patch to work with the latest version of the track?

At the moment there are following error:

Attribute Error?: 'None Type?' object has no attribute 'id'

"d:/__server/python/lib/site-packages/bitten-0.7dev_r880-py2.6.egg/bitten/web_ui.py", 168, process_request

"d:/__server/python/lib/site-packages/bitten-0.7dev_r880-py2.6.egg/bitten/web_ui.py", 243, _render_overview

Trac 0.12dev-r9796, Bitten 0.7dev-r880

comment:14 Changed 14 years ago by sahendrickson@…

  • Cc sahendrickson@… added

I've updated the patch to work against bitten/trunk r880 & trac/trunk r9798.

I commented out the authz checks in bitten. I don't quite understand how these work in the new trac nor how bitten is using them. Hopefully, I can take a closer look later and fix that part.

But for now, this at least lets the two tools work together.

Changed 14 years ago by sahendrickson@…

Updated patch works with bitten r880 and trac r9798. No svn.authz support yet

comment:15 follow-up: Changed 14 years ago by ninix@…

  • Cc ninix@… added

Hi,

I think that in your patch (t342_multi_repos_r880_trac_r9798_no_authz.patch) the "bitten/util/repository.py" file is missing. So I used the one in t342_multi_repos_r777.patch, but got the following error (with Trac 0.12r9798):

2010-06-06 10:33:52,367 Trac[loader] ERROR: Skipping "bitten.admin = bitten.admin":
2010-06-06 10:33:52,368 Trac[loader] ERROR: Skipping "bitten.coverage = bitten.report.coverage":
2010-06-06 10:33:52,372 Trac[loader] ERROR: Skipping "bitten.master = bitten.master":
2010-06-06 10:33:52,375 Trac[loader] ERROR: Skipping "bitten.web_ui = bitten.web_ui":
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/loader.py", line 70, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.5/site-packages/setuptools-0.6c10-py2.5.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-x86_64/egg/bitten/web_ui.py", line 36, in <module>
  File "build/bdist.linux-x86_64/egg/bitten/master.py", line 29, in <module>
  File "build/bdist.linux-x86_64/egg/bitten/queue.py", line 32, in <module>
  File "build/bdist.linux-x86_64/egg/bitten/util/__init__.py", line 18, in <module>
  File "/var/trac/project/plugins/Bitten-0.7dev_r880-py2.5.egg/bitten/util/repository.py", line 60
     href = req.href.browser(*resource.id, annotate=annotate, rev=resource.version)
                                                  ^
SyntaxError: invalid syntax (repository.py, line 60))

I hope it will help to fix your patch,

Thanks

comment:16 in reply to: ↑ 15 Changed 14 years ago by sahendrickson@…

I think that in your patch (t342_multi_repos_r880_trac_r9798_no_authz.patch) the "bitten/util/repository.py" file is missing.

Oops, you're right :) I've added the missing file.

And... Thanks to jhampton for the original patch and work!

-- Scott

Changed 14 years ago by sahendrickson@…

Updated patch (with missing file) works with bitten r880 and trac r9798. No svn.authz support yet

comment:17 Changed 14 years ago by anonymous

What is star * supposed to do in repository.py line 60? (I don't know Python syntax)

href = req.href.browser(*resource.id, annotate=annotate, rev=resource.version)

It seems to be the cause of the issue in my previous comment. Using your last patch and by removing *, bitten seems to work again.

Thanks for the work ;)

Changed 14 years ago by pferreir

Corrected patch (self.env -> env)

comment:18 Changed 14 years ago by pferreir

Thanks a lot for this patch. I found a small mistake, I've just added the revised version (in _get_build_data, there's a self.env that should be env).

comment:19 Changed 14 years ago by anonymous

Thanks a lot.

Updated patch - add miss repository.py in t342_multi_repos_r880_trac_r9798_no_authz_v3.patch.

Changed 14 years ago by anonymous

add miss file bitten/util/repository.py

comment:20 Changed 13 years ago by kot4my@…

t342_multi_repos_r1007_trac_0.12.2.patch its result merge bitten_r1007, t342_multi_repos_r880_trac_r9798_no_authz_v4.patch, bittenforgit and other fix.

work also git repo through GitPlugin but only master branch

Changed 13 years ago by kot4my@…

t342_multi_repos_r1007_trac_0.12.2.patch

Changed 13 years ago by David Kühling <dvdkhlng@…>

Rebased t342_multi_repos_r1007_trac_0.12.2.patch on top of r1010, added missing file util/repository.py from t342_multi_repos_r880_trac_r9798_no_authz_v4.patch

comment:21 Changed 13 years ago by David Kühling <dvdkhlng@…>

  • Milestone changed from 0.6.1 to 0.7

Opened a separate ticket #765 for multi-repository support, as that doesn't really fit the title/topic here, which is originally about branch-names in Monotone. Latest patch t342_multi_repos*.patch copied over to the new ticket.

comment:22 Changed 11 years ago by osimons

Following #765 / [1016] I think the multi-repository support should be considered concluded - at least as defined by API support in Trac.

The main issue raised in this ticket remains open though, as we are not yet able to scope a configuration to a particular branch on the same repository path (the dvcs branching model). Hopefully, fixing this will be a simpler and cleaner task now with [1016] committed.

comment:23 Changed 11 years ago by osimons

  • Owner changed from cmlenz to osimons

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain osimons.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.