-
-
I know this is already done in the function, but I don't think str(revision) is needed. The revision should already be a string.
-
-
You might be able to simplify this: parts = [self.repository.path.strip("/")] if basedir: parts.append(basedir.strip("/")) parts.append(path.strip("/")) return "/".join(parts) It's becoming clear that we need our own version of the os.path functions so we can os.path.join this and force the separator to be "/".
-
I don't like this change, really. Feels like a hack. Also, I'm not sure basedir is what we really want, since this is not the base directory of a diff but rather a project name in the repository, right? I don't know bzr enough to really say one way or another. Maybe basedir is okay, but I don't want to make it a parameter of these functions. It should be able to be parsed out of the string instead. I think it would have to be anyway, because the common code is going to prepend it to the filenames.
Improved Bazaar SCM support
Review Request #668 — Created Dec. 15, 2008 and submitted
Improved BZRTool. The highlights are: * It no longer chokes on diffs with new files -- and it properly identifies them as such. * It pays attention to basedir. If you point Review Board to a bzr repo, you can use the basedir field to specify the branch to which your diff applies.
Created reviews & viewed their diffs against a bzr repo, including added, modified, and deleted files.
AO
- Change Summary:
-
* Added PRE_CREATION_TIMESTAMP class constant * Simplified __get_repo_path function * Removed unnecessary str() call in get_file()
- Diff:
-
Revision 3 (+36 -15)
AO
- Change Summary:
-
We've been using Review Board w/ Bazaar more the past few days, and as a result I have made further changes to Review Board's bzr support. The main thing is: no more converting from timestamps to revnos. It really isn't necessary, and makes the code simpler to just work with timestamps, and makes it work with all the diffs we discovered that it had trouble with. Using timestamps also makes it unnecessary to have basedir in parse_diff_revision, so that objectionable change has gone away. ;)
PL
-
-
I don't think this function is ever used (in any of the backends as far as I can tell). I noticed this because first you use a variable local_datetime and then later you call it local_timestamp. I was wondering what was going on, but it turns out this function just never gets called (as far as I can tell).