GNOME Bugzilla – Bug 701973
Add new API methods to bzr
Last modified: 2013-06-14 22:51:11 UTC
Adds new API methods to bzr: * status_command, push_command, revert, push, update, get_files_to_commit
Created attachment 246473 [details] [review] Add new API methods to bzr
Review of attachment 246473 [details] [review]: Mostly looks good, but if you could limit dependencies between patches as much as possible that would be awesome. In particular, I'm uncomfortable with the RENAMED state at the moment. I imagine something like it will go in, but for now if we can keep this patch to one that I can apply without considering bigger issues then that would be awesome. ::: meld/vc/bzr.py @@ +46,1 @@ If you just remove the RENAMED state from here, bzr should just keep working as is, right? @@ +80,3 @@ + def status_command(self): + return [self.CMD] + self.CMDARGS + ["status", "-S", "--no-pending"] + This is a new thing, so shouldn't be in this patch. @@ +89,3 @@ + def push_command(self): + return [self.CMD] + self.CMDARGS + ["push"] + push_command isn't (and won't be) used elsewhere... see below. @@ +113,3 @@ + command = self.update_command() + runner(command, [], refresh=True, working_dir=self.root) + command = self.push_command() Please avoid reusing the _command() calls like this. I'd like to see those methods removed from our API completely; the ones that have been replaced are already gone from the git module. (You can't remove them from bzr.py until sensitivity setting is implemented... just don't add more calls to them.)
Created attachment 246585 [details] [review] Add new API methods to bzr
Removes any dependancies on previous patches - applies as is, and doesn't touch renamed. Added sensitivity settings (I'd written this but didn't include it in this patch) Means we can remove one of the _command methods. add/commit/diff to go!
Looks good to me! Pushed.