1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01:00
Commit Graph

560 Commits

Author SHA1 Message Date
Dirk Mueller
607ed31f97 - add news entry
- also list the http error code
2008-06-27 11:24:15 +00:00
Dirk Mueller
9eba706bd3 print the backend error code 2008-06-27 11:17:27 +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
Dirk Mueller
f16fb793e3 do not add _linkerror's to the project's working copy 2008-06-25 17:37:05 +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
Dirk Mueller
252e2a3e63 release is optional (doesn't exist on debian) 2008-06-23 08:38:05 +00:00
Dirk Mueller
1be2163733 double check the correctness of the build info for local build,
otherwise packages are stored incorrectly in the package cache
and that might cause problems later. Also refuse to build an
architecture locally that is not supported by the host architecture
2008-06-20 13:37:49 +00:00
Dirk Mueller
3fb7530028 add an API error type of class to throw 2008-06-20 13:36:45 +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
7ee4444b6b show error messages from the API also for type 500 errors 2008-06-16 19:12:24 +00:00
Dr. Peter Poeml
dd9d1cb49f osc build: handle exception when getting buildinfo fails, for cases != 404 2008-06-12 12:12:29 +00:00
Marcus Hüwe
7675c55242 fix and use comparePac() 2008-06-11 13:02:40 +00:00
Dr. Peter Poeml
7d8834a0a3 bump version to 0.104, adjust NEWS file 2008-06-11 08:34:39 +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
61e4cf6798 babysitter: The api returns error messages meanwhile. Thus, we don't need to
look up the reason of errors anymore.
2008-06-11 08:17:55 +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
Marcus Hüwe
da101858ee - fixed make_diff in order to avoid errors when committing a new package (created with mkpac) 2008-06-10 22:32:53 +00:00
Dr. Peter Poeml
bce87c182d - handle error resulting from unexpected zero-length .osc/_files metadata
by raising oscerr.NoWorkingCopy()
2008-06-10 10:15:49 +00:00
Dr. Peter Poeml
06c2cbf882 bump version to 0.103, adjust NEWS file 2008-06-06 12:09:00 +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
916346f8c6 Show the <summary> from the server reply's body also for 403 errors. 2008-06-06 10:55:17 +00:00
Dr. Peter Poeml
8362728a8e bump version to 0.102 2008-06-03 15:12:49 +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
5000e4e148 A less confusing version of the last fix. 2008-06-03 12:33:29 +00:00
Dr. Peter Poeml
65e4d5bdd1 when -d (global, for debug) was used, save the body because it can't be read twice 2008-06-03 12:31:41 +00:00
Dr. Peter Poeml
f8daea6288 bump version (0.101) and update NEWS file 2008-05-27 11:03:21 +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
bbe533087e improve error handling, by printing the <summary> given by the API for HTTP status code 400 (bad request) 2008-05-21 16:38:50 +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
Marcus Hüwe
3c5a25f1a5 - don't do any exception handling in the sync() method of the metafile() class. It's up to the caller what to do in case of an exception
- edit_meta(): raise an exception instead of printing an "useless" error message.
- make "osc meta prjconf <project> -e" work again (probably r3702 caused the problem)
2008-05-20 16:03:08 +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
Marcus Hüwe
aba87c08dd - added 'file_ext' key to the metatypes dict(). This key contains the filename extension for the particular metatype. This way we achieve that each metatype has the correct syntax highliting when running "osc meta -e <metatype>..." (e.g. prjconf => .txt, pkg => .xml etc.) 2008-05-20 09:23:57 +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
Dr. Peter Poeml
fd0c04477b - update version to 0.100
- decouple osc's version number from the versioning of the .osc storage
  directory data format. The latter gets __store_version__ = 1.0 now.
2008-05-19 14:56:59 +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
e69486bdc8 -in status-filter mode only show repos with the matching status
(in name-filter/or mixed  mode all repos are shown)
2008-05-16 11:15:41 +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
Dr. Peter Poeml
db6dcbe8a9 treat build status 'finished' as 'building' 2008-05-15 15:44:57 +00:00
Marcus Hüwe
34e7822bbb - added --baselibs option to osc build 2008-05-08 12:21:57 +00:00
Marcus Hüwe
3e0ba6285b - don't exit when there's nothing to do for a package (instead simply return)
- there's no need to catch SystemExit's when creating a new package or committing something
2008-05-08 11:55:32 +00:00
Michal Marek
25ab4d7af6 fix KeyError exception when a status is missing in the result 2008-05-05 12:27:34 +00:00
Marcus Hüwe
f041ee43ba - use absolute pathnames for preferred package dirs 2008-05-04 14:00:42 +00:00
Marcus Hüwe
602c146663 - return a real string instead of an tuple when invoking 'print' on the object 2008-05-03 18:25:24 +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
Dr. Peter Poeml
40642ecaf4 save cookies even in case of urllib2.HTTPError exceptions [bnc#378421] 2008-04-23 07:07:45 +00:00
Marcus Hüwe
a4f4488a50 - fixed KeyError when printing the new_conf_template 2008-04-22 22:43:00 +00:00
Dr. Peter Poeml
34b5b109ac remove osc.core.urlopen(), which is depracated since at least a year 2008-04-22 22:41:49 +00:00
Dr. Peter Poeml
5d6984ac64 remove code that was added in commit 3504 for debugging purposes, but never used.
(Bug https://bugzilla.novell.com/show_bug.cgi?id=369176, empty responses from
api.opensuse.org.)
2008-04-22 22:35:48 +00:00
Marcus Hüwe
a13e822838 - use "rev=upload" when deleting otherwise this would result in a double commit (if "rev=upload" is not specified bs_srcserver does a "real" commit and additionally osc sends a request do a commit => 2 commits) 2008-04-21 15:07:34 +00:00
Michal Marek
c4f7b89062 warn only once for each unknown status in 'osc prjresults' 2008-04-18 11:37:19 +00:00
61e2a77eb1 fix api call to request log file file. This was the legacy call, which
seems not to work anymore.
2008-04-14 07:07:08 +00:00
6debf60892 temporary workaround for cookie handling problem by Andreas 2008-04-12 08:04:41 +00:00
Michal Marek
0835580d59 Abort if meta_exists encounters an unexpected error (bnc#377693).
The correct fix is to propagate this to commandline.py and exit() there.
2008-04-11 10:49:43 +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
Dirk Mueller
5c064bc2c1 fix latent file descriptor leak in get_source_file() 2008-04-07 09:55:11 +00:00
Marcus Hüwe
d9ee2be26d - ignore dot packages too 2008-04-03 10:46:18 +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
Dr. Peter Poeml
cc02e878b0 change some places where queries are passed to makeurl(). Use dictionaries for
that, which causes makeurl() to automatically do the quoting work.
2008-04-02 14:07:40 +00:00
Dr. Peter Poeml
6e5d41f481 - a slight simplification -- rev=upload is always okay. 2008-04-02 12:54:26 +00:00
Dr. Peter Poeml
5e5ca2e020 implement committing with keeping links 2008-04-02 12:37:56 +00:00
Dr. Peter Poeml
11fa192b33 - ignore all dot files (the buildservice doesn't handle them)
- fix Project class (used by the "package tracking" code path)
  to use fnmatch.fnmatch() on the list of exclude expressions
2008-03-31 14:42:11 +00:00
Marcus Hüwe
a20e354d07 - small apiurl fixes 2008-03-27 00:36:17 +00:00
Dr. Peter Poeml
a0bae2ab52 osc update: fix diff3 merging for expanded links, by adding the revision to the
get_source_file() call in the mergfile method.
2008-03-26 16:11:11 +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
2fa94dcf23 core:
- add isexpanded() method to Linkinfo class
 - add isexpandedlink() method to Package class
 - read lsrcmd5 and srcmd5 from the linkinfo element, which are present in
   expanded links.
osc info: 
 - make it show info about expanded and non-expanded links
2008-03-22 17:37:17 +00:00
Dr. Peter Poeml
f5af255798 core: relax the revision id check, so that source md5 sums are accepted 2008-03-22 16:35:22 +00:00
Dr. Peter Poeml
892e644f59 - add Linkinfo class to osc.core
- Package class: 
  - add linkinfo when reading in package data via update_datastructs()
  - add islink() method
2008-03-22 13:37:59 +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
Dr. Peter Poeml
c2c406aab2 submitreq: adjust to renamed API calls and XML ("merge" -> "submit") 2008-03-20 19:17:40 +00:00
Marcus Hüwe
303e5dcffc - all necessary auth-information are available in the 'auth_dict' (so there's no need to fool around with the ConfigParser...) 2008-03-18 13:51:57 +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
Marcus Hüwe
3fdf758dbb - do_repos() should work in a project dir too 2008-03-17 23:24:28 +00:00
Dr. Peter Poeml
2493ea555a - copypac: do a server-side copy (via a single api call) when
used with -s / --server-side. 
  This might be the default behaviour later.
  An option to specify the source revision is missing yet.
2008-03-17 21:46:42 +00:00
Dr. Peter Poeml
8ce42e2dd9 change osc.core.pretty_diff() to call makeurl() with a query dict 2008-03-17 21:39:27 +00:00
Dr. Peter Poeml
140a331c40 Enhance osc.core.makeurl(). This function accepts a query parameter in form of
a list. The query can now also be given as a dictionary, and in that case it
will be automatically urlencoded. The behaviour for a list is unchanged for 
the reason of backward compatibility.
2008-03-17 21:10:34 +00:00
Dr. Peter Poeml
54c1690309 osc req: add option -a / --add-header to add arbitrary request headers 2008-03-16 20:46:16 +00:00
Dr. Peter Poeml
7b91075229 handle mmap failure on filesystems like NTFS, which may not support
memory mapping when mounted under Linux
2008-03-16 19:02:38 +00:00
Marcus Hüwe
5d57d7e299 - added 3 new methods:
* createPackageDir(): create and initialize a new package dir in
    the given project.
  * get_apiurl_usr(): returns the username for a certain apiurl
  * get_configParser(): returns an ConfigParser() object which can be
    used for parsing the ~/.oscrc file
- fixed username issues when creating a new package (the problem was
  that the username for the default host was used and not the one for
  that specific apiurl)
- some small fixes in the do_importsrcpkg() method
2008-03-15 22:51:37 +00:00
Marcus Hüwe
c307449167 - we only need the "<entry />" nodes - otherwise listing files of a linked package fails 2008-03-13 21:45:24 +00:00
Dr. Peter Poeml
e8899aa165 if there are no credentials for the apisrv in use (which may be specified with
-A on the commandline), don't try to set up config['user'] with credentials.
2008-03-13 16:15:41 +00:00
Pavol Rusnak
734973a0bd csv exported project results now use ';' as default 2008-03-13 11:13:22 +00:00
Dr. Peter Poeml
2bf92fce75 submitreq:
- when requesting a submit, save the source package's revision id (looking up
   what it currently is)
 - give the user a way to override it, to submit an older revision
 - when using show --diff, take the actual old revision into account. Thus, the
   diff is against the source revision of the time of request creation.
2008-03-12 23:37:35 +00:00
Dr. Peter Poeml
6ab8fb52c7 - remove remove obsolete, commented code (do_editpac(), do_editprj())
- fix a small tabbing issue
2008-03-12 18:26:41 +00:00
Dr. Peter Poeml
241f528dc4 implement a submitreq 'accept' action, resulting in the respective state change 2008-03-12 18:22:11 +00:00
Dr. Peter Poeml
8fc20cfc74 ...which doesn't work. There are other requests where 0-replies are possible. 2008-03-11 17:09:25 +00:00
Dr. Peter Poeml
dad51ee405 add a temporary debug path to http_debug() for bug 369176 (empty responses from api.opensuse.org) 2008-03-11 16:39:47 +00:00
Dr. Peter Poeml
3f244d4b23 remove two stray lines which sneaked into osc/build.py with the last commit 2008-03-11 15:34:42 +00:00
Jürgen Weigert
0334ea4218 add --debuginfo switch to osc build 2008-03-11 15:18:02 +00:00
Dr. Peter Poeml
c0fabfc449 merged the package-tracking branch changes r2404:3491 into the trunk. 2008-03-10 18:04:23 +00:00
Michal Marek
3613893199 better fix: use %(mapping keys)s in templates 2008-03-07 09:13:30 +00:00
Michal Marek
ad2493d496 fixed last change (r3445) 2008-03-07 09:01:13 +00:00
3e30545e7b define bugowner by default for new project/package (just part of the
template, can be removed by the user)
2008-03-07 08:24:48 +00:00
Dr. Peter Poeml
d87de082c2 submitreq:
- rename 'refuse' -> 'decline', which is more polite.
  - show: make the diff optional
  - add RequestState class
  - handle state history
  - implement 'decline' action
2008-03-06 10:25:45 +00:00
Dr. Peter Poeml
d63779a6a4 rename the new merge requests to submit requests 2008-03-05 23:51:48 +00:00
Dr. Peter Poeml
f52458fdc5 osc mergereq show: suppress requests which are deleted or declined 2008-03-05 21:41:30 +00:00
Susanne Oberhauser
b4df120e5b - adjust osc init docstring to new realities (osc meta instead of osc
createpac)
2008-03-05 21:05:17 +00:00
Dr. Peter Poeml
488e14a0d8 typo accepd -> accept 2008-03-04 23:48:34 +00:00
Dr. Peter Poeml
aec7129a9b - add a new subcommand 'mergereq' to handle merge requests. So far, it can
create, list, show requests.
- internally, add a MergeReq class, and do the needed (HTTP) requests.
2008-03-04 23:41:00 +00:00
Michal Marek
6c20c7203f fix importsrcpkg when $projectdir/.osc/_apiurl is an alternative apiurl 2008-03-03 13:51:01 +00:00
Marcus Hüwe
016c80db86 - added optional apiurl parameter to the following methods:
meta_exists, make_meta_url, checkRevision
  if no apiurl parameter is specified the global value (conf.config['apiurl'])
  will be used. This should fix bug #361764
- some small apiurl fixes in the make_diff method (the package_tracking branch already has this fix)
2008-02-18 13:44:20 +00:00
Michal Marek
3dd6ef0f71 added option --csv to 'osc prjresults' to output a CSV table 2008-02-12 12:45:06 +00:00
Dr. Peter Poeml
8d52b94a6f - osc build: if the build fails, print out the buildroot, so it it at hand for debugging 2008-01-24 18:18:03 +00:00
Dr. Peter Poeml
63e4d8da3c - osc build: add --no-verify, to skip the package signature verification step 2008-01-24 18:06:45 +00:00
Marcus Hüwe
0e9e76ea68 - build: use the apiurl which is stored in the storedir (.osc/_apiurl)
when running osc build.
  This should fix bug #355144
2008-01-23 19:37:44 +00:00
Dr. Peter Poeml
646be729e7 fix display of built rpms in build.py (when did that broke??)
thereby fixing osc build --keep-pkgs
2008-01-22 23:49:31 +00:00
Marcus Hüwe
f8b5963c7a - check if a project exists before initializing the project dir 2008-01-18 10:35:57 +00:00
Marcus Hüwe
2e263514f8 - return a list instead of a tuple (this was already fixed in the packaging-branch) 2008-01-17 19:33:02 +00:00
Marcus Hüwe
a8788c2c4e - added revision option to do_cat() 2008-01-15 18:58:58 +00:00
Marcus Hüwe
c6249087f9 fixed typo: borken -> broken 2008-01-11 16:44:08 +00:00
Marcus Hüwe
5306a78503 - added two new options to osc build:
* --local-package: use this option if you're trying to build a
    package which doesn't exist on the server
  * --alternative-project <project>: use this option to specify an
    alternative project if the current project doesn't exist on the
    server, e.g.: osc build [OPTS] --alternative-project openSUSE:10.3 standard i586 BUILD_DESCR
- some other minor cleanups in build.py
- get_repos_of_project() is now a generator function
2008-01-07 14:54:31 +00:00
Marcus Hüwe
53e1640b1e - added new command "remotebuildlog" to show the buildlog of a package
(you don't have to checkout the package to view the buildlog)
- renamed "get_log()" to "get_buildlog" to avoid any confusion with
  "get_commitlog()"
- added new method "print_buildlog()" which prints out the buildlog on the
  standard output
2008-01-03 22:10:16 +00:00
Marcus Hüwe
5242289d3d - do_cat(): do not print a newline (strip the trailing '\n' from string) 2007-12-13 12:00:16 +00:00
Marcus Hüwe
dbfcb32435 - fixed bug #347377
- other minor fixes in make_diff()
2007-12-13 11:31:31 +00:00
Dr. Peter Poeml
6781119d43 - cat: simplify the code a bit; don't print header and footer lines
- unification of the help output of some commands
2007-12-10 14:23:58 +00:00
Dr. Peter Poeml
7826163ca2 bugfix in build: in order to verify package signatures, run the external rpm
command with en_EN locale, because the output is being parsed
2007-12-10 14:10:40 +00:00
Dr. Peter Poeml
aca6c6979e cat: fix the test if the file is binary, which swallowed the first 4098 bytes 2007-11-30 10:28:00 +00:00
Dr. Peter Poeml
9aafba838f improve wording in rdiff documentation 2007-11-29 17:32:52 +00:00
Dr. Peter Poeml
620bc2ea68 add rdiff subcommand, to allow server-side diffs between arbitrary packages 2007-11-29 17:22:57 +00:00
Marcus Hüwe
d4bfd42bb4 - copied init_project_dir() method from the osc-package-tracking branch (just removed the do_package_tracking stuff)
- checkout an empty project instead of doing nothing
2007-11-29 12:54:07 +00:00
Marcus Hüwe
7b9f85f97f - reworked the diff functionality:
* some new things like showing newly added files
  * moved the whole code into a new methode (make_diff())
  * behave more like svn when doing a diff against a certain revision
- changed the storedir attribut of the Package() class to an absolute
  filename - normally this shouldn't have any impact on existing methods, functionality etc.
2007-11-26 18:13:51 +00:00
Marcus Hüwe
5518e15673 - make sure that the package meta has a <person> element and remove
all <person> elements from the orginal package (this change affects
  {link,aggregate,copy}_pac).
  Patch from Michal Marek <mmarek@suse.cz> - thanks!
2007-11-09 18:03:19 +00:00
Marcus Hüwe
69e3fd1d4e - added new "cat" command to print a file on the standard output 2007-11-02 18:18:30 +00:00
Dr. Peter Poeml
675901bc5d - aggregatepac: new command, similar to linkpac. Patch from Pavol Rusnak.
- prjresults: for newly added packages, build status may be missing. Cope with that.
2007-10-30 13:45:54 +00:00
Dr. Peter Poeml
420b9cf25c bump version to 0.99; update NEWS file 2007-10-30 11:47:06 +00:00
Marcus Hüwe
db692ce10e - fixed bug #259711 (do not create dirs for non-existing packages during checkout) 2007-10-27 20:19:12 +00:00
Marcus Hüwe
42e128687d - added --build-failed and --broken options to the do_wipebinaries()
method (this also fixes bug/enhancement #335498)
2007-10-27 19:13:24 +00:00
Marcus Hüwe
d0b0b1bdb5 enabled deletion of packages as the backend now supports it. 2007-10-13 23:15:49 +00:00
Marcus Hüwe
69b7e3bfc7 added a bit more functionality to do_maintainers. It is possible to add and delete users from a project/package 2007-09-12 18:01:13 +00:00
Dr. Peter Poeml
bd9ae2fd05 print the list of URL to try, when in HTTP debug mode 2007-09-10 12:22:13 +00:00
Marcus Hüwe
40d2ce205e - added verbose option to do_maintainers:
* it basically lists some more information about
    each maintainer
- replaced get_user_email() with get_user_data()
2007-09-03 16:18:37 +00:00
Dr. Peter Poeml
9ce40d4bab - build: allow to use lbuild, a compatible replacement for build 2007-09-03 14:52:45 +00:00
Dr. Peter Poeml
459651ed60 make osc call build with --changelog option, by default [#298436] 2007-09-03 10:25:18 +00:00
Dr. Peter Poeml
27cee26d4a new command 'maintainer' 2007-09-03 10:17:26 +00:00
Dr. Peter Poeml
1546410722 add get_user_email() function to osc/core 2007-09-03 10:17:04 +00:00
Dr. Peter Poeml
70524c88c7 fix typo in error message in do_importsrcpkg() 2007-08-27 18:02:53 +00:00
Dr. Peter Poeml
a3a2667742 - change conf.get_config() to take three optional override values:
get_config(override_conffile = None,
             override_http_debug = None,
             override_apisrv = None)
  Thus, it should be possible to use the osc module with one simple 
  conf.get_config() call. It is no longer required to set up the api url in the
  config dict, and call conf.init_basicauth().
2007-08-22 10:18:25 +00:00
Dr. Peter Poeml
106645a87b allow to specify a different config file via the environmental variable OSC_CONFIG 2007-08-22 08:30:53 +00:00
Dr. Peter Poeml
0da80f0fd9 - core: add get_binary_file(), with contribution from James Oakley
- ls command: add -b option to list binaries
- req command: show error response also for 404 responses
2007-08-16 18:15:08 +00:00
Dr. Peter Poeml
409e46c3b0 - add get_binarylist_published()
- no need for StringIO'ifying the file object
- remove a comment
2007-08-16 17:12:46 +00:00
Dr. Peter Poeml
458eb4f514 add get_binarylist() function. Works per project and per package 2007-08-16 10:28:32 +00:00
Marcus Hüwe
02d77c4bda fixed "osc build" if $BUILD_DIST is set 2007-08-15 19:28:08 +00:00
Dr. Peter Poeml
6c84b42333 bump version to 0.98 2007-08-14 11:49:43 +00:00
Dr. Peter Poeml
da6f6c4a8a build: add --changelog option to force update of the package changelog from a changes file 2007-08-14 11:26:13 +00:00
Dr. Peter Poeml
cdf91d7f39 commit: use the documented commit method by default now 2007-08-14 10:30:39 +00:00
Dr. Peter Poeml
5cd1ace719 don't hardcode 'package' query parameter into show_results_meta() 2007-08-11 12:29:38 +00:00
Dr. Peter Poeml
6298267101 meta: remove notion of non-implemented --create switch. give example for meta pkg usage 2007-08-09 16:15:13 +00:00
Dr. Peter Poeml
929fe9b12c search: add --repos-baseurl option 2007-08-09 11:35:08 +00:00
Marcus Hüwe
d75d98da50 fixed possible "UnboundLocalError". Thanks to judas_iscariote for spotting this issue! 2007-08-08 19:48:38 +00:00
Marcus Hüwe
003c3dad5b fixed two small typos 2007-08-08 15:44:14 +00:00
Dr. Peter Poeml
a5b0a50d28 https_proxy is not supported by urllib2. It only leads to an error or, at best,
a warning. Thus, unset https_proxy and HTTPS_PROXY in the environment, so
urllib2 doesn't trip over it.
https://bugzilla.novell.com/show_bug.cgi?id=214983
https://bugzilla.novell.com/show_bug.cgi?id=298378
2007-08-08 13:24:52 +00:00
Marcus Hüwe
4c136424fb fix for "osc prjconf <project> -e". 2007-08-04 21:11:31 +00:00
Marcus Hüwe
9921478c37 changed default behaviour of importsrcpkg(). The files will not be committed by default. To commit them use the --commit switch. 2007-07-30 18:11:52 +00:00
Marcus Hüwe
d6bdc3712f - some more work on importsrcpkg():
* by default the new files will be comitted
    (if it is a new package or if there are no
    source files on the server)
  * added --disable-commit option switch to
    import the package only locally
  * added --delete-old-files option switch to
    delete old files from the server.
- some changes in the Package class:
  * extended existing commit() method to do
    all the commit work (before it was done
    in the do_commit() method).
  * moved stuff from the constructor into a
    new method (update_datastructs()).
2007-07-30 11:12:42 +00:00
Marcus Hüwe
155d60cfa0 use rpm-python to detect the "Name:", "Summary:", "%description" of a (s)rpm.
This change speeds up some things
2007-07-29 15:27:27 +00:00
Dr. Peter Poeml
8316936fa5 allow to import source rpms by specifying an URL 2007-07-25 12:21:46 +00:00
Dr. Peter Poeml
633fd2c10f simplify do_importsrcpkg() 2007-07-25 12:14:32 +00:00
Dr. Peter Poeml
8fe9ac2ed1 add req command to issue arbitrary requests to the API 2007-07-25 10:56:04 +00:00
Dr. Peter Poeml
30b82a050e expand tilde to users home for packagecachedir in .oscrc [#293675] 2007-07-24 10:46:03 +00:00
Dr. Peter Poeml
31953fbbe4 append missing newline if do_commits=False [#293672] 2007-07-24 10:35:08 +00:00
Marcus Hüwe
63d6dede67 make delete_package() and delete_project() more userfriendly (added trivial exception handling..) 2007-07-23 16:31:02 +00:00
Marcus Hüwe
f36e3133c7 - added new importfromsrcpkg command:
* now a package can be imported from a
    src.rpm
  * thanks to Peter for his is_rpm() and is_srcrpm()
    methods
- split out some methods into smaller ones (so they
  can be reused for other tasks)
- added some new methods for unpacking a src.rpm
- changed read_meta_from_spec() method to be more
  flexible (it is possible to specify the tags and
  sections).
2007-07-23 16:03:30 +00:00
Dr. Peter Poeml
de9faebefe - meta: add --delete switch to delete pattern files
- complete last fix (don't implicitely add .xml to pattern files) -- forgot to
  commit the part in osc/core.py.
2007-07-19 12:23:42 +00:00
Dr. Peter Poeml
1945a7a683 - fix indentation (enforceming pattern file argument)
- don't implicitely add .xml to pattern files -- it will probably cause
  confusion.
2007-07-19 11:54:13 +00:00
Dr. Peter Poeml
a9dbc4bb1d fix error message which osc issues if build package is too old 2007-07-19 10:49:30 +00:00
Dr. Peter Poeml
ad9517cb81 meta: extend usage info for 'meta pattern' 2007-07-19 10:14:10 +00:00
Dr. Peter Poeml
04bd877a59 - meta: allow for editing patterns
# list patterns:
  osc meta pattern <prj>

  # show pattern foo:
  osc meta pattern <prj> foo

  # edit pattern foo:
  osc meta pattern <prj> foo -e
2007-07-19 10:08:42 +00:00
Dr. Peter Poeml
b1ca1e46ab results: result code can be empty when package has just been created 2007-07-19 07:42:19 +00:00
Dr. Peter Poeml
513255ccf7 fix name of 10.2 product in the template for new projects 2007-07-18 16:49:02 +00:00
Dr. Peter Poeml
d260050dc0 - commit (using the currently documented way): do DELETEs _before_ generating
an "upload" revision with PUTs. The DELETEs would be invalidated by the
  commit.
2007-07-18 13:20:59 +00:00
Dr. Peter Poeml
5c0b0d64b6 commit: flush stdout, so that the progress dots are seen directly when being written 2007-07-18 13:05:13 +00:00
Dr. Peter Poeml
05b47f7f98 - commit: switch to new commit mode also if the -F switch is used
- update NEWS file
2007-07-16 17:30:48 +00:00
Dr. Peter Poeml
b5e1dec8ad - api now sends HTTP/1.1 400 Bad Request for invalid xml. Thus, show the reply
body because it contains helpful info.
- repair linkpac for the new metadata editing facilities. copypac still seems
  to work.
2007-07-16 17:06:06 +00:00
Dr. Peter Poeml
5284a9b783 - meta: implement -F|--file switch. Can read from stdin to ease scripting.
- rework editmeta class, because it was programmed to pull content from the
  server first
- add a catch-all for the depracated commands which refers to the new meta command
2007-07-16 16:20:09 +00:00
Dr. Peter Poeml
4944828bf1 - improve usage info on meta command
- if PUT on metadata fails with a 500, and http_debug is True, print out the
  body of the server reply
- rename update_pacmeta() to update_local_pacmeta() for clarity
- rename update_filesmeta() to update_local_filesmeta() for clarity
2007-07-16 13:40:58 +00:00
Dr. Peter Poeml
3aa108d32a usage info for the meta command 2007-07-16 10:58:11 +00:00
Dr. Peter Poeml
9921fcac8e Switch from software.opensuse.org to download.opensuse.org as default
download URL
2007-07-16 09:45:17 +00:00
Marcus Hüwe
cf3727b70c - added initial search support (some ideas are taken from the webclient):
* when searching a package/project it
     is also possible to search for the search term
     in the <title /> and <description /> elements of
     a package/project.
   * show only exact matches
   * etc.
- please tell me if the usability is too "complex"
  or if the output of the results is too weird.
2007-07-15 13:49:13 +00:00
Dr. Peter Poeml
5a4f1e4d42 - new meta command, replacing editmeta, editprj, createprj, editpac, createpac,
edituser. TODO: 
    - write usage info
    - implement -c|--create
    - implement -F|--file
    - check whether I broke usage of metadata copying/creation from withing
      linkpac or copypac
    - re-implement createpac and friends as aliasses to the new meta command -- I
      just commented them out for now
- fix metadata change detection, which no longer relies on the timestamp of the
  temporary file
- add close() in dgst(), which seemed to miss (I can't see a reason why it
  should not be there0
2007-07-13 16:01:02 +00:00
Dr. Peter Poeml
9d2863b257 - log: convert commit messages to preferred output locale
- commit: new option -F/--file to read commit message from file
- commit: print committed revision number
- Package.commit(): return the new revision number
2007-07-13 10:02:35 +00:00
Marcus Hüwe
fd199c66e9 - added revision support for "osc log"
- some other minor fixes (a bit exception handling (some other methods should be improved too!) etc.)
2007-07-12 00:48:52 +00:00
Dr. Peter Poeml
7e98ecb0cb - renamed log command to buildlog (short: bl)
- implementing a provisionary log command for the commit log
- commit: implemented -m option for the commit message
- commit files together, if (and only if) do_commits = 1 is set in the 
  [general] section of .oscrc
2007-07-11 23:24:26 +00:00
Dr. Peter Poeml
abdbb7c11e updatepacmetafromspec: read spec files in utf-8, or whatever the preferred encoding is in the locale 2007-07-11 21:14:58 +00:00
Dr. Peter Poeml
4d612264e4 bump version (0.97); update NEWS file 2007-07-11 09:19:06 +00:00
Marcus Hüwe
44b1f5621c small fix for do_checkout() 2007-07-07 17:13:37 +00:00
Marcus Hüwe
44dd39c0c2 added some exception handling stuff to checkRevision() (thanks darix for the tip) 2007-07-06 15:54:10 +00:00
Marcus Hüwe
644f8695de added checkRevision() method to verify a revision 2007-07-06 11:54:34 +00:00
Dr. Peter Poeml
eaa08653e0 addremove: ignore foo.rXX, foo.mine for files which are in 'C' state 2007-07-06 11:20:30 +00:00
Dr. Peter Poeml
3b78077453 remove unneeded import statement 2007-07-05 15:12:30 +00:00
e6ae7ddde3 use new openSUSE:Factory name 2007-07-04 17:48:50 +00:00
Dr. Peter Poeml
9ee07fcd5a wipebinaries: allow to wipe all binaries of packages for which the build is disabled 2007-07-04 14:57:19 +00:00
Marcus Hüwe
a0f8f15190 updatepacmetafromspec scans for spec files automatically.
requested/suggested (or whatever) by darix
2007-07-04 13:48:24 +00:00
0629060b41 update template file. Introduce the the new flags, which are support by
build service in svn, but not yet deployed on api.opensuse.org
2007-07-04 12:59:18 +00:00
Marcus Hüwe
85e66362af added initial revision handling:
- extended "osc co prj pac" to checkout a specific revision of pac
    - extended "osc up" to update to a specific revision
    - extended "osc diff" to diff the working copy against a
      specific revision on the server. NOTE: comparing two
      server-side revisions (osc diff -r 11:12) is currently
      not supported!
2007-07-04 12:55:26 +00:00
Marcus Hüwe
adf9e633f9 added --specfile option to updatepacmetafromspec. Now the name of the spec can differ from the package name. 2007-06-30 15:39:47 +00:00
Dr. Peter Poeml
5f2e9ac766 - load subcommands from /var/lib/osc-plugins/ or ~/.osc-plugins/ 2007-06-29 18:26:30 +00:00
Dr. Peter Poeml
f54d26e61e rm: don't allow to mark files as deleted which are not under version control 2007-06-29 12:02:35 +00:00
Dr. Peter Poeml
6057f2c063 - linkpac: make this osc subcommand work again: sync metadata if edit_meta() is
called with change_is_required=False.
- linkpac: correctly set the destination project in the template used for the
  new package, although the api didn't seem to notice the mistake so far.
2007-06-28 14:17:13 +00:00
Dr. Peter Poeml
f3e5333267 handle empty prjresults (e.g. when no repositories are defined) 2007-06-26 14:32:49 +00:00
Dr. Peter Poeml
d5ba95193b log: fail gracefully if logfile can't be found 2007-06-26 14:22:23 +00:00
Dr. Peter Poeml
458ffb51cb fix return value of read_meta_from_spec() if specfile is missing 2007-06-26 13:56:02 +00:00
Dr. Peter Poeml
8c03ba4f8d ignore .swp files in working copies 2007-06-26 13:49:47 +00:00
Dr. Peter Poeml
a7158af067 - ls: add verbose option to print extra information for packages
- for ls, co, meta, editmeta, linkpac, copypac, rebuildpac, and wipebinaries
  (basically all the server-side commands), allow arguments "foo/bar" instead
  of "foo bar"
- add show_project_conf()
2007-06-26 13:17:38 +00:00
Dr. Peter Poeml
b832d0f1c2 build: don't stumble over an empty list of packages when trying to verify packages 2007-06-26 11:19:41 +00:00
Dr. Peter Poeml
7312db109c fix return values in metafile.sync() which I broke whey I applied Marcus Huewe's patch... 2007-06-22 12:36:13 +00:00
Dr. Peter Poeml
955c45868c Set correct Content-Type header on PUT requests (application/octet-stream).
Rails 1.2 seems to be more strict in this regard.
2007-06-21 15:14:15 +00:00
Dr. Peter Poeml
751bc409ac init: make usage (and usage info) info more precise 2007-06-21 09:40:47 +00:00
Dr. Peter Poeml
0cf26d0f06 - with small changes, apply a patch from Marcus Huewe:
- added wipebinaries command
  - added abortbuild command
  - improve handling of metadata editing if the server doesn't accept it
- rebuildpac: rename internal command for consistency reasons
- update NEWS file
2007-06-14 14:30:36 +00:00
Dr. Peter Poeml
e8ca5f0028 diff: if file doesn't end with newline, append one together with diffutils-like
comment line. Bug reported by Dirk Stoecker.
2007-06-14 09:39:00 +00:00
Dr. Peter Poeml
48349f67b9 adjust for change in build.rpm, where /usr/lib/build/debsort was removed. Look
for debtransform program instead in order to determine if build.rpm is new
enough.
2007-06-14 08:34:02 +00:00
Dr. Peter Poeml
fc6eaf68da - update cmdln.py to planned 1.0 version. The main changes are
related to points that were raised during employment in osc:

  # v0.8.3
  - Fix a bug where errors with passing an incorrect number of args to
    functions in do_foo() implementations would be masked.
  
  # v1.0.0
  - [backward incompat] `Cmdln.main()` no longer takes an `optparser`
    argument. Top-level option parsing has been changed so that top-level
    options for a `Cmdln` subclass can more naturally be defined and
    handled on the class definition. Changes:
    - `Cmdln.main()` calls `self.get_optparser` to get an option handler.
      Subclasses should overload this method for custom top-level options.
    - After option parsing, but before sub-command handling, the
      `self.postoptparse()` hook is called.
  - Add a `version` attribute on `Cmdln` subclasses. If set, the default
    top-level option parser will have a `--version` attribute.
  - [backward incompat] Simplify the StopProcessing/opts.stop handling for
    option handling in subcommands. The "opts" argument to "do_*"
    sub-command functions will no longer have a "stop" value.
    StopProcessing is now called StopOptionProcessing. This shouldn't
    affect simple usage of cmdln.py.
  
- adjust osc.commandline for these changes.
2007-05-16 10:55:05 +00:00
Dr. Peter Poeml
036a8780e2 results: remove obsolete code handling commandline arguments 2007-05-15 21:13:39 +00:00
Dr. Peter Poeml
1ce0b8a19d rebuildpac: fix mistyped repository parameter 2007-05-14 10:13:47 +00:00
Dr. Peter Poeml
c895de414e osc build: add --userootforbuild option 2007-05-14 08:29:50 +00:00
Dr. Peter Poeml
59cf753cc8 build: for buildinfo, post the specfile's content instead of its name... fixing introduced introduced with the last change 2007-05-12 20:18:23 +00:00
Dr. Peter Poeml
0d9278229c - don't need config['pass'] anymore
- but set config['user'], which was unset since the recent changes in auth handling
2007-05-10 14:29:04 +00:00
Dr. Peter Poeml
293d87dbe7 fix new_user_template, removing obsolete elements 2007-05-10 13:52:13 +00:00
Dr. Peter Poeml
cb61461fb4 - build & buildinfo:
- implement --extra-pkgs option
  - pass the list of extra packages to the backend, as "add=pkg" query parameters
  - use osc.core.get_buildinfo(), instead of os.system('osc buildinfo ...')
- implement adding query parameters to constructed URLs in a more generic way
2007-05-09 09:36:55 +00:00
Dr. Peter Poeml
a21f5c1891 don't try to delete projects, as long it is not implemented in the backend 2007-05-08 08:59:10 +00:00
Dr. Peter Poeml
4e39519efb use new API route for downloading binaries also in configured URLs 2007-05-07 20:14:20 +00:00
Dr. Peter Poeml
2c5e637693 make deletepac work again 2007-05-07 18:32:51 +00:00
Dr. Peter Poeml
0ab5e73ed9 use apiurl, not apisrv, in deleteprj and deletepac commands 2007-05-07 17:52:04 +00:00
Dr. Peter Poeml
90ca587cd0 - 0.96
- save api server url to .osc/_apiurl. This requires changing makeurl() and all
  calls to it.
- implement 'info' subcommand, essential for debugging these changes.
- use new api routes in all places
- buildhistory works again
- copypac: implement package copy from one buildservice instance to another
  (--to-apiurl option)
- the results subcommand handles <working copy> arguments now
2007-05-04 21:51:54 +00:00
Dr. Peter Poeml
1c6f303c70 add debugging hint to cmdln.py 2007-05-04 21:51:15 +00:00
Dr. Peter Poeml
5739a5c262 build: call rpm command for preferred rpms with --nosignature --nodigest 2007-05-04 21:40:35 +00:00
Dr. Peter Poeml
4a2c675e6e - build:
- rename --prefer-pacs option to --prefer-pkgs
  - implement --keep-pkgs option
2007-05-03 15:54:40 +00:00
Dr. Peter Poeml
22b72ac695 improve key import instructions after suggestion by Michael Wolf 2007-05-02 19:17:10 +00:00
Dr. Peter Poeml
877f8b5ad7 - build:
- implement --prefer-pacs option
  - finished the help text that I started last time
  - rename buildconf -> rpmlist for the sake of consistency
2007-05-02 13:49:57 +00:00
Dr. Peter Poeml
60bc70dc7a applied patch from Michael Marek, fixing all places where error messages were
printed to stdout instead of stderr. [#239404]
2007-04-25 21:10:49 +00:00
Dr. Peter Poeml
354c01be55 - build: fix passing of commandline options and arguments to build.main(),
which was still using sys.argv
- build: use own api server as upstream URL in urllist. So far,
  api.opensuse.org was hardcoded in the download URL [#265211].
2007-04-25 11:22:40 +00:00
Dr. Peter Poeml
b58b6e5a3f - fully implement accessing multiple API servers. "apisrv" in the config takes
a URL now, so the variable "scheme" which was needed in addition before
  becomes obsolete. For backward compatibility, a hostname (and scheme
  variable) are still accepted. Likewise, the auth sections in the config take
  a URL now, and a hostname:port to keep old config working.
  Furthermore, apisrv can be overridden by -A on the commandline. HTTP or HTTPS
  scheme is determined from the URL. Credentials must be configured in .oscrc.
2007-04-25 10:24:51 +00:00
Dr. Peter Poeml
36e4cc3140 initialize the auth handler with all configured credentials, so it is now
possible to use osc with different api servers by overriding apisrv on the
command line
2007-04-25 08:56:31 +00:00
Dr. Peter Poeml
2f5b52e92c Complete rewrite of the internal commandline handling, using cmdln.py.
Bump version to 0.95.

New features:
- implement "rebuild all failed packages", via --failed option in rebuildpac
  subcommand (new api route)
- status -v shows all files, including unmodified ones
- suppress the legend in prjresults by default (show with -l)
- add global options to override config
- can use arbitrary api server via global -A option
- -H enables HTTP traffic debugging
- --version

Bugfixes:
- fix typo in delete_project() (the line building up the URL got lost)
- fix the commit subcommand's arguments. This works correctly now: 
    osc ci ../test/onlyinwc `pwd` fstab ../test/f2 
- fix buildinfo subcommand, if no specfile is posted. Broke with the recent URL
  handling rewrite, but didn't seem to bother because the build subcommand
  always sends the specfile.
- try to fix buildhistory route, but it might be gone actually (need to pursue)
- add --clean/--noinit to osc build help output
2007-04-24 23:00:12 +00:00
Dr. Peter Poeml
637dec8e83 fix the download progress meter to be small enough to work with terminals 80 characters wide [#266989] 2007-04-24 21:10:01 +00:00
Dr. Peter Poeml
56f9752b8c save and reuse HTTP server cookies, speeding HTTP requests up about 5 times (in
our iChain setup anyway...)
2007-04-19 10:40:18 +00:00
Dr. Peter Poeml
8a3f251377 if data to be sent is large, mmap it instead of reading at once 2007-04-19 09:12:39 +00:00
Dr. Peter Poeml
c993a04c7c Rewrite the HTTP handling
- adding http_GET/POST/PUT/DELETE() functions, which dispatch to
   http_request(), and use them everywhere
 - removing othermethods.py 
 - keeping urlopen(), in case it is used from externally, but have it print out
   a "depracated" message
 - finally, implementing a global HTTP debug mode
2007-04-19 08:47:22 +00:00
Dr. Peter Poeml
1ecbbf9f23 further the osc buildroot configuration example 2007-04-18 00:26:14 +00:00