1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-21 01:36:16 +02:00
Commit Graph

2827 Commits

Author SHA1 Message Date
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
Dr. Peter Poeml
36359996f0 remove debug print of tempfile name 2007-04-18 00:23:49 +00:00
Dr. Peter Poeml
162b52cc4d update: when updating multiple packages, print each package name 2007-03-29 21:53:38 +00:00
Dr. Peter Poeml
0ba494298e - build:
- use <bdep> preinstall attribute instead of obsolete <pdep> element
  - use <bdep> runscripts attribute and hand it over to build in the buildinfo
2007-03-28 23:37:34 +00:00
Dr. Peter Poeml
12e1f1b45d - results: quote parameter in the new URL
- prjresults: sort package names
2007-03-28 22:55:38 +00:00
Dr. Peter Poeml
7f4ed364f0 run build with --norootforbuild, thereby defaulting to build as abuild user 2007-03-21 00:29:10 +00:00
Dr. Peter Poeml
5f4640848e - when updating, don't delete files with local modifications
- add testcase
2007-03-19 13:30:59 +00:00
Dr. Peter Poeml
0204819a54 - use new api ['build', prj, '_result'] for prjresults subcommand 2007-03-13 00:17:28 +00:00
Dr. Peter Poeml
0b47b21719 - make 'results' subcommand many times faster, by making only a single request
on _result?view=status&package=%s (new api)
2007-03-12 23:21:34 +00:00
Dr. Peter Poeml
2e0927ddfd - apply fix from Christoph Thiel to use cElementTree from Python 2.5 2007-03-12 23:17:34 +00:00
Dr. Peter Poeml
76632513cc - apply fix from Christoph Thiel to use cElementTree from Python 2.5 2007-03-12 20:00:47 +00:00
Dr. Peter Poeml
03b1db05fb - let the diff subcommand return 1 if differences were found 2007-03-12 15:46:15 +00:00
Dr. Peter Poeml
3e82391e1f - fix important bug, which could lead to overwriting local modifications when
upstream changes are merged
- if a merge fails, the store copy must be updated neverthelesss
2007-01-23 06:55:43 +00:00
Dr. Peter Poeml
e6a65dab44 these two debug prints in osc/othermethods.py may be helpful sometimes (although the code is planned te be rewritten anyway) 2007-01-23 00:37:15 +00:00
Dr. Peter Poeml
9a944edfeb - sort output of 'status' (unknown files first, filenames alphabetically)
- fix the unit tests for the above change, and for api changes
2007-01-23 00:32:45 +00:00
Dr. Peter Poeml
a12c8e9b82 merge from Susannes branch (/branches/froh/reponator/)
* I extended the comments in the template with findings I had to dig
    through (how to switch the protocol and how to specify the port)
2007-01-12 03:53:44 +00:00
Dr. Peter Poeml
6274cf512b fix typo (Thanks Susanne) 2007-01-12 03:52:46 +00:00
Dr. Peter Poeml
da02db0c51 merge from branches/froh/reponator/:
* I moved edit_meta into an own class representing metadata.  that
    metadata is retrieved in the constructor, can be accessed as an
    elementree and can be synced back to the filesystem.

    I'm using that myself to update metadata and I changed the use of
    edit_meta to use that class.
2007-01-12 03:52:13 +00:00
David Mayr
885464d7a5 added commandline shortcut 'stat' for 'status', like in svn 2007-01-07 00:59:34 +00:00
David Mayr
6af51a1652 corrected little typo 2007-01-06 05:13:05 +00:00
Lars Vogdt
813125a8f6 - added links to the wiki pages for more details 2006-12-12 02:01:39 +00:00
Lars Vogdt
c9f3df6a51 - fix missing xml argument in documentation
- switched to SUSE_SLE-10 as example
2006-12-12 01:59:44 +00:00
Dr. Peter Poeml
cf852ae5db print usage info if 'co' is called without arguments 2006-10-18 22:30:53 +00:00
Dr. Peter Poeml
a94364d95b correct last fix: set scheme in DEFAULTS not in the comment. 2006-10-13 09:19:28 +00:00
Dr. Peter Poeml
4f61fc4bb0 set scheme=https in the default conf; add missing import sys in othermethods.py 2006-10-13 06:37:16 +00:00
Dr. Peter Poeml
3b96e4dfdf bump version (0.9); update NEWS 2006-10-12 13:30:33 +00:00
Dr. Peter Poeml
baafea955b - add 'edituser' command for editing the metadata of a user account. It tries
to create a user if it doesn't exist yet. A new command 'usermeta' replaces
  'id' respectively 'userid'.
