equal
deleted
inserted
replaced
970 """ |
970 """ |
971 revs = None |
971 revs = None |
972 if 'rev' in opts: |
972 if 'rev' in opts: |
973 revs = scmutil.revrange(repo, opts['rev']) |
973 revs = scmutil.revrange(repo, opts['rev']) |
974 |
974 |
|
975 bundletype = opts.get('type', 'bzip2').lower() |
|
976 btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} |
|
977 bundletype = btypes.get(bundletype) |
|
978 if bundletype not in changegroup.bundletypes: |
|
979 raise util.Abort(_('unknown bundle type specified with --type')) |
|
980 |
975 if opts.get('all'): |
981 if opts.get('all'): |
976 base = ['null'] |
982 base = ['null'] |
977 else: |
983 else: |
978 base = scmutil.revrange(repo, opts.get('base')) |
984 base = scmutil.revrange(repo, opts.get('base')) |
979 if base: |
985 if base: |
995 force=opts.get('force')) |
1001 force=opts.get('force')) |
996 cg = repo.getlocalbundle('bundle', outgoing) |
1002 cg = repo.getlocalbundle('bundle', outgoing) |
997 if not cg: |
1003 if not cg: |
998 scmutil.nochangesfound(ui, outgoing and outgoing.excluded) |
1004 scmutil.nochangesfound(ui, outgoing and outgoing.excluded) |
999 return 1 |
1005 return 1 |
1000 |
|
1001 bundletype = opts.get('type', 'bzip2').lower() |
|
1002 btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} |
|
1003 bundletype = btypes.get(bundletype) |
|
1004 if bundletype not in changegroup.bundletypes: |
|
1005 raise util.Abort(_('unknown bundle type specified with --type')) |
|
1006 |
1006 |
1007 changegroup.writebundle(cg, fname, bundletype) |
1007 changegroup.writebundle(cg, fname, bundletype) |
1008 |
1008 |
1009 @command('cat', |
1009 @command('cat', |
1010 [('o', 'output', '', |
1010 [('o', 'output', '', |