1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 17:26:15 +02:00
Commit Graph

212 Commits

Author SHA1 Message Date
Marcus Hüwe
8d055f7990 - added OscConfigParser module:
OscConfigParser() behaves like a normal ConfigParser() object. The
  only differences is that it preserves the order+format of configuration entries
  and that it stores comments.
  In order to keep the order and the format it makes use of the ConfigLineOrder()
  class.
- removed .netrc cruft from the conf module
- other config cleanups
2008-08-07 16:40:55 +00:00
Dirk Mueller
1a3c80423a typo fix 2008-08-04 13:33:40 +00:00
Dirk Mueller
65e9011f00 - add support for listing submitrequests not in state New to
osc submitreq list
2008-08-04 13:20:29 +00:00
Marcus Hüwe
3c5847e054 - init: added support to initialize a project dir 2008-08-01 13:58:49 +00:00
Marcus Hüwe
0020074a8a - fix enhancement request #412157 (Add some guessing to "osc build")
- "osc build" can be called with the following arguments:
  * osc build [OPTS] PLATFORM ARCH BUILD_DESCR
  * osc build [OPTS] PLATFORM (ARCH = hostarch, BUILD_DESCR is detected automatically)
  * osc build [OPTS] ARCH (PLATFORM = build_platform (config option), BUILD_DESCR is detected automatically)
  * osc build [OPTS] BUILD_DESCR (PLATFORM = build_platform (config option), ARCH = hostarch)
  * osc build [OPTS] (PLATFORM = build_platform (config option), ARCH = hostarch, BUILD_DESCR is detected automatically)
2008-07-30 16:45:00 +00:00
Marcus Hüwe
5c062ea121 - fixed bug #412145 (typo) 2008-07-25 10:19:32 +00:00
Dirk Mueller
6792642166 - add "submitrequest" as an alias for "submitreq"
- add "submitrequest revoke" command to be able to
  delete submissions to projects one can't write to
2008-07-25 09:34:29 +00:00
Dirk Mueller
494381866d revert back to throwing the httplib2 error, to be
able to preserve http headers etc
2008-07-23 20:56:20 +00:00
Dirk Mueller
048414088f - implement --no-checks for osc build
- make osc submitreq succeed for submitting new packages
  (previously the develproject check caused it to abort prematurely)
