Rev 883: Merge support for -d option to the svn-push command. in file:///data/jelmer/bzr-svn/0.4.8/

Jelmer Vernooij jelmer at samba.org
Tue Mar 11 17:09:43 GMT 2008


At file:///data/jelmer/bzr-svn/0.4.8/

------------------------------------------------------------
revno: 883
revision-id:jelmer at samba.org-20080311170942-trfjr8wrqucpbojq
parent: jelmer at samba.org-20080311170730-cv11bp53lsoxzlk9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4.8
timestamp: Tue 2008-03-11 18:09:42 +0100
message:
  Merge support for -d option to the svn-push command.
modified:
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
=== modified file 'NEWS'
--- a/NEWS	2008-03-11 17:07:30 +0000
+++ b/NEWS	2008-03-11 17:09:42 +0000
@@ -12,6 +12,8 @@
 
    * Fix performance regression in sqlite queries.
 
+   * Add -d option to the svn-push command. 
+
 bzr-svn 0.4.7	2008-02-01
  
   FEATURES

=== modified file '__init__.py'
--- a/__init__.py	2008-03-11 17:00:47 +0000
+++ b/__init__.py	2008-03-11 17:09:42 +0000
@@ -281,15 +281,23 @@
     functionality is included in "bzr push".
     """
     takes_args = ['location?']
-    takes_options = ['revision', 'remember']
+    takes_options = ['revision', 'remember', Option('directory',
+            help='Branch to push from, '
+                 'rather than the one containing the working directory.',
+            short_name='d',
+            type=unicode,
+            )]
 
-    def run(self, location=None, revision=None, remember=False):
+    def run(self, location=None, revision=None, remember=False, 
+            directory=None):
         from bzrlib.bzrdir import BzrDir
         from bzrlib.branch import Branch
         from bzrlib.errors import NotBranchError, BzrCommandError
         from bzrlib import urlutils
 
-        source_branch = Branch.open_containing(".")[0]
+        if directory is None:
+            directory = "."
+        source_branch = Branch.open_containing(directory)[0]
         stored_loc = source_branch.get_push_location()
         if location is None:
             if stored_loc is None:




More information about the bazaar-commits mailing list