- add preliminary support for doing uploads with a subsequent "commit" request
  (not switched on now, since I want to do more testing on this, and there is
  no way to pass on a commit message yet anyway.)
- add runtime check for build.rpm version, so the rpm package dependencies is
  no longer required
- fix typo introduced last time in the editmeta, deletepac, deleteprj commands
- rewrite the PUT and DELETE request methods to 
  - transparently handle HTTPS 
  - handle path parameters (for commits)
  - send user agent
- rename get_user_id() function to get_user_meta()
- change copyright notice from Peter Poeml to Peter Poeml / Novell Inc.
- fix testsuite
- add CREDITS file
2006-10-12 13:22:56 +00:00
Dr. Peter Poeml
39779ec9bc - rewrite configuration handling
- move all configuration code into module osc/conf.py
  - now, the API server can be configured in .oscrc with
    apisrv = ...
  - also, 'scheme' (http/https) is no longer a module variable but can be
    configured
  - all config is in DEFAULT
- ignore vim swap files
- use urllib() convenience wrapper in some functions that used
  urllib2.urlopen() and had their own error handling. Instead, it seems to make
  sense -- in the future-- to create our own errors and propagate them up, in
  cases where the error handling of urlopen() is too generic
- rename get_slash_source() to meta_get_project_list() for consistency
- show local time in get_buildhistory(), not UTC
- rewrite help text of 'rebuildpac' command
- allow to run commandline.py from the commandline (without the wrapper)
- don't send a space when doing a POST request without body
2006-10-10 14:04:34 +00:00
Dr. Peter Poeml
5f8fc4e340 - fix 'status <filename>'
- use filename matching to exclude files [#208969]
- add '.gitignore', '.pc', '*~' to ignore list
- add testcase
2006-09-29 14:34:18 +00:00
Dr. Peter Poeml
2b4a5ae46a - fix 'status' to work with project directories as arguments, and print proper relative pathnames
- fix testsuite, and add test for relative directories with 'status'
- add is_package_dir() method
- add pathjoin() method, similar to os.path.join but it removes a leading ./
2006-09-29 13:15:41 +00:00
Dr. Peter Poeml
03413a9e32 update NEWS and TODO 2006-09-29 10:37:53 +00:00
Dr. Peter Poeml
c758321df2 for large numbers of packages, group the results in chunks 2006-09-29 09:55:27 +00:00
f91bd60f3b do not trace, but exit with 1 on upload error 2006-09-26 09:02:00 +00:00
Dr. Peter Poeml
2321509096 - change 'buildhistory' to display human-readable text
- add 'deleteprj' command and delete_project() method. Note: the API server
  doesn't seem to support it yet.
- add 'prjresults' command to display aggregated build status over the entire
  project
- 'rebuildpac': accept additional repo and arch argument. Note: the syntax has
  changed.
- 'log': print usage info if called with missing arguments
2006-09-25 15:11:03 +00:00
Dr. Peter Poeml
c6d1d3917e - add 'copypac' subcommand, to copy a complete package to a new package, possibly cross-project
- don't die if user tries to 'add' a file which is already versioned
- don't die if 'addremove' encounters directories
2006-09-21 14:33:24 +00:00
Dr. Peter Poeml
79092b2a86 urlopen(): for server return code 500, print out the reply body 2006-09-18 16:53:55 +00:00
Dr. Peter Poeml
755a4e7626 be fair, and also mention dsc files 2006-09-18 16:45:59 +00:00
Dr. Peter Poeml
46b12c1df1 build: fix finding of built packages in the end of the build 2006-09-15 16:17:49 +00:00
Dr. Peter Poeml
41c2524691 fix dynamical build-root setting (r729) 2006-09-15 16:13:15 +00:00
Dr. Peter Poeml
b0011af9a8 build: error checking on external commands 2006-09-15 16:11:19 +00:00
Dr. Peter Poeml
26ef33195e change order of 'BUILD_ROOT', 'OSC_BUILD_ROOT' so the latter overrides the former 2006-09-15 14:35:09 +00:00
Dr. Peter Poeml
0631e8fcb1 - let environment variables OSC_SU_WRAPPER OSC_BUILD_ROOT override config values 2006-09-15 14:27:40 +00:00
Dr. Peter Poeml
51247e7a7c build: allow 'dynamical' build-root setting by using %(repo)s and %(arch)s 2006-09-15 14:26:09 +00:00
Dr. Peter Poeml
e877e12ffb - 'meta': more debugging output in case or failure: if the server
sends code 500 (internal server error), print out the used URL 
  and the ruby stack trace
2006-09-15 13:24:41 +00:00
Dr. Peter Poeml
5947848c81 bump version (0.8); update NEWS file 2006-09-15 13:23:28 +00:00
Dr. Peter Poeml
aa248dde9f - implement POSTing of local specfile to get real buildinfo
- extend urlopen() so it takes data for optional POST
  - extend get_buildinfo() to take optional specfile argument
  - osc.build.main: send specfile to server
  - buildinfo(): accept specfile as third argument, and document it
2006-09-15 11:47:34 +00:00
Dr. Peter Poeml
7a8c7664da add subcommands createpac/editpac and createprj/editprj, which wrap around editmeta but are more logical to find; fix help message of editmeta subcommand 2006-09-15 10:53:44 +00:00
Dr. Peter Poeml
7f592638be fix error message in meta_get_filelist() 2006-09-15 09:48:49 +00:00
Dr. Peter Poeml
768dcb9b4a implement 'deletepac' subcommand 2006-08-11 10:37:29 +00:00
Dr. Peter Poeml
36cc55b6fd - rename subcommand 'history' (which was not implemented yet) to
'buildhistory', and make it work. It still gives out raw xml, which might be
  changed
- add some help text to the linkpac documentation
- add '.git' to exclude_stuff
2006-08-10 16:39:13 +00:00
Dr. Peter Poeml
db81a4b07b - new subcommand: linkpac, to create a linked package
- extend edit_meta() with two arguments: template=new_package_templ, change_is_required=True
- increase BLOCKSIZE in othermethods.putfile() (1024 seemed a little small)
- extend othermethods.putfile() to serve a string buffer instead of a real file 
- for filelists, don't read _meta file any longer (depracated). Read directly
  from /source/<project>/
2006-08-07 10:08:54 +00:00
Dr. Peter Poeml
12b0c4bb99 - fix creation of packages, which did no longer work since the latest changes
in error handling (since editmeta needs to see the 404 to know that a package
  is to be created)
- insert a newline after 'missing argument' messages
2006-07-20 14:23:10 +00:00
Dr. Peter Poeml
5be1e292fc fix issue with uploading files -- in PUT requests, there was an additional newline inserted, which could lead to wrong interpretation of the payload if e.g. an intercepting web proxy was in between osc and the api server 2006-07-19 15:15:57 +00:00
Dr. Peter Poeml
c52baf09f7 fix usage of personality wrappers 2006-07-17 13:53:17 +00:00
Dr. Peter Poeml
686eb637c8 build: when called without arguments, show only architectures that can be built on the local machine 2006-07-17 13:38:37 +00:00
Dr. Peter Poeml
b69ae796cc add info about build subcommand to README 2006-07-17 13:15:42 +00:00
Dr. Peter Poeml
ea106f0b05 fix osc/__init__.py to contain new modules 2006-07-17 13:15:21 +00:00
Dr. Peter Poeml
545222f9b7 build: make it possible to override urllist (the list of urls where packages are downloaded in the config file 2006-07-17 13:14:17 +00:00
Dr. Peter Poeml
89a85f9b13 better copy&paste directions for import gpg keys 2006-07-17 12:07:19 +00:00
Dr. Peter Poeml
b1f8dfdf72 if osc is started for the first time, add a complete .oscrc, with build configuration, not just the api user acccount. So it isn't necessary to do it later again. 2006-07-17 12:00:59 +00:00
Dr. Peter Poeml
e6fedfcf8a if configuration is overridden by envvars, print out a statement about it 2006-07-17 10:36:26 +00:00
Dr. Peter Poeml
d6f6a80d09 hacky support to allow setting <platform> <arch> by the environment variable BUILD_DIST, where BUILD_DIST equals <platform>-<arch> 2006-07-14 18:39:44 +00:00
Dr. Peter Poeml
77d66c81a3 don't try to find built packages when the build wasn't complete 2006-07-14 18:31:35 +00:00
Dr. Peter Poeml
a08e80472b handle error if packagecachedir is not writable by user 2006-07-14 18:23:20 +00:00
Dr. Peter Poeml
11845654ac if only .netrc is found, automatically create a ready-to-go .oscrc 2006-07-14 18:21:35 +00:00
Dr. Peter Poeml
e19ded6f70 add build opts to usage info 2006-07-14 17:45:44 +00:00
Dr. Peter Poeml
20a13e7b3b - bump version (0.7)
- initial support for local builds (subcommand 'build')
2006-07-14 17:39:46 +00:00
Dr. Peter Poeml
55857910d4 - properly use tempfile.mkstemp, by using os.fdopen() on the passed file
descriptor, instead of opening it again
2006-07-14 16:37:34 +00:00
Dr. Peter Poeml
f50176e4f2 in case of a parsing error of netrc, treat it as non-existant. (It turned out that python's netrc parser wouldn't cope with lines not containing a password) 2006-07-14 16:19:35 +00:00
Dr. Peter Poeml
9e10eb40c6 add a wrapper function for urllib2.urlopen which handles errors; give better usage info for buildconfig/buildinfo 2006-07-12 14:14:50 +00:00
Dr. Peter Poeml
bac61c05ac handle (properly report) HTTP errors in meta_get_filelist, get_slash_source show_project_meta, show_package_meta 2006-07-05 12:09:09 +00:00
Dr. Peter Poeml
5d86b595b9 add new subcommands buildconfig, buildinfo, repos 2006-07-05 10:25:31 +00:00
Dr. Peter Poeml
1145aa0d3e - rewrite command and command alias handling so it is all defined in one place 2006-07-03 10:00:20 +00:00
Dr. Peter Poeml
d159226078 catch ctrl-c during log following 2006-06-29 23:41:10 +00:00
Dr. Peter Poeml
b54e25c46b - 'ci'/'rm': properly quote the path component of URLs used in HTTP requests
(now also in DELETE requests, where no quoting was done before at all)
- 'id': properly quote the query part of the URL 
- fix up tests.py
- add to TODO
2006-06-29 23:34:06 +00:00
Dr. Peter Poeml
3eec9cfefc remove forgotten debugging code from last commit 2006-06-26 15:12:40 +00:00
Dr. Peter Poeml
6366ffb72f - remove dead code
- remove requirement on pyxml package
- use list comprehensions in some places
- fix 'rebuildpac' command to not show raw xml
- fix updatepacmetafromspec to cope with subpackages during parsing
2006-06-26 15:11:22 +00:00
Dr. Peter Poeml
2b7970148e - editmeta:
- add examples for <disable> tags to the package template
  - add examples for build targets to the project template
2006-06-23 10:35:20 +00:00
Dr. Peter Poeml
b0d1a94762 - don't try to merge files if they have binary content
- set mtime on files that have been fetched during merge
2006-06-22 12:54:58 +00:00
Dr. Peter Poeml
0e4348e8fc - fix typo in package meta template: DESCIPTION -> DESCRIPTION
- unify all help texts
2006-06-22 11:26:01 +00:00
Dr. Peter Poeml
29fa2b0810 - add support for streaming build log, while it is being written (patch
by Christoph Thiel)
2006-06-16 12:40:26 +00:00
Dr. Peter Poeml
ae285de206 - use os.path.getmtime() instead of os.stat()
- use named stat members instead of their index number
2006-06-16 12:19:02 +00:00
Dr. Peter Poeml
3e412a67a5 - don't diff binary files, using diff's heuristic
- add 'rebuildpac' command, which triggers a rebuild for all
  repositories/architectures of the package
- fix merge on 'update', if osc is called from another directory
- escape '+' signs in filenames in GET requests as well (adds to [#153725,
  181593])
- don't fail on 'resolve' when the working copy is in a newer rev already
2006-06-08 10:30:29 +00:00
Dr. Peter Poeml
24a49bbfd6 - work around ruby on rails issue, which swallows '+' signs in filenames in PUT
requests [#153725, 181593]
- before committing, make sure that the working copy is up to date (added
  show_rev() function)
- add 'commit' as subcommand alias for 'ci/checkin'
- use os.path.abspath() in Project and Package classes
2006-06-06 10:50:40 +00:00
Dr. Peter Poeml
749a1f76c9 - make 'resolved' more robust
- add 'repourls' subcommand
2006-06-02 14:00:58 +00:00
Dr. Peter Poeml
f513dc91e3 - display reason for build status is 'broken'
- handle 'project not found' error in show_project_meta()
2006-06-01 09:05:47 +00:00
Dr. Peter Poeml
b9f53cbfb7 - add a tentative 'updatepacmetafromspec' subcommand, which takes package
metadata from a specfile
- handle HTTP error codes != 404 when reading metadata in edit_meta()
2006-05-31 12:13:26 +00:00
Dr. Peter Poeml
2b6cd72037 set User-agent 2006-05-30 11:44:06 +00:00
Dr. Peter Poeml
537d6b62cc version 0.6 2006-05-30 10:31:25 +00:00
Dr. Peter Poeml
9557d10177 - it is not necessary to compute the digest when adding files -- saves time
- checkin: update local copy in store (fixes diff using obsolete old version)
- use shutil.copy2 instead of home-grown copy_file
- make put_source_file() and delete_source_file() methods of the Package class;
  rename delfile method to delete_localfile
2006-05-30 10:07:16 +00:00
Dr. Peter Poeml
2e8d12af7e fix update of working copy when adding file from upstream which is missing locally 2006-05-29 21:04:14 +00:00
Dr. Peter Poeml
1f764554a0 - fix update in directory with unmodified files: don't try to merge if upstream
file wasn't changed at all
- use given project name in new_project_templ
2006-05-23 16:16:14 +00:00
Dr. Peter Poeml
17de02b604 - add 'editmeta' subcommand: Edit project/package meta information, creating
new project or package if it doesn't exist. The user interface is $EDITOR
- gracedully handle unknown subcommands
2006-05-23 15:27:43 +00:00
Dr. Peter Poeml
e54577ceba remove a debug print statement 2006-05-23 14:05:07 +00:00
Dr. Peter Poeml
f0c9a1c3f4 fix copy&paste issue in clear_from_conflictlist(): write the conflict list, not the delete list 2006-05-23 13:59:29 +00:00
Dr. Peter Poeml
aa36c25505 - add 'help' subcommand (and add help :-)
- make all subcommands functions -- so they can be used from outside (they
  still print directly their output; they could become iterators later)
- deprecate 'init' subcommand
- 0.5
2006-05-23 13:48:58 +00:00
Dr. Peter Poeml
4ec0b4fbe7 fix status letter for files merged on update (in analogy to svn , it is either G or U) 2006-05-23 09:59:22 +00:00
Dr. Peter Poeml
4035dad7e0 - if an old _files listing without any metadata is found, don't bother the user
with it
- add get_osc_version()
2006-05-23 08:43:04 +00:00
Dr. Peter Poeml
170a4307e5 don't fail on unlinking non-existing file 2006-05-22 17:51:44 +00:00
Dr. Peter Poeml
8548d163f6 escape spaces in username 2006-05-22 14:57:11 +00:00
Dr. Peter Poeml
1623924f2b accept older working copies 2006-05-22 14:23:13 +00:00
Dr. Peter Poeml
600d9cf4a8 version 0.4 2006-05-22 14:13:12 +00:00
Dr. Peter Poeml
211b197b26 - add diff3 merge support. Locally modified files are merged with upstream changes
if possible, and go into Conflict state if that fails.
- add 'resolved' command to be used after manual merging.
2006-05-22 14:12:06 +00:00
Dr. Peter Poeml
2c37f7287d - allow 'up' of a project directory (will automatically pull in all new
packages)
- add NEWS file
2006-05-22 10:50:37 +00:00
Dr. Peter Poeml
4b7d1bc176 checkout: preserve mtime; don't read file metadata twice 2006-05-22 08:16:31 +00:00
Dr. Peter Poeml
d4d20221c1 fix diff for last change (of course it was reverse) 2006-05-19 20:28:04 +00:00
Dr. Peter Poeml
4b83218cf6 0.3
status: 
- use new file metadata which provides checksum, size and mtime 
- don't list unmodified files
- fix some conditions where status was too stupid so far
update: 
- much faster now, since only new or changed files are downloaded
- print revision number
checkout:
- mark project directory as such (to be used later)
diff:
- faster, since 'status' is faster
- work against local copy
checkin: 
- update package metadata from specfile 
- fix argument handling 
add: 
- ignore .osc and other files
other changes:
- sanitize argument handling, so most commands can work with
  arbitrary files/directories as arguments (work is always done per package)
- add history command (doesn't seem to be working yet)
- on first usage, ask for username password on first usage, 
  and store them in .oscrc (.netrc can still be used)
2006-05-19 20:13:29 +00:00
Dr. Peter Poeml
f5a2f3089b 'status': don't print unmodified files 2006-05-11 11:26:53 +00:00
Dr. Peter Poeml
03ca18dbb8 - make 'results' output less noisy
- add parseargs() to simplify argument handling
- clean up some unused code
2006-05-11 07:27:50 +00:00
Dr. Peter Poeml
c0c271a8ec fix import of the rest of the module from commandline.py 2006-05-10 14:34:59 +00:00
Dr. Peter Poeml
aaa41561be - reorganize source to build a python module
- add setup.py
- add osc-wrapper.py as a wrapper script, so the module can be used when
  installed in the system as well as in the uninstalled source directory
2006-05-10 14:21:51 +00:00