2008-07-23 20:05:09 +00:00
Dr. Peter Poeml
b37af9ed4f add more information about aggregation of packages, and a link to the wiki page about it. 2008-07-17 17:46:21 +00:00
Dr. Peter Poeml
83862c1040 submitreq: add shortcut 'sr' for Darix 2008-07-09 20:38:49 +00:00
Dr. Peter Poeml
de0bb98200 add submitreq delete action (thanks to Dirk for the patch) 2008-07-09 15:22:18 +00:00
Marcus Hüwe
5b84831d25 don't expand/unexpand if the working copy has local modifications - this is an ugly workaround for #399247 but this way the working copy isn't screwed up 2008-07-04 12:54:02 +00:00
Marcus Hüwe
73fd228c14 - use apiurl from the storedir when running 'osc submitreq list/create' 2008-06-27 17:54:59 +00:00
Dirk Mueller
eb8a8bbc79 - support "submitreq list" also in a project
directory
2008-06-27 17:14:15 +00:00
Dirk Mueller
6d5dab90b4 list submitrequests in a sorted order.. newest first 2008-06-27 16:36:36 +00:00
Marcus Hüwe
5768e35047 - applied slightly modified version of Node's patch which added a --revision option to do_linkpac 2008-06-26 10:47:58 +00:00
Marcus Hüwe
927019a7eb - added initial support for involved projects/packages (the xpath predicate is stolen from the webclient;) ) 2008-06-24 15:07:44 +00:00
Dirk Mueller
3df4edb5bb update usage info 2008-06-24 09:39:39 +00:00
Dirk Mueller
aa0a6976cb guess the parameters of list if inside a working dir 2008-06-24 09:37:49 +00:00
Marcus Hüwe
be934cc16d - fix bug #400431 2008-06-18 14:34:30 +00:00
Dr. Peter Poeml
2bd196d8e3 - osc buildhist: change the output into a format which better matches actual RPM filenames.
- give commit message tempfiles a ".diff" suffix, so syntax highlighting might work in some editors
2008-06-17 06:12:48 +00:00
Dr. Peter Poeml
693987ac49 osc update: after update, reset the revision when updating multiple package.
Fixes "404: Not Found" type errors when updating an entire project. [bnc#399177]
2008-06-11 08:29:27 +00:00
Dr. Peter Poeml
f4228de56b osc wipebinaries: add missing check for commandline arguments, which could
cause a PACKAGE argument to be ignored
2008-06-11 08:01:10 +00:00
Dr. Peter Poeml
86ad9766b2 - make submit request possible without giving commandline arguments, under some
circumstances -- when there is a working copy, and the package is a source
  link, osc will figure out what's needed.
- don't stop submitrequests on packages that have a devel project defined, if
  the submit comes from that project.
- osc checkout: checkout of source links is now done in expanded form per
  default. --unexpand-link can be used to get the raw link file (and patches).
2008-06-06 12:04:34 +00:00
Dr. Peter Poeml
5438e4023a osc submitreq: look up the develproject of the target, and if there is one,
don't create the request, unless forced with --nodevelproject.
2008-06-03 15:01:01 +00:00
Dr. Peter Poeml
7641ed0c8c osc branch: add --nodevelproject 2008-06-03 13:16:55 +00:00
Dr. Peter Poeml
98090f8b09 make 'osc branch' show the actually created branch project name, not a guess one. 2008-06-03 12:43:52 +00:00
Dr. Peter Poeml
3f9b53ca6e osc branch: use --expand-link in the example that shows how to check out the
branched package
2008-05-26 13:12:05 +00:00
Dr. Peter Poeml
ac55bcaa5a make help of osc init clearer 2008-05-21 16:10:20 +00:00
Dr. Peter Poeml
d8245f5f36 - add osc branch command, using the branch API call to branch a package to
home:poeml:branches:PRJ/PKG
2008-05-21 15:49:00 +00:00
Dr. Peter Poeml
7e524fd442 - osc commit: open $EDITOR for commit message
- osc status: implement -q/--quiet switch
- osc deletepac: allow deletion of multiple packages at once
- osc info: slightly more verbose
- core.edit_message() added
- core.getStatus() accepts new "quiet" argument
- oscerr.UserAbort added
2008-05-21 13:44:49 +00:00
Tom Patzig
4476afafd7 -cosmetic changes for rprjresults and rresults
-show Legend for prjresults only, if there are also packages to show
2008-05-20 11:36:16 +00:00
Dr. Peter Poeml
d80c47c0b9 - osc maintainer:
-D devel_project, --devel-project=devel_project
                        define the project where this package is primarily
                        developed
- core: add addDevelProject() method
2008-05-20 08:29:54 +00:00
Tom Patzig
abb97eb595 -new command rprjresults, to show remote project results
-new command rresults, to show remote package results
2008-05-16 12:25:50 +00:00
Tom Patzig
abcb4f8489 - legend in prjresults is default enabled
- added status-filter and name-filter option to prjresults
2008-05-15 18:09:24 +00:00
Marcus Hüwe
34e7822bbb - added --baselibs option to osc build 2008-05-08 12:21:57 +00:00
Pavol Rusnak
afec162189 - added --keep-maintainers switch to copypac
(do not remove original maintainers and replace them with caller)
2008-04-30 12:28:25 +00:00
Dr. Peter Poeml
3018460596 Merged revisions 3774-3775,3779,3781-3782,3787,3789-3793,3798,3802,3805,3817-3822,3827,3829-3830,3837-3839,3841-3842,3848-3850 via svnmerge from
https://forgesvn1.novell.com/svn/opensuse/branches/buildservice/osc-exception-handling

........
  r3774 | poeml | 2008-04-22 17:39:45 +0200 (Tue, 22 Apr 2008) | 3 lines
  
  A first draft on implement systematic exception handling: 
  Add errors.py with some exceptions defined, and babysitter.py to handle them
........
  r3775 | poeml | 2008-04-22 22:34:12 +0200 (Tue, 22 Apr 2008) | 9 lines
  
  - new global options:
       --debugger         jump into the debugger before executing anything
       --post-mortem      jump into the debugger in case of errors
       -t, --traceback    print call trace in case of errors
  - traceback and post_mortem can also be set in .oscrc.
  - catch more errors (HTTPError).
  - make config accessible from outside of the Osc instance, by making it a class
    attribute
........
  r3779 | poeml | 2008-04-23 00:55:49 +0200 (Wed, 23 Apr 2008) | 5 lines
  
  - new global option:
       -d, --debug        print info useful for debugging
  - catch some more errors (HTTPError), with OscHTTPError which isn't very
    advanced yet.
........
  r3781 | Marcus_H | 2008-04-23 01:02:00 +0200 (Wed, 23 Apr 2008) | 2 lines
  
  - added OscConfigError class (just for testing).
  - small change in the signature of the OscBaseError constructor (actually we should get rid of the 'args' tuple because it will be deprecated sooner or later
........
  r3782 | Marcus_H | 2008-04-23 02:02:13 +0200 (Wed, 23 Apr 2008) | 2 lines
  
  - access the prg.conf.config dict in a save way - this way we avoid AttributeErrors if the prg.conf.config dict doesn't exist
  - in case of an configparser error we have to use the prg.options object directly (this was removed in r3781 by accident)
........
  r3787 | poeml | 2008-04-23 09:23:56 +0200 (Wed, 23 Apr 2008) | 4 lines
  
  - remove local exception handling from do_req
  - for HTTPError, print details (headers and response) when in debug mode
  - catch AttributeError
........
  r3789 | poeml | 2008-04-23 16:23:14 +0200 (Wed, 23 Apr 2008) | 4 lines
  
  - errors: add two new classes named OscWrongOptionsError and OscWrongArgsError
  - commandline: raise instances of the new errors in a number of places
  - commandline: add get_cmd_help() to Osc instance which returns the formatted help of a subcommand
........
  r3790 | Marcus_H | 2008-04-23 16:48:28 +0200 (Wed, 23 Apr 2008) | 4 lines
  
  - added 2 new exception classes: OscNoConfigfileError and OscIOError
  - added new method write_config() to the conf.py module: This method writes osc's configuration file
  - minor cleanups in the conf module
........
  r3791 | poeml | 2008-04-23 17:11:07 +0200 (Wed, 23 Apr 2008) | 3 lines
  
  small compatibility fix for r3790: try-except-finally isn't supported in
  python-2.4.2, thus do the same as try-except inside a try-finally.
........
  r3792 | poeml | 2008-04-23 17:37:53 +0200 (Wed, 23 Apr 2008) | 2 lines
  
  fix up the remaining places regarding handling of errors related to commandline parsing
........
  r3793 | poeml | 2008-04-23 17:40:34 +0200 (Wed, 23 Apr 2008) | 3 lines
  
  raise a NoWorkingCopyError in osc.core.store_read_project() in case of an
  IOError
........
  r3798 | Marcus_H | 2008-04-23 23:55:24 +0200 (Wed, 23 Apr 2008) | 1 line
  
  ported -r3797 from trunk
........
  r3802 | Marcus_H | 2008-04-24 11:00:55 +0200 (Thu, 24 Apr 2008) | 1 line
  
  ported -r3801 from trunk
........
  r3805 | poeml | 2008-04-24 12:52:30 +0200 (Thu, 24 Apr 2008) | 2 lines
  
  raise OscHTTPError in show_pattern_meta(), replacing local error handling
........
  r3817 | poeml | 2008-04-24 20:21:32 +0200 (Thu, 24 Apr 2008) | 9 lines
  
  - remove errors.OscHTTPError again.
    it seems simpler to use urllib2.HTTPError instead (and just add a specific
    error text message where appropriate, and re-raise)
  - for 404s, check out _which_ part was not found
    it is very ugly, but may be considered Good for pragmatic reasons
  - removed local exception handling and workaround for returned 500's from
    delete_package() and delete_project(), thereby getting rid of 4 possible exit
    points.
........
  r3818 | Marcus_H | 2008-04-24 22:36:17 +0200 (Thu, 24 Apr 2008) | 1 line
  
  - this check is superfluous because every HTTPError instance has a code attribute
........
  r3819 | poeml | 2008-04-25 00:39:39 +0200 (Fri, 25 Apr 2008) | 1 line
  
  remove a forgotten debug line from core.delete_project()
........
  r3820 | poeml | 2008-04-25 10:07:58 +0200 (Fri, 25 Apr 2008) | 2 lines
  
  - ditch local error handling from wipebinaries(), rebuild(), and abortbuild()
........
  r3821 | poeml | 2008-04-25 10:56:38 +0200 (Fri, 25 Apr 2008) | 2 lines
  
  It is never needed to import the exception module.
........
  r3822 | poeml | 2008-04-25 11:13:39 +0200 (Fri, 25 Apr 2008) | 4 lines
  
  - when going into the debugger with --post-mortem, always print a traceback before
    (thus implying -t)
  - do not jump into the debugger if not on a TTY, or working in interactive mode
........
  r3827 | poeml | 2008-04-25 13:07:46 +0200 (Fri, 25 Apr 2008) | 9 lines
  
  - add errors.OscWorkingCopyOutdated, which takes a tuple with three args:
    path to working copy, current rev, expected rev
  - add handler for urllib2.URLError errors to the babysitter
  - simplify the OscWrongArgsError and OscWrongOptionsError handlers, by removing
    the extra line "Sorry, wrong ..." that was printed before the messages given
    when the error was raised.
  - remove one more errors.OscHTTPError which was still there, and raise
    urllib2.HTTPError instead (show_package_meta())
........
  r3829 | poeml | 2008-04-25 14:19:10 +0200 (Fri, 25 Apr 2008) | 11 lines
  
  - comment some methods in osc.core which are used by nearly all do_* methods in
    osc.commandline
  - improve "is not a package/project dir" error messages, by printing the
    absolute path tried, instead of '.' for the cwd
  - make core.store_read_package() raise a proper NoWorkingCopyError instead of
    terminating
  - give attribution to things in babysitter.py copied from mercurial
  - prefix HTTPError exceptions with 'Server returned an error:'
  - remove obsolete local error handling from do_prjresults(), do_importsrcpkg(),
    do_repos()
........
  r3830 | poeml | 2008-04-25 14:29:35 +0200 (Fri, 25 Apr 2008) | 1 line
  
  catch IOError exceptions in the babysitter
........
  r3837 | poeml | 2008-04-25 17:27:36 +0200 (Fri, 25 Apr 2008) | 5 lines
  
  - do_remotebuildlog: raise errors for wrong arguments, remove exits
  - raise AttributeError in make_meta_url() instead of exiting
  - delete unused method core.delete_server_files()
  - replace exit call inside make_meta_url() with an AttributeError 
........
  r3838 | poeml | 2008-04-25 17:49:18 +0200 (Fri, 25 Apr 2008) | 1 line
  
  simplify the check in do_checkout if a project exists, by using show_project_meta() instead of meta_exists
........
  r3839 | poeml | 2008-04-25 18:31:26 +0200 (Fri, 25 Apr 2008) | 6 lines
  
  - commandline do_checkout(): change the order of the two checks, first do the
    (cheaper) check for existing directory
  - core.core checkout_package(): simplify the check in if the package
    exists, by using show_package_meta() instead of meta_exists
    Let it throw an exception, instead of using sys.exit().
........
  r3841 | Marcus_H | 2008-04-27 15:48:06 +0200 (Sun, 27 Apr 2008) | 5 lines
  
  - added 2 new exception classes: PackageError() and PackageExistsError. The PackageError() class is meant to be the base class for all subsequent package exceptions.
  - get rid of 2 sys.exit(1) calls
  - make the update() method of the Project() class safer: in any case we have to write the _packages file otherwise the package tracking will be screwed up.
  - minor fix in delPackage(): use getTransActPath() when printing out the filename
........
  r3842 | Marcus_H | 2008-04-27 16:52:55 +0200 (Sun, 27 Apr 2008) | 3 lines
  
  - make the commit() method safe: in any case we have to write the _packages file otherwise the package tracking will be screwed up.
  - removed another sys.exit(1): raise an exception if a package is missing when doing a commit. For now we use the PackageExistsError() exception but this might change in the future (updated description of PackageExistsError() according to this change)
........
  r3848 | poeml | 2008-04-28 12:46:45 +0200 (Mon, 28 Apr 2008) | 3 lines
  
  rename several error classes, dropping the "Osc" prefix, and "Error" suffix in
  cases where they don't really make sense.
........
  r3849 | poeml | 2008-04-28 12:57:32 +0200 (Mon, 28 Apr 2008) | 3 lines
  
  - rename osc.errors module to osc.oscerr, to make it easier to import it from
    other programs and have a crystal clear namespace
........
  r3850 | poeml | 2008-04-28 13:26:12 +0200 (Mon, 28 Apr 2008) | 2 lines
  
  split PackageExists exception class into PackageExists and PackageMissing
........
2008-04-28 16:37:44 +00:00
Dr. Peter Poeml
5d7df534ee submitreq show: fix the --diff option; the diff was shown reversed. (bnc#379519) 2008-04-28 09:39:07 +00:00
Marcus Hüwe
2440bed285 - added --job option to the do_build() command. (this option will be passed to build script) 2008-04-24 09:00:23 +00:00
Marcus Hüwe
4c6ce9ae56 - added new method getStatus() which calculates the status of certain packages
- cleaned up do_status() and added support for multiple project dirs (osc st prj_dir1 /path/to/prj_dir2 ...)
2008-04-23 21:51:24 +00:00
Marcus Hüwe
e9176c7513 - fixed bug #378752 (osc fails to delete patterns) 2008-04-10 21:04:17 +00:00
Marcus Hüwe
80ab6bf345 - fixed bug #359846:
the BUILD_DIST environment variable will be ignored by osc
- the following environment variables can still be used:
  # OSC_SU_WRAPPER overrides the setting of su-wrapper. 
  # OSC_BUILD_ROOT overrides the setting of build-root.
  # OSC_PACKAGECACHEDIR overrides the setting of packagecachedir.
  (now they're documented in the helptext)
2008-04-09 18:45:59 +00:00
Marcus Hüwe
a3f948dede - fixed bug #376285:
* make_dir() and checkout_package() got a new optionally 'prj_dir'     parameter. This parameter specifies in which dir we want to create new project/package dirs.
2008-04-02 15:30:44 +00:00
Dr. Peter Poeml
e62dd94cc0 copypac: make the server-side copy the default. But do a client-side copy if source and target are not on the same buildservice instance. 2008-04-02 14:36:23 +00:00
Marcus Hüwe
a20e354d07 - small apiurl fixes 2008-03-27 00:36:17 +00:00
Dr. Peter Poeml
3db9e6449c Link handling:
Add support for handling linked packages in expanded form. They can be checked
out, updated (expanding or unexpanding them), and built locally.
Missing: commit support.

Newly introduced options are:
- osc checkout: --expand-link 
- osc update: --expand-link and --unexpand-link 

Other changes:
- osc core: add show_upstream_xsrcmd5() method which returns the xsrcmd5 (if a
  linkinfo element exists only, of course)
- made updating of expanded sources work with package tracking, too.
2008-03-24 20:24:49 +00:00
Dr. Peter Poeml
64f3d8c55e submitreq show: if the target package doesn't exist, a diff cannot be produced. 2008-03-20 20:11:30 +00:00
Marcus Hüwe
3c3e961f4e - minor fix in createPackageDir
- osc mkpac only works when 'do_package_tracking' is enabled
2008-03-17 23:43:32 +00:00