summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2006-07-17 10:05:14 +0000
committerStefan Schweizer <genstef@gentoo.org>2006-07-17 10:05:14 +0000
commit0cb4affa57a2eac7a6ec3f06753bc295842da1aa (patch)
tree5e6e6c4e6f45b3194a7c290934de2b02bb8561f7 /scripts
parentrevert (diff)
downloadsunrise-0cb4affa57a2eac7a6ec3f06753bc295842da1aa.tar.gz
sunrise-0cb4affa57a2eac7a6ec3f06753bc295842da1aa.tar.bz2
sunrise-0cb4affa57a2eac7a6ec3f06753bc295842da1aa.zip
fix repoman problems with sunrise-commit, svn problems with echangelog and use sunrise echangelog by default
svn path=/sunrise/; revision=635
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/echangelog10
-rwxr-xr-xscripts/sunrise-commit39
2 files changed, 8 insertions, 41 deletions
diff --git a/scripts/echangelog b/scripts/echangelog
index 4d75c98d6..5ab9204e2 100755
--- a/scripts/echangelog
+++ b/scripts/echangelog
@@ -93,11 +93,11 @@ while (<C>) {
# Separate out the trivial files for now
@files = grep {
- !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+ !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; }
} @files;
@unknown = grep {
- !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+ !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; }
} @unknown;
# Don't allow any conflicts
@@ -207,9 +207,9 @@ sub sortfunc($$) {
# Forget ebuilds that only have changed copyrights, unless that's all
# the changed files we have
-
-@ebuilds = grep /\.ebuild$/, @files;
-@files = grep !/\.ebuild$/, @files;
+# does not work with svn TODO
+#@ebuilds = grep /\.ebuild$/, @files;
+#@files = grep !/\.ebuild$/, @files;
if (@ebuilds) {
open C, $vcs{$vcs}{diff}.@ebuilds." 2>&1 |" or die "Can't run: ".$vcs{$vcs}{diff}."$!\n";
diff --git a/scripts/sunrise-commit b/scripts/sunrise-commit
index 151abcb74..97cd8cfd5 100755
--- a/scripts/sunrise-commit
+++ b/scripts/sunrise-commit
@@ -34,7 +34,6 @@ opt_norepoman=0
opt_noupdate=0
opt_quiet=0
opt_verbose=0
-working_copy_base_dir=""
changelog_append() {
if [[ $opt_changelog == 1 ]] ; then
@@ -48,43 +47,12 @@ changelog_append() {
exit 1
fi
ebegin "Appending/creating ChangeLog"
- echangelog "$*"
+ [ -e $(dirname $0)/echangelog ] && ec="$(dirname $0)/echangelog" || ec="echangelog"
+ $ec "$*"
eend $?
fi
}
-check_working_copy_base_dir() {
- local num_dirs=0
-
- # Ascend to nearest working copy dir in parent dirs
- while ! get_current_svn_status ; do
- if [[ "$(pwd)" == "$(dirs -l +1 2>&1)" ]] ; then
- echo "!!! Error: No working copy found in parents of current directory."
- echo "!!! sunrise-commit must be run from within a working copy tree."
- exit 1
- fi
- (( num_dirs++ ))
- pushd .. >/dev/null
- done
-
- # Ascend from there to nearest non-working copy dir in parent dirs
- while get_current_svn_status ; do
- if [[ "$(pwd)" == "$(dirs -l +1 2>&1)" ]] ; then
- break
- fi
- (( num_dirs++ ))
- pushd .. >/dev/null
- done
-
- # Working copy base dir is previous dir on stack
- popd >/dev/null && (( num_dirs-- ))
- working_copy_base_dir="$(pwd)"
-
- for (( i=num_dirs ; i > 0 ; i-- )) ; do
- popd >/dev/null
- done
-}
-
create_digests() {
if [[ $cwd_is_ebuild_dir == 1 ]] ; then
ebegin "Digesting ebuilds"
@@ -147,7 +115,7 @@ repoman_check() {
if [[ $opt_norepoman == 0 ]] ; then
if [[ $cwd_is_ebuild_dir == 1 ]] ; then
ebegin "Running repoman"
- export PORTDIR_OVERLAY="$working_copy_base_dir"
+ export PORTDIR_OVERLAY="$(dirname $(dirname $(pwd)))"
repoman
eend $?
fi
@@ -344,7 +312,6 @@ if [[ -z "$*" ]] ; then
exit 1
fi
-check_working_copy_base_dir
[[ "$(ls)" =~ '\.ebuild' ]] && cwd_is_ebuild_dir=1
pushd . >/dev/null