[svn:parrot] r42584 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Thu Nov 19 17:29:41 UTC 2009
Author: fperrad
Date: Thu Nov 19 17:29:40 2009
New Revision: 42584
URL: https://trac.parrot.org/parrot/changeset/42584
Log:
[distutils] add a step 'update'
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Thu Nov 19 17:06:28 2009 (r42583)
+++ trunk/runtime/parrot/library/distutils.pir Thu Nov 19 17:29:40 2009 (r42584)
@@ -83,6 +83,9 @@
.const 'Sub' _clean_html_pod = '_clean_html_pod'
register_step_after('clean', _clean_html_pod)
+ .const 'Sub' _update = '_update'
+ register_step('update', _update)
+
.const 'Sub' _install = '_install'
register_step('install', _install)
.const 'Sub' _install_dynpmc = '_install_dynpmc'
@@ -240,6 +243,8 @@
clean: Basic cleaning up.
+ update: Update from repository.
+
help: Print this help message.
USAGE
$I0 = exists kv['usage']
@@ -1328,6 +1333,73 @@
=back
+=head3 Step update
+
+The following Version Control System are handled :
+
+=over 4
+
+=cut
+
+.sub '_update' :anon
+ .param pmc kv :slurpy :named
+ $I0 = file_exists('CVS')
+ unless $I0 goto L1
+ .tailcall _update_cvs(kv :flat :named)
+ L1:
+ $I0 = file_exists('.git')
+ unless $I0 goto L2
+ .tailcall _update_git(kv :flat :named)
+ L2:
+ $I0 = file_exists('.hg')
+ unless $I0 goto L3
+ .tailcall _update_hg(kv :flat :named)
+ L3:
+ $I0 = file_exists('.svn')
+ unless $I0 goto L4
+ .tailcall _update_svn(kv :flat :named)
+ L4:
+ die "Don't known how to update."
+.end
+
+=item CVS
+
+=cut
+
+.sub '_update_cvs' :anon
+ .param pmc kv :slurpy :named
+ system('cvs update')
+.end
+
+=item Git
+
+=cut
+
+.sub '_update_git' :anon
+ .param pmc kv :slurpy :named
+ system('git pull')
+.end
+
+=item Mercurial
+
+=cut
+
+.sub '_update_hg' :anon
+ .param pmc kv :slurpy :named
+ system('hg pull')
+.end
+
+=item SVN
+
+=cut
+
+.sub '_update_svn' :anon
+ .param pmc kv :slurpy :named
+ system('svn update')
+.end
+
+=back
+
=head3 Step test
If t/harness exists, run : t/harness
More information about the parrot-commits
mailing list