~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzrtools.py

  • Committer: Aaron Bentley
  • Date: 2006-02-21 05:51:15 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060221055115-d1a74f28c9016983
Fixed the push command

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bzrlib
27
27
import bzrlib.errors
28
 
from bzrlib.errors import BzrCommandError
29
28
from bzrlib.bzrdir import BzrDir
30
29
 
31
30
def temp_tree():
120
119
    >>> os.chdir(new_dir)
121
120
    >>> rsync("a", "b", silent=True)
122
121
    Traceback (most recent call last):
123
 
    RsyncNoFile: No such file...
124
 
    >>> rsync(new_dir + "/a", new_dir + "/b", excludes=("*.py",), silent=True)
 
122
    RsyncNoFile: No such file a
 
123
    >>> rsync("a", "b", excludes=("*.py",), silent=True)
125
124
    Traceback (most recent call last):
126
 
    RsyncNoFile: No such file...
127
 
    >>> rsync(new_dir + "/a", new_dir + "/b", excludes=("*.py",), silent=True, rsync_name="rsyncc")
 
125
    RsyncNoFile: No such file a
 
126
    >>> rsync("a", "b", excludes=("*.py",), silent=True, rsync_name="rsyncc")
128
127
    Traceback (most recent call last):
129
128
    NoRsync: rsyncc not found.
130
129
    >>> os.chdir(old_dir)
191
190
 
192
191
exclusions = ('.bzr/x-push-data', '.bzr/parent', '.bzr/x-pull-data', 
193
192
              '.bzr/x-pull', '.bzr/pull', '.bzr/stat-cache',
194
 
              '.bzr/x-rsync-data', '.bzr/basis-inventory', 
195
 
              '.bzr/inventory.backup.weave')
 
193
              '.bzr/x-rsync-data')
196
194
 
197
195
 
198
196
def read_revision_history(fname):
243
241
        push_location = location
244
242
    
245
243
    if push_location is None:
246
 
        if tree.branch.get_push_location() is None:
247
 
            raise BzrCommandError("No push location known or specified.")
248
 
        else:
249
 
            raise bzrlib.errors.MustUseDecorated
 
244
        raise bzrlib.errors.MustUseDecorated
250
245
 
251
246
    if push_location.find('://') != -1:
252
247
        raise bzrlib.errors.MustUseDecorated
289
284
 
290
285
    set_push_data(tree, push_location)
291
286
 
292
 
 
293
287
def short_committer(committer):
294
288
    new_committer = re.sub('<.*>', '', committer).strip(' ')
295
289
    if len(new_committer) < 2: