Re: Review Board 1.5 Released!
Hey Christian, Upgraded. A grand 'thank you for all the work but in to this' from here! Have a nice weekend - Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: How to create svn diff for a new file
Correct me if I'm wrong, but your script is useful when you want to put existing committed code as a whole up for review, right? Such as when you're doing a post-commit review for the first time of some code? Yup, correct. Having re-read the original question, I agree that if you want to review new code that has just been added (but not committed), post-review does the job. My script is for generating a full review (diff with left side blank) of already checked in code. - Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: How to create svn diff for a new file
post-review has the --revision-range argument, but this does not work (as far as I remember - or rather, last time I checked this some while ago), if you specify lower revision numbers than the initial. If you want do put whole files up for review, you'd normally want something ala: svn diff -r 0:HEAD but this yields: svn: Unable to find repository location for '' in revision 0 To work around this, I've created a small python script 'post-review- initial', which manually creates the diff and passes that to post- review. You can pass a number of files or dirs as arguments. The files must be added (not necessarily committed) to svn. Not really sure if this is the best / most elegant solution, but it works :). Here goes # --- #!/usr/bin/python import sys import os import os.path import subprocess from optparse import OptionParser DUMMY_FILENAME = '__dummy_non_existing_file' TMP_FILENAME = '__post_review_initial_tmp_file.diff' def get_files(paths): if not paths: paths = ['.'] files = [] for p in paths: if os.path.isdir(p): dir = p else: dir = os.path.dirname(p) _files = execute(['svn', 'list', '--recursive', p], split_lines=True) _files = [os.path.join(dir, file) for file in _files] _files = [os.path.abspath(f) for f in _files] for f in _files: if os.path.isfile(f): files.append(f) # return sorted list of files. convert to set and back to list to remove duplicates return sort_and_remove_duplicates(files) def sort_and_remove_duplicates(a): if a: a.sort() last = a[-1] for i in range(len(a)-2, -1, -1): if last == a[i]: del a[i] else: last = a[i] return a def create_file_diff(file): diff = execute(['diff', '-u', '--new-file', DUMMY_FILENAME, file], split_lines=True, ignore_errors=True) if not diff: return '' info = execute(['svn', 'info', file], split_lines=True) for l in info: if l.lower().startswith('url'): url = l.split(':',1)[1].strip() if l.lower().startswith('repository root'): repos_root = l.split(':',1)[1].strip() if l.lower().startswith('revision'): rev = l.split(':',1)[1].strip() if not url or not repos_root or not rev: raise Exception('Failed to get svn info for ' + file) url = url.replace(repos_root, '') diff.insert(0, 'Index: ' + url) diff.insert(1, '===') diff[2] = '--- ' + url + '\t(revision 0)' diff[3] = '+++ ' + url + '\t(revision %s)' % (rev) return '\n'.join(diff) def execute(command, env=None, split_lines=False, ignore_errors=False, extra_ignore_errors=()): if env: env.update(os.environ) else: env = os.environ.copy() env['LC_ALL'] = 'en_US.UTF-8' env['LANGUAGE'] = 'en_US.UTF-8' if sys.platform.startswith('win'): p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True, env=env) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, close_fds=True, universal_newlines=True, env=env) if split_lines: data = [line.rstrip('\n') for line in p.stdout.readlines()] else: data = p.stdout.read() rc = p.wait() if rc and not ignore_errors and rc not in extra_ignore_errors: raise Exception('Failed to execute command: %s\n%s' % (command, data)) return data def parse_options(args): parser = OptionParser(usage='%prog [-n] [dir1/file1] [dir2/ file2] [post-review options]', version='%prog ' + '0.02') parser.add_option('-n', '--output-diff', dest='output_diff_only', action='store_true', default=False, help='outputs a diff to the console and exits. Does not post') # Add options after files to args list (used for post-review) parser.disable_interspersed_args() (options, args) = parser.parse_args(args) return (options, args) def main(args): (options,args) = parse_options(args) files_dirs = [] post_review_args = [] for a in args: if a.startswith('-'): post_review_args.append(a) else: files_dirs.append(a) files = get_files(files_dirs) diff = '\n'.join([create_file_diff(file) for file in files]) if
Re: problem with post-review when mercurial and clearcase installed on server
Try doing a post-review -d to better understand what is going on. - Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Dependency problem?
Ah - well, that's the risk of using upgrading to some latest version :) - Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Dependency problem?
Try now (though, use the release, not a nightly. Need to rebuild nightlies.) Yup, working fine. Thanks for all the work you're putting in to this, Christian. -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: post-review
That reviewboard server url looks wrong. Try with post-review -d --server=http://company.reviewboard.com -- Jeppe On Jul 2, 1:23 am, rquit rhondafquita...@gmail.com wrote: Hello, I am trying to set up a demo of RB on Windows and I am stuck at 'post- review'. I get the following error: $ post-review -d p4 info repository info: Path: path:port, Base path: None, Supports changesets: True p4 counters Looking for ' \\company.reviewboard.com/' cookie in C:\PATH\Application Data\.post-review-cookies.txt Couldn't load cookie file: [Errno 2] No such file or directory: 'C:\PATH\\Application Data\\.post-review-cookies.txt ' == Review Board Login Required Enter username and password for Review Board at http:\ \company.reviewboard.com/ Username: user Password: Logging in with username user HTTP POSTing to http:///\\company.reviewboard.com/\\company.reviewboard.com/api/json/accounts/login/: {'username': 'user', 'password': '*** ***'} Unable to access http:///\\company.reviewboard.com/\\company.reviewboard.com/api/json/accounts/login/. The host path may be invalid urlopen error no host given Any tips?? Thanks -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Misaligned Dashboard w/ 1.0.6
Are we sure this is resolved. Upgraded to 1.0.7, restarted apache and memcached but still see this problems occasionally (refreshing with shift+F5 seems to be a good way to reproduce). Have tried with both chrome and firefox. -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Misaligned Dashboard w/ 1.0.6
Hmm, perhaps I was a bit too fast on this. Did some more re-starting/ force-reloading and it seems to work correctly now. -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Misaligned Dashboard w/ 1.0.6
I can reproduce this too. Looks like a bug in the caching. I'll look into a fix tonight. There will probably be a bug fix release soon. Any update on this? We're running the latest released 1.0.6 and have this problem as well. -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en To unsubscribe, reply using remove me as the subject.
Re: Review Board 1.0.6 released
Hi Christian, First, thanks for your continued efforts building review-board. Your work is mush appreciated. I've just tried upgrading my 1.0.5.1 installation to 1.0.6. There seems to be a problem with django/memcached excepting plain 'str'-keys and rb/django now using unicode? b...@b49864:~$ sudo rb-site upgrade /var/www/reviewboard_a21/ Rebuilding directory structure Updating database. This may take a while. /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Upgrading Review Board from 1.0.5.1 to 1.0.6 Traceback (most recent call last): File /usr/local/bin/rb-site, line 8, in module load_entry_point('ReviewBoard==1.0.6', 'console_scripts', 'rb- site')() File /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6- py2.6.egg/reviewboard/cmdline/rbsite.py, line 1487, in main command.run() File /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6- py2.6.egg/reviewboard/cmdline/rbsite.py, line 1406, in run site.sync_database() File /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6- py2.6.egg/reviewboard/cmdline/rbsite.py, line 314, in sync_database self.run_manage_command(syncdb, [--noinput]) File /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6- py2.6.egg/reviewboard/cmdline/rbsite.py, line 353, in run_manage_command execute_manager(reviewboard.settings, [__file__, cmd] + params) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/__init__.py, line 362, in execute_manager utility.execute() File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/__init__.py, line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/base.py, line 195, in run_from_argv self.execute(*args, **options.__dict__) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/base.py, line 222, in execute output = self.handle(*args, **options) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/base.py, line 351, in handle return self.handle_noargs(**options) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/commands/syncdb.py, line 99, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/management/sql.py, line 205, in emit_post_sync_signal interactive=interactive) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/dispatch/dispatcher.py, line 166, in send response = receiver(signal=self, sender=sender, **named) File /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6- py2.6.egg/reviewboard/admin/management/sites.py, line 54, in init_siteconfig siteconfig.save() File /usr/local/lib/python2.6/dist-packages/Djblets-0.5.8-py2.6.egg/ djblets/siteconfig/models.py, line 120, in save self._last_sync_gen = cache.incr(cache_key) File /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/ django/core/cache/backends/memcached.py, line 49, in incr return self._cache.incr(key, delta) File /var/lib/python-support/python2.6/memcache.py, line 360, in incr return self._incrdecr(incr, key, delta) File /var/lib/python-support/python2.6/memcache.py, line 375, in _incrdecr check_key(key) File /var/lib/python-support/python2.6/memcache.py, line 878, in check_key raise Client.MemcachedStringEncodingError, (Keys must be str()'s, not memcache.MemcachedStringEncodingError: Keys must be str()'s, notunicode. Convert your unicode strings using mystring.encode(charset)! -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en To unsubscribe from this group, send email to reviewboard+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: Review Board 1.0.6 released
The problem looks similar to this old django bug: http://code.djangoproject.com/ticket/4845 I had a look in my /usr/local/lib/python2.6/dist-packages/Django-1.1.1- py2.6.egg/django/core/cache/backends/memcached.py In all functions, the key was wrapped by the django smart_str type, except for def incr(self, key, delta=1): return self._cache.incr(key, delta) def decr(self, key, delta=1): return self._cache.decr(key, delta) I changed these to def incr(self, key, delta=1): return self._cache.incr(smart_str(key), delta) def decr(self, key, delta=1): return self._cache.decr(smart_str(key), delta) .. the upgrade now runs fine -- just to learn no evolution was required :). -- Jeppe -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en To unsubscribe from this group, send email to reviewboard+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: Review Board 1.0.2 released
Hi Christian, As always, we're looking to fill out our page of Happy Users (http://review-board.org/users/), so if you use Review Board and can give us permission to list you, please let us know! You can add Bang Olufsen to your list happy users. -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Plans for upcoming 1.0 release party
Hi Christian, Not around your neighborhood at that time; live in Denmark :). Have a great party! Thanks for all your efforts in making review-board a very valuable contribution to toolbox of stuff that make us all write better code. -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Review Board 1.0 RC3 released
Got a few rb-site upgrade warnings that I usually do not see: sudo rb-site upgrade /var/www/reviewboard Rebuilding directory structure Updating database. This may take a while. /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Upgrading Review Board from 1.0rc2 to 1.0rc3 There are unapplied evolutions for reviews. There are unapplied evolutions for reviews. Project signature has changed - an evolution is required Project signature has changed - an evolution is required Installing json fixture 'initial_data' from '/usr/local/lib/python2.6/ dist-packages/ReviewBoard-1.0rc3-py2.6.egg/reviewboard/scmtools/ fixtures'. Installed 6 object(s) from 1 fixture(s) Evolution could not be simulated, possibly due to raw SQL mutations Evolution successful. ... but things seems to work fine. Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Default reviewers -- multiple repositories
I there some way to associate a default reviewer with a repository? The file path seems to be relative to the repository url, making it impossible to distinguish files from different repositories but with same relative path Example repos1: https://repos1.com/ repos2: https://repos2.com/ review request 1: repos1 trunk/somefile.cppshould have default reviewer group A review request 2: repos2 trunk/somefile.cppshould have default reviewer group B -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Mail features
You can go ahead and join groups with this method and still not receive emails. We only email people individually if there is no mailing list associated with the group. People can join the group but not the mailing list and shouldn't see the emails. We do not have an internal mailing list system, only lotus notes (sigh) groups which are created by the it-department. These are quite static and not something the individual users can change. I would therefore find it useful that users can configure this in review- board. -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Using rss feeds instead of emails
As an alternative to sending out emails, which we are discussing in another thered, I'd like to give this post a bump. Any inputs, thoughts? -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Mail features
I would find it useful to to be able to configure this independently for groups and people, such that a user can choose to be member of a particular group, but not receive any emails from review requests to that group, but only get emails if a review request is directed at the user (listed in people). Usecase: - We have a number of development teams, which each map to one or more reviewboard groups. I've setup default reviewers for the different groups based on the repository paths of the files in the review requests. We do it this way to make sure that all developers can easily stay orientated about different review requests that is relevant for them, and possibly comment if they feel like doing so. They should not (be forced to) receive emails about these group review requests. Mandatory reviewers are put in the peoples field, and these should normally receive emails. -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review : Review a single existing file in repository
Found yet another bug in the get_files function: -- def get_files(paths): if not paths: paths = [.] files = [] for p in paths: if os.path.isdir(p): dir = p else: dir = os.path.dirname(p) _files = execute([svn, list, --recursive, p], split_lines=True) _files = [os.path.join(dir, file) for file in _files] _files = [os.path.abspath(f) for f in _files] for f in _files: if os.path.isfile(f): files.append(f) # return sorted list of files. convert to set and back to list to remove duplicates return sort_and_remove_duplicates(files) Guess I'll stop spamming the list with this now --- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Poll: Now that IE8 is arriving...
Hi Christian, I believe IE6 is still the official company browser. However, virtually no developers use it. It's not an unreasonable requirement that users of reviewboard use a fairly new browser. -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review : Review a single existing file in repository
Hi, I'm interested in this feature as well On Apr 20, 10:04 am, Christian Hammond chip...@chipx86.com wrote: If your goal to start with is to put whole existing files up for review, you'd want to use a revision range of 0 to the latest version. Short of modifying post-review for this, you could use svn diff for the purpose and then upload through the web UI. I cannot get this to work. svn does not accept 0 as an initial revision number svn diff -r 0:HEAD file1.cpp svn: Unable to find repository location for 'file1.cpp' in revision 0 I need to supply it with the initial revision number of the file. Is there any other way to do this? Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review : Review a single existing file in repository
I couldn't really figure out how to do this the right way, but I needed the feature now, so I created a small python script that generates a unified diff directly, not using svn diff. initial-review.py [path] [path] ... review.diff Basically just like using post-review. Paths can be files or folders and must be under version control. For example, on the reviewboard svn: python initial-review.py reports setup.py review.diff Open the reviewboard site, create a New Review Request, Base Diff Path=/, Diff=review.diff Result: http://demo.review-board.org/r/1733/diff/ The script below has stuff borrowed from post-review.py, and is only tested sparsely on winxp, not tested on linux. It's basically a hack, but it works -- #!/usr/bin/python import sys import os import os.path import subprocess from optparse import OptionParser DUMMY_FILENAME = __dummy_non_existing_file def get_files(paths): if not paths: paths = [.] files = [] for p in paths: if not os.path.exists(p): raise Exception(Invalid path: + p) _files = execute([svn, list, --recursive, p], split_lines=True) if os.path.isdir(p): _files = [os.path.join(p, file) for file in _files] for f in _files: if os.path.isfile(f): files.append(f) return files def create_file_diff(file): diff = execute([diff, -u, --new-file, DUMMY_FILENAME, file], split_lines=True, ignore_errors=True) if not diff: return info = execute([svn, info, file], split_lines=True) for l in info: if l.lower().startswith(url): url = l.split(:,1)[1].strip() if l.lower().startswith(repository root): repos_root = l.split(:,1)[1].strip() if l.lower().startswith(revision): rev = l.split(:,1)[1].strip() if not url or not repos_root or not rev: raise Exception(Failed to get svn info for + file) url = url.replace(repos_root, ) diff.insert(0, Index: + url) diff.insert(1, ===) diff[2] = --- + url + \t(revision 0) diff[3] = +++ + url + \t(revision %s) % (rev) return \n.join(diff) def execute(command, env=None, split_lines=False, ignore_errors=False, extra_ignore_errors=()): if env: env.update(os.environ) else: env = os.environ.copy() env['LC_ALL'] = 'en_US.UTF-8' env['LANGUAGE'] = 'en_US.UTF-8' if sys.platform.startswith('win'): p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True, env=env) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, close_fds=True, universal_newlines=True, env=env) if split_lines: data = [line.rstrip(\n) for line in p.stdout.readlines()] else: data = p.stdout.read() rc = p.wait() if rc and not ignore_errors and rc not in extra_ignore_errors: raise Exception('Failed to execute command: %s\n%s' % (command, data)) return data def parse_options(args): parser = OptionParser() (globals()[options], args) = parser.parse_args(args) return args def main(args): args = parse_options(args) files = get_files(args) diff = ''.join([create_file_diff(file) for file in files]) print diff if __name__ == __main__: main(sys.argv[1:]) -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review : Review a single existing file in repository
Found a few bugs ... #!/usr/bin/python import sys import os import os.path import subprocess from optparse import OptionParser DUMMY_FILENAME = __dummy_non_existing_file def get_files(paths): if not paths: paths = [.] files = [] for p in paths: _files = execute([svn, list, --recursive, p], split_lines=True) if os.path.isdir(p): _files = [os.path.join(p, file) for file in _files] _files = [os.path.abspath(f) for f in _files] for f in _files: if os.path.isfile(f): files.append(f) # return sorted list of files. convert to set and back to list to remove duplicates return sort_and_remove_duplicates(files) def sort_and_remove_duplicates(a): a.sort() last = a[-1] for i in range(len(a)-2, -1, -1): if last == a[i]: del a[i] else: last = a[i] return a def create_file_diff(file): diff = execute([diff, -u, --new-file, DUMMY_FILENAME, file], split_lines=True, ignore_errors=True) if not diff: return info = execute([svn, info, file], split_lines=True) for l in info: if l.lower().startswith(url): url = l.split(:,1)[1].strip() if l.lower().startswith(repository root): repos_root = l.split(:,1)[1].strip() if l.lower().startswith(revision): rev = l.split(:,1)[1].strip() if not url or not repos_root or not rev: raise Exception(Failed to get svn info for + file) url = url.replace(repos_root, ) diff.insert(0, Index: + url) diff.insert(1, ===) diff[2] = --- + url + \t(revision 0) diff[3] = +++ + url + \t(revision %s) % (rev) return \n.join(diff) def execute(command, env=None, split_lines=False, ignore_errors=False, extra_ignore_errors=()): if env: env.update(os.environ) else: env = os.environ.copy() env['LC_ALL'] = 'en_US.UTF-8' env['LANGUAGE'] = 'en_US.UTF-8' if sys.platform.startswith('win'): p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True, env=env) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, close_fds=True, universal_newlines=True, env=env) if split_lines: data = [line.rstrip(\n) for line in p.stdout.readlines()] else: data = p.stdout.read() rc = p.wait() if rc and not ignore_errors and rc not in extra_ignore_errors: raise Exception('Failed to execute command: %s\n%s' % (command, data)) return data def parse_options(args): parser = OptionParser() (globals()[options], args) = parser.parse_args(args) return args def main(args): args = parse_options(args) files = get_files(args) diff = '\n'.join([create_file_diff(file) for file in files]) print diff if __name__ == __main__: main(sys.argv[1:]) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review : Review a single existing file in repository
Sorry, that probably should have been r1, actually. Nope, it seems the FROM revision (svn diff -r FROM:TO) must at minimum be the initial revision of the path diffs are gererated for. This gives a problem when diffing multiple paths since these often have different initial revisions. Then again, I might just be overlooking something in the subversion documentation Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Using rss feeds instead of emails
Hi, I've looked a bit on the existing feeds, and they seem to list only all (feeds/rss/r/all), pending for a user (/feeds/rss/users/username) or pending for a group (feeds/rss/groups/groupname). Would it be possible to use rss feeds to inform about updates that would normally go out via email when reviews are created, updated, commented on, etc.? That would be very useful and easy to integrate into a system tray rss feed reader. Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: Cleartool missing + Svn access issue ?
Filled http://code.google.com/p/reviewboard/issues/detail?id=1062 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review deployment
Hi Christian, Thanks for your reply. I am looking for a deployment that does not require any form of install. I would simply like to put all scripts and dependent tools (like gnu diffutils) in one folder -- that can be run from this folder with no install, zip it and distribute it like that. Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Re: post-review deployment
Ended up with patching the python distribution we are using for our scons build environment. Seemed like the easiest solution. Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Commenting on screenshots
I cannot get screenshot commenting to work. I can drag a green rectangle with the mouse, but no comment box appears as described here: http://review-board.org/docs/manual/dev/users/reviews/reviewing-screenshots/ If I do multiple click-and-drags with the mouse, I get multiple rectangles, all called 1 in the upper left corner. Have tried in both crome and firefox. Am I doing something wrong, is this a know issue or should I file a bug report? Thanks -- Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~--~~~~--~~--~--~---
Apache hangs when searching
Hi, My setup: ubuntu 8.10 Reviewboard 1.0 beta2 apache2 pylucene 2.4.1 (downloaded source from apache and built) python 2.5.2 Problem: When executing a search in the web interface of reviewboard, apache hangs/deadlocks, using 100% cpu. Issue 770 seems to be about the same problem (http://code.google.com/p/reviewboard/issues/detail?id=770), but is has been closed. Doing an strace on apache reveals a lot of lines ala the ones below here with viewing e.g. viewing a diff (which seems to work fine dispite all this): # strace output begin ## 15981 open(/usr/lib/python2.5/site-packages/django_evolution-0.0.0- py2.5.egg/array.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/django_evolution-0.0.0- py2.5.egg/array.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 stat64(/usr/lib/python2.5/site-packages/Django-1.0.2_final- py2.5.egg/array, 0xb6201f34) = -1 ENOENT (No such file or directory) .. 15981 open(/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2- py2.5.egg/uu.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2- py2.5.egg/uumodule.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2- py2.5.egg/uu.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2- py2.5.egg/uu.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 stat64(/usr/lib/python2.5/site-packages/Pygments-1.0-py2.5.egg/ uu, 0xb61fbd44) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Pygments-1.0-py2.5.egg/ uu.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Pygments-1.0-py2.5.egg/ uumodule.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Pygments-1.0-py2.5.egg/ uu.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Pygments-1.0-py2.5.egg/ uu.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 stat64(/usr/lib/python2.5/site-packages/Djblets-0.5beta1- py2.5.egg/uu, 0xb61fbd44) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Djblets-0.5beta1- py2.5.egg/uu.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Djblets-0.5beta1- py2.5.egg/uumodule.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Djblets-0.5beta1- py2.5.egg/uu.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/Djblets-0.5beta1- py2.5.egg/uu.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 stat64(/usr/lib/python2.5/site-packages/django_evolution-0.0.0- py2.5.egg/uu, 0xb61fbd44) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/django_evolution-0.0.0- py2.5.egg/uu.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) 15981 open(/usr/lib/python2.5/site-packages/django_evolution-0.0.0- py2.5.egg/uumodule.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) # strace output end ## When execute a search, apache2 hangs/deadlocks. strace reveals: # strace output begin ## 15981 open(/proc/self/maps, O_RDONLY) = 11 15981 fstat64(11, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 15981 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0xa9762000 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) 15981 read(11, 0xa9762000, 1024)= -1 EACCES (Permission denied) # strace output end ## The read - permission denied lines are repeated forever until apache is shut down. Any ideas to what my problem might be? Thanks -- Jeppe