/[soft]/mga-gnome/trunk/mga-gnome
ViewVC logotype

Diff of /mga-gnome/trunk/mga-gnome

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3085 by ovitters, Sun Feb 26 20:21:16 2012 UTC revision 3086 by ovitters, Mon Feb 27 09:32:36 2012 UTC
# Line 447  def cmd_dep3(options, parser): Line 447  def cmd_dep3(options, parser):
447      p.add_dep3()      p.add_dep3()
448    
449  def cmd_package_new_version(options, parser):  def cmd_package_new_version(options, parser):
450      package = options.package      if options.upstream:
451            downstream, downstream_files = get_downstream_names()
452    
453            if options.package not in downstream:
454                print >>sys.stderr, "ERROR: No packages for upstream name: %s" % options.package
455                sys.exit(1)
456    
457            if len(downstream[options.package]) != 1:
458                # XXX - Make it more intelligent
459                print >>sys.stderr, "ERROR: Multiple packages for upstream name: %s" % options.package
460                sys.exit(1)
461    
462            package = list(downstream[options.package])[0]
463        else:
464            package = options.package
465    
466    
467    
468      root = os.path.expanduser(PKGROOT)      root = os.path.expanduser(PKGROOT)
469      cwd = os.path.join(root, package)      cwd = os.path.join(root, package)
# Line 505  def main(): Line 521  def main():
521      subparser = subparsers.add_parser('increase', help='Increase version number')      subparser = subparsers.add_parser('increase', help='Increase version number')
522      subparser.add_argument("package", help="Package name")      subparser.add_argument("package", help="Package name")
523      subparser.add_argument("version", help="Version number")      subparser.add_argument("version", help="Version number")
524        subparser.add_argument("-u", "--upstream", action="store_true", dest="upstream",
525                                           help="Package name reflects the upstream name")
526      subparser.add_argument("-s", "--submit", action="store_true", dest="submit",      subparser.add_argument("-s", "--submit", action="store_true", dest="submit",
527                                         help="Commit changes and submit")                                         help="Commit changes and submit")
528      subparser.set_defaults(      subparser.set_defaults(
529          func=cmd_package_new_version, submit=False          func=cmd_package_new_version, submit=False, upstream=False
530      )      )
531    
532      if len(sys.argv) == 1:      if len(sys.argv) == 1:

Legend:
Removed from v.3085  
changed lines
  Added in v.3086

  ViewVC Help
Powered by ViewVC 1.1.30