~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revfile.py

  • Committer: mbp at sourcefrog
  • Date: 2005-04-09 05:26:51 UTC
  • Revision ID: mbp@sourcefrog.net-20050409052651-73d6952d368eb58574d2e50b
revfile add and add-delta commands print just the index for use by scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        only be used if it would be a size win and if the existing
226
226
        base is not at too long of a delta chain already.
227
227
        """
228
 
        
229
228
        text_sha = sha.new(text).digest()
230
229
 
231
230
        idx = self.find_sha(text_sha)
370
369
 
371
370
    if cmd == 'add':
372
371
        new_idx = r.add(sys.stdin.read())
373
 
        print 'added idx %d' % new_idx
 
372
        print new_idx
374
373
    elif cmd == 'add-delta':
375
374
        new_idx = r.add(sys.stdin.read(), int(argv[2]))
376
 
        print 'added idx %d' % new_idx
 
375
        print new_idx
377
376
    elif cmd == 'dump':
378
377
        r.dump()
379
378
    elif cmd == 'get':