~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: John Arbash Meinel
  • Date: 2005-06-28 22:19:00 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20050628221900-2ecec40914076c21
Some cleanup to the send_changeset work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    of the changeset.  The description can be read from a file with
22
22
    the --file FILE option.
23
23
    """
24
 
    takes_options = ['revision', 'message', 'file', 'diff-options']
 
24
    takes_options = ['revision', 'message', 'file']
25
25
    takes_args = ['to?']
26
26
 
27
 
    def run(self, to=None, message=None, revision=None, file=None,
28
 
            diff_options=None):
29
 
        from tempfile import TemporaryFile
 
27
    def run(self, to=None, message=None, revision=None, file=None):
30
28
        from bzrlib import find_branch
31
29
        from bzrlib.commands import BzrCommandError
32
 
        import gen_changeset
33
 
        import send_changeset
34
 
        import sys
35
 
        import StringIO
 
30
        from send_changeset import send_changeset
36
31
        
37
32
        if isinstance(revision, (list, tuple)):
38
33
            if len(revision) > 1:
47
42
            except:
48
43
                raise BzrCommandError('destination address is not known')
49
44
 
50
 
        if not revision:
51
 
            revision = b.revno()
 
45
        if not isinstance(revision, (list, tuple)):
 
46
            revision = [revision]
52
47
 
53
 
        send_changeset.send_changeset(b, revision, to, message, file,
54
 
                                      diff_options)
 
48
        send_changeset(b, revision, to, message, file)
55
49
 
56
50
class cmd_changeset(bzrlib.commands.Command):
57
51
    """Generate a bundled up changeset.