![](https://seccdn.libravatar.org/avatar/af22e20b6884acbc89be6d7736c43e92.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package cogito
checked in at Thu Jul 27 17:51:55 CEST 2006.
--------
--- cogito/cogito.changes 2006-05-17 01:48:09.000000000 +0200
+++ cogito/cogito.changes 2006-07-27 03:08:17.000000000 +0200
@@ -1 +0,0 @@
-Wed May 17 01:48:03 CEST 2006 - pbaudis@suse.cz
@@ -2,0 +2,7 @@
+Thu Jul 27 03:07:46 CEST 2006 - pbaudis@suse.cz
+
+- Update to cogito 0.17.3.
+ * cg-admin-rewritehist bugfixes, bugfixes for git-1.4.1 compatibility
+
+-------------------------------------------------------------------
+Wed May 17 01:48:03 CEST 2006 - pbaudis@suse.cz
Old:
----
cogito-0.17.2.tar.bz2
New:
----
cogito-0.17.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cogito.spec ++++++
--- /var/tmp/diff_new_pack.1OQaCQ/_old 2006-07-27 17:51:40.000000000 +0200
+++ /var/tmp/diff_new_pack.1OQaCQ/_new 2006-07-27 17:51:40.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package cogito (Version 0.17.2)
+# spec file for package cogito (Version 0.17.3)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: cogito
BuildRequires: asciidoc sgml-skel xmlto
-Version: 0.17.2
+Version: 0.17.3
Release: 1
Summary: SCM Scripts Based on GIT
License: GPL
@@ -63,6 +63,9 @@
%doc README COPYING Documentation/tutorial-script
%changelog -n cogito
+* Thu Jul 27 2006 - pbaudis@suse.cz
+- Update to cogito 0.17.3.
+ * cg-admin-rewritehist bugfixes, bugfixes for git-1.4.1 compatibility
* Wed May 17 2006 - pbaudis@suse.cz
- Update to cogito 0.17.2.
* Random small bugfixes (esp. recursive adds/removals and doing
++++++ cogito-0.17.2.tar.bz2 -> cogito-0.17.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/Documentation/make-cg-asciidoc new/cogito-0.17.3/Documentation/make-cg-asciidoc
--- old/cogito-0.17.2/Documentation/make-cg-asciidoc 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/Documentation/make-cg-asciidoc 2006-06-18 02:16:21.000000000 +0200
@@ -48,7 +48,7 @@
OPTIONS=
MISC=
-section=$(echo "$BODY" | sed -n '1,/^[-~][-~]*[-~]$/p')
+section=$(echo "$BODY" | sed -n '1,/^[-][-]*[-]$/p')
section_lines=$(echo "$section" | wc -l)
lines=$(echo "$BODY" | wc -l)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/Documentation/tutorial-script/0000-playground.sh new/cogito-0.17.3/Documentation/tutorial-script/0000-playground.sh
--- old/cogito-0.17.2/Documentation/tutorial-script/0000-playground.sh 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/Documentation/tutorial-script/0000-playground.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-rm -rf Playground
-mkdir Playground
-cd Playground
-mkdir Alice Bob Charlie
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/Documentation/tutorial-script/script.sh new/cogito-0.17.3/Documentation/tutorial-script/script.sh
--- old/cogito-0.17.2/Documentation/tutorial-script/script.sh 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/Documentation/tutorial-script/script.sh 2006-06-18 02:16:21.000000000 +0200
@@ -1,15 +1,14 @@
#!/bin/bash
#
-# FIXME: This script has some GITisms. They stem from missing Cogito
-# features, such as exporting patches to mbox format, applying patches
-# from e-mail, merging multiple tags at once, verifying signed tags and
-# repacking the repository.
+# This script serves both as a tutorial explaining how to use Cogito and
+# as a test for Cogito. It's uses as part of the testsuite.
#
-# Not that there would be anything wrong per se with this; GIT and Cogito
-# can interoperate fine (except few quite special situations; see the README
-# for details) and you can mix the commands; Cogito might never provide
-# wrappers for some of the GIT features which are nevertheless awesomely
-# useful, like `git bisect`.
+# This script has a few direct calls to git. They are used when Cogito
+# doesn't provide needed functionality, such as verifying signed tags
+# and repacking the repository.
+#
+# There is anything wrong with this; git and Cogito can interoperate
+# just fine, especially if you don't use git for things Cogito can do.
# This function is appended as "&& should_fail" to commands which should
@@ -28,79 +27,104 @@
trap 'echo >&2 "Unexpected error $? on line $LINENO"; exit 1' exit
-### Set up playground
-sh 0000-playground.sh
+# Since this script doubles as a test, prefer the local Cogito version
+# so it can be tested before installation
TOP=$(pwd)
+export PATH=$TOP/../..:$PATH
+
+### Set up the playground
+rm -rf Playground
+mkdir Playground
+cd Playground
+
+# Suppose we have three users: Alice, Bob and Charlie
+mkdir Alice Bob Charlie
ALICE=$TOP/Playground/Alice
BOB=$TOP/Playground/Bob
CHARLIE=$TOP/Playground/Charlie
-cd Playground
-### Alice's first version
-cd $ALICE
+# This function imitates becoming one of the users
+switch_user () {
+ case $1 in
+ Alice) cd "$ALICE";;
+ Bob) cd "$BOB";;
+ Charlie) cd "$CHARLIE";;
+ *) echo "I don't know you, $1"; exit 1;;
+ esac
+ HOME=$(pwd)
+ GIT_AUTHOR_NAME="$1"
+ GIT_AUTHOR_EMAIL="$1@example.com"
+ GIT_COMMITTER_NAME="$1"
+ GIT_COMMITTER_EMAIL="$1@example.com"
+}
+
+
+### Let's start. Pretend you are Alice
+switch_user Alice
+
+# Alice has written an RPN calculator program
tar xf $TOP/0001-alice.tar
cd rpn
# Being a tidy girl, she places it under Cogito
echo "Alice's first version" | cg-init
+
+# Let it be known as version 0.1
cg-tag -d "First ever version of RPN" rpn-0.1
-
-# Alice decides on OSL-2.1
-cd $ALICE/rpn
+# Alice decides to add the license file to the code
cp $TOP/0002-alice-license.txt osl-2.1.txt
-# The new file has to be added
+# Cogito should know that it's a new file to be added
cg-add osl-2.1.txt
-# Fix up the files
+# Notices should be added to the existing files
patch -p1 -i $TOP/0003-alice-osl.patch
-# Now save all, and tag it for later reference
+# Alice commits the changes and tags the result as version 0.2
cg-commit -m "Place under OSL-2.1"
cg-tag -d "Place under OSL-2.1" rpn-0.2
-# Alice creates a public repository for the new toy
+# Now Alice creates a public repository for the new toy
cg-admin-setuprepo $ALICE/rpn.git
-cg-branch-add public "$ALICE/rpn.git" # Shortcut for the public repository
-# Alice pushes her master _and_ the two tags to the public repository
+
+# Alice will refer to it as the "public" branch
+cg-branch-add public "$ALICE/rpn.git"
+
+# Alice pushes her master branch and both tags to the public repository
cg-push public -t rpn-0.1 -t rpn-0.2
-### Bob hears about this exciting new program, gets a copy from Alice
-cd $BOB
+### Bob hears about this exciting new program and gets a copy from Alice
+switch_user Bob
cg-clone $ALICE/rpn.git
-
cd rpn
-# Bob thinks the declarations for the stack should go in a header file
+# Bob thinks the declarations for the stack belong to a header file
cp $TOP/0004-bob-stack_h stack.h
patch -p1 -i $TOP/0005-bob-stack_h.patch
-
cg-add stack.h
cg-commit -m "Place stack declarations in header file" \
-m "Create stack.h, move declarations of stack manipulation into it" \
- -m "Include stack.h in rpn.c and stack.h"
+ -m "Include stack.h in rpn.c and stack.h"
-# Later, he remembers he didn't fix the Makefile
+# Just after commit, Bob realizes he didn't fix the Makefile
patch -p1 -i $TOP/0006-bob-Makefile.patch
-
cg-commit -m "Update dependencies for stack.h in Makefile"
### Alice has been busy too...
-cd $ALICE/rpn
+switch_user Alice
+cd rpn
# She adds the 'd'rop operation
patch -p1 -i $TOP/0007-alice-drop.patch
-
cg-commit -m "Add drop command" \
-m "Change rpn.c to add handling for 'd'rop"
# Then she adds 'C'lear, and a first stab at documentation
patch -p1 -i $TOP/0008-alice-clear.patch
cp $TOP/0009-alice-README.txt README
-
cg-add README
cg-commit -m "Add clear stack command" \
-m "Change rpn.c to add handling for 'C'lear" \
@@ -113,14 +137,22 @@
### Bob tells Alice of his changes, Alice prepares to get them.
-cd $ALICE/rpn
+switch_user Alice
+cd rpn
+# Alice creates local branch "bob" to integrate Bob's changes.
cg-switch -r master bob
+
+# Now Alice has branches "master", "public" and "bob" ("bob" is active).
cg-status -g
-# Alice needs to register his remote branch
+# Remote branch "bobswork" is a shortcut to the Bob's master branch
cg-branch-add bobswork $BOB/rpn
-# Now try to merge Bob's work to the bob branch
+
+# Remote branches are "public" and "bobswork".
+cg-branch-ls
+
+# Alice tries to merge Bob's work to the "bob" branch
cg-update bobswork && should_fail
# There are conflicts in rpn.c. Looking at the file, Alice sees the
@@ -131,98 +163,82 @@
#: extern double pop(void);
#: extern void push(double);
#: extern void clear(void);
-#:
+#:
#: =======
#: >>>>>>> bobswork
#: extern int getsym(void);
#: ...
-
-# Alice keeps Bob's version
-ed rpn.c < $TOP/0010-alice-bob-fixup.ed
+
+# Alice keeps Bob's version, i.e. the one from the "bobswork" branch
+ed -s rpn.c < $TOP/0010-alice-bob-fixup.ed
# cg-commit after resolving conflicts from failed merge will autogenerate
# the commit message.
cg-commit rpn.c
-# Finally, he has the changes he wants
+# Fortunately, cg-restore can take care of it
+cg-restore -f rpn.c
+
+# Finally, Charlie has the changes he wants
cp $TOP/0012-charlie-lexer_h lexer.h
patch -p1 -i $TOP/0013-charlie-lexer.patch
-
cg-add lexer.h
cg-commit -m "Add proper header file for lexer" \
-m "Create lexer.h, move lexer declarations into it." \
-m "Include lexer.h in rpn.c and lexer.c" \
-m "Update dependencies in Makefile"
-# Charlie emails the patch to Alice:
-# cg-mkpatch -d .. -r rpn-0.3..master
-git format-patch -o .. --mbox --signoff -r rpn-0.3
-# Only git can create mbox formatted output
-# Compare the result to 0014-charlie-email
+# Charlie prepares the patch and sends it to Alice
+cg-mkpatch -d ../patches -r rpn-0.3..master
+
+# Well, in real life Charlie is more likely to use e-mail than "cp"
+cp -r $CHARLIE/patches $ALICE/patches
### Alice is busy meanwhile...
-cd $ALICE/rpn
+switch_user Alice
+cd rpn
+# She returns to master branch, leaving "bob" for later merging
cg-switch master
+# The calculator gets a new operator
patch -p1 -i $TOP/0015-alice-mod.patch
-
cg-commit -m "Add mod operator" \
-m "Add handling for '%' (fmod(3)) in rpn.c"
+# And then another one
patch -p1 -i $TOP/0016-alice-dup.patch
-
cg-commit -m "Add duplication operator" \
-m "Add handling for 'D'up in rpn.c"
-
+
# Alice publishes her work-in-progress
cg-push public
-
-### Alice gets Charlie's fix, creates a new branch for his changes
-cd $ALICE/rpn
-
+# Alice gets Charlie's fix and creates a new branch for his changes.
+# This time, she starts the branch off the rpn-0.3 tag, which was
+# the base version for Charlie's changes.
cg-switch -r rpn-0.3 charlie
-cg-status -g
-
-# Check what's inside the patch. There is no Cogito equivalent yet.
-git apply --stat $TOP/0014-charlie-email
-git apply --summary $TOP/0014-charlie-email
-git apply --check $TOP/0014-charlie-email
-
-# Everything looks OK
-git applymbox $TOP/0014-charlie-email
-# This doesn't work well yet
-# cg-patch < $TOP/0014-charlie-email
-
-### Alice integrates the changes in the branches for the next release
-cd $ALICE/rpn
+cg-patch -d $ALICE/patches
+# Alice is going to integrate the changes in the "bob" and "charlie"
+# branches into "master" for the next release
cg-switch master
-# Alice tries "git merge" instead of "cg-merge" since she wanted to
-# merge both branches at once, which "cg-merge" cannot do.
-git merge "Integrate changes from Bob and Charlie" master bob charlie \
- && should_fail
-# Automatic 3-way merge fails! Have to do it step by step
-
-cg-reset
+# First, Alice tries to integrate Bob's changes
cg-merge bob && should_fail
# Merge fails:
@@ -238,34 +254,38 @@
#: lexer.o:
#: >>>>>>> bob
-ed Makefile < $TOP/0017-alice-bob-fixup.ed
-
+# Alice fixes Makefile and commits the changes
+ed -s Makefile < $TOP/0017-alice-bob-fixup.ed
cg-commit -m "Integrate Bob's changes"
+# Now it's time to integrate Charlie's changes
cg-merge charlie && should_fail
-# Merge conflicts!
+# Merge fails again! Makefile needs tweaking
#: ...
#: <<<<<<< master
#: $(CC) $(CFLAGS) $^ -lm -o $@
-#:
+#:
#: rpn.o: stack.h
#: stack.o: stack.h
#: lexer.o:
#: =======
#: $(CC) $(CFLAGS) $^ -o $@
-#:
+#:
#: rpn.o lexer.o: lexer.h
-#:
+#:
#: >>>>>>> charlie
-ed Makefile < $TOP/0018-alice-charlie-fixup1.ed
+# Alice fixes Makefile
+ed -s Makefile < $TOP/0018-alice-charlie-fixup1.ed
+
+# rpn.c needs fixing too
#: ...
#: <<<<<<< master
#: extern int getsym(void);
-#:
+#:
#: =======
#: extern double pop(void);
#: extern void push(double);
@@ -274,36 +294,37 @@
#: >>>>>> charlie
#: ...
-ed rpn.c < $TOP/0019-alice-charlie-fixup2.ed
+ed -s rpn.c < $TOP/0019-alice-charlie-fixup2.ed
+# Finally, Charlie's changes can be committed
cg-commit -m "Integrate Charlie's changes"
-# Give proper credits
+# Alice gives proper credits to the contributors
cp $TOP/0020-alice-CONTRIBUTORS.txt CONTRIBUTORS
-
cg-add CONTRIBUTORS
cg-commit -m "Add CONTRIBUTORS"
-# Wrong file name...
+# But maybe it's better to call that file CREDITS?
cg-mv CONTRIBUTORS CREDITS
cg-commit -m "Rename CONTRIBUTORS to CREDITS"
-
-# Pack it so it uses less space
+# Alice packs the repository so it uses less space
git repack
git prune-packed
-# Second public release
-cg-tag -d "New public release" rpn-0.4
+# Now it's time for another public release
+cg-tag -d "Public release of version 0.4" rpn-0.4
cg-push public -t rpn-0.4
cg-export ../rpn-0.4.tar.bz2
-# Also pack public repository
+# The public repository needs packing too
GIT_DIR=$ALICE/rpn.git git repack
GIT_DIR=$ALICE/rpn.git git prune-packed
+
### Bob updates his version to Alice's
-cd $BOB/rpn
+switch_user Bob
+cd rpn
cg-fetch
@@ -313,9 +334,10 @@
# scripts does not make much sense.)
git verify-tag rpn-0.4 && should_fail
-# Everything's OK, integrate the changes
+# Everything's OK, Bob integrate the changes
cg-merge
-# Great, we are done.
+
+### Great, we are done.
trap - exit
echo "Script completed successfully!"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/Portfile.in new/cogito-0.17.3/Portfile.in
--- old/cogito-0.17.2/Portfile.in 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/Portfile.in 2006-06-18 02:16:21.000000000 +0200
@@ -4,13 +4,13 @@
version @@VERSION@@
categories devel
maintainers bryan.larsen@gmail.com
-description Git core + cogito tools to provide a full distributed SCM.
-long_description The git core, developed by Linus Torvalds provides \
- an extremely fast and flexible filesystem-based \
- database designed to store directory trees with \
- regard to their history. The cogito tools, \
- developed by Petr Baudis, provide full distributed \
- SCM (software change management) functionality.
+description The Cogito Version Control System
+long_description Cogito is a version control system layered on top \
+ of the git tree history storage system. It aims at \
+ seamless user interface and ease of use, providing \
+ generally smoother user experience than the "raw" \
+ Core GIT itself and indeed many other version \
+ control systems.
homepage http://kernel.org/pub/software/scm/cogito/
master_sites http://kernel.org/pub/software/scm/cogito/
configure {}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/README new/cogito-0.17.3/README
--- old/cogito-0.17.2/README 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/README 2006-06-18 02:16:21.000000000 +0200
@@ -61,7 +61,7 @@
Tool Description
-------------------------------------------------------------------------------
rsync For fetching files with the rsync backend.
-gnu coreutils The gnu versions of stat, date and cp \
+GNU coreutils The GNU versions of stat, date and cp \
are preferred over the BSD variants.
gawk Necessary for cg-diff -c (mawk can't cope).
asciidoc (>= 7.0), xmlto For building documentation.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/README.osx new/cogito-0.17.3/README.osx
--- old/cogito-0.17.2/README.osx 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/README.osx 2006-06-18 02:16:21.000000000 +0200
@@ -2,8 +2,9 @@
To install on OS X:
-1) Install darwinports (http://darwinports.opendarwin.org/) 2) type
-"make Portfile" 3) type "sudo port install"
+ 1. Install darwinports (http://darwinports.opendarwin.org/)
+ 2. type "make Portfile"
+ 3. type "sudo port install"
You may have to deal with md5 mismatches. Either adjust the md5sum in
your new Portfile or place the new tarball in
@@ -11,7 +12,7 @@
Recommendations:
-The gnu versions of "stat" and "date" are preferred over their BSD
+The GNU versions of "stat" and "date" are preferred over their BSD
variants.
"patch", "diff", "merge", "curl" and "rsync" are required. OS X.4
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/VERSION new/cogito-0.17.3/VERSION
--- old/cogito-0.17.2/VERSION 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/VERSION 2006-06-18 02:16:21.000000000 +0200
@@ -1 +1 @@
-cogito-0.17.2
+cogito-0.17.3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-Xlib new/cogito-0.17.3/cg-Xlib
--- old/cogito-0.17.2/cg-Xlib 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-Xlib 2006-06-18 02:16:21.000000000 +0200
@@ -358,7 +358,7 @@
cg-diff -r "$branch" >"$patchfile"
fi
- git-read-tree -m "$branch" || die "$branch: bad commit"
+ git-read-tree -i -m "$branch" || die "$branch: bad commit"
[ "$no_head_update" ] || git-update-ref HEAD "$branch" || :
# Kill gone files
@@ -614,7 +614,7 @@
if [ ! "$_git_repo_unneeded" ] && [ ! "$GIT_DIR" ] && [ ! -d "$_git" ]; then
_git_abs_path="$(git-rev-parse --git-dir 2>/dev/null)"
if [ -d "$_git_abs_path" ]; then
- export _git_relpath="$(git-rev-parse --show-prefix)"
+ _git_relpath="$(git-rev-parse --show-prefix)"
cd "$_git_abs_path/.."
fi
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-admin-rewritehist new/cogito-0.17.3/cg-admin-rewritehist
--- old/cogito-0.17.2/cg-admin-rewritehist 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-admin-rewritehist 2006-06-18 02:16:21.000000000 +0200
@@ -42,6 +42,10 @@
# pass this argument, though, this will be the first commit it
# will rewrite and keep the previous commits intact.
#
+# -k KEEPREV:: A commit id until which _not_ to rewrite history
+# If you pass this argument, this commit and all of its
+# predecessors are kept intact.
+#
# Filters
# ~~~~~~~
# The filters are applied in the order as listed below. The COMMAND
@@ -83,6 +87,7 @@
# This is the filter for rewriting the commit messages.
# The COMMAND argument is evaluated in shell with the original
# commit message on standard input; its standard output is
+# is used as the new commit message.
#
# --commit-filter COMMAND:: The filter for performing the commit
# If this filter is passed, it will be called instead of the
@@ -130,14 +135,30 @@
# committed a merge between P1 and P2, it will be propagated properly
# and all children of the merge will become merge commits with P1,P2
# as their parents instead of the merge commit.
+#
+# To restrict rewriting to only part of the history, use -r or -k or both.
+# Consider this history:
+#
+# D--E--F--G--H
+# / /
+# A--B-----C
+#
+# To rewrite only commits F,G,H, use:
+#
+# cg-admin-rewritehist -r F ...
+#
+# To rewrite commits E,F,G,H, use one of these:
+#
+# cg-admin-rewritehist -r E -k C ...
+# cg-admin-rewritehist -k D -k C ...
-USAGE="cg-admin-rewritehist [-d TEMPDIR] [-r STARTREV]... [FILTERS] DESTBRANCH"
+USAGE="cg-admin-rewritehist [-d TEMPDIR] [-r STARTREV]... [-k KEEPREV]... [FILTERS] DESTBRANCH"
_git_requires_root=1
. "${COGITO_LIB}"cg-Xlib || exit 1
tempdir=.git-rewrite
-startrev=
+declare -a unchanged
filter_env=
filter_tree=
filter_index=
@@ -148,7 +169,9 @@
if optparse -d=; then
tempdir="$OPTARG"
elif optparse -r=; then
- startrev="^$OPTARG $OPTARG $startrev"
+ unchanged=(${unchanged[@]} $(cg-object-id -p "$OPTARG")) || exit 1
+ elif optparse -k=; then
+ unchanged=(${unchanged[@]} $(cg-object-id -c "$OPTARG")) || exit 1
elif optparse --env-filter=; then
filter_env="$OPTARG"
elif optparse --tree-filter=; then
@@ -157,6 +180,8 @@
filter_index="$OPTARG"
elif optparse --parent-filter=; then
filter_parent="$OPTARG"
+ elif optparse --msg-filter=; then
+ filter_msg="$OPTARG"
elif optparse --commit-filter=; then
filter_commit="$OPTARG"
else
@@ -183,9 +208,18 @@
mkdir ../map # map old->new commit ids for rewriting parents
-git-rev-list --topo-order HEAD $startrev | tac >../revs
+# seed with identity mappings for the parents where we start off
+for commit in ${unchanged[@]}; do
+ echo $commit > ../map/$commit
+done
+
+git-rev-list --topo-order HEAD ${unchanged[@]/#/^} | tac >../revs
commits=$(cat ../revs | wc -l)
+if [ $commits -eq 0 ]; then
+ die "Found nothing to rewrite"
+fi
+
i=0
while read commit; do
i=$((i+1))
@@ -202,10 +236,13 @@
if [ "$filter_tree" ]; then
git-checkout-index -f -u -a
+ # files that $commit removed are now still in the working tree;
+ # remove them, else they would be added again
+ git-ls-files -z --others | xargs -0 rm -f
eval "$filter_tree"
git-diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
xargs -0 git-update-index --add --replace --remove
- git-ls-files --others | tr '\n' '\0' | \
+ git-ls-files -z --others | \
xargs -0 git-update-index --add --replace --remove
fi
@@ -213,9 +250,13 @@
parentstr=
for parent in $(cg-object-id -p $commit); do
- for reparent in $(cat ../map/$parent); do
- parentstr="$parentstr -p $reparent"
- done
+ if [ -r "../map/$parent" ]; then
+ for reparent in $(cat "../map/$parent"); do
+ parentstr="$parentstr -p $reparent"
+ done
+ else
+ die "assertion failed: parent $parent for commit $commit not found in rewritten ones"
+ fi
done
if [ "$filter_parent" ]; then
parentstr="$(echo "$parentstr" | eval "$filter_parent")"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-clean new/cogito-0.17.3/cg-clean
--- old/cogito-0.17.2/cg-clean 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-clean 2006-06-18 02:16:21.000000000 +0200
@@ -65,13 +65,13 @@
if [ "$cleandirhard" ]; then
chmod -R 700 "$file"
fi
- $rm -rf "$file"
+ $rm -rf -- "$file"
if [ -e "$file" -o -L "$file" ]; then
echo "Cannot remove $file"
fi
elif [ -e "$file" -o -L "$file" ]; then
[ "$quiet" ] || echo "Removing $file"
- "$rm" -f "$file"
+ "$rm" -f -- "$file"
# rm would complain itself on failure
else
echo "File $file has disappeared!"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-clone new/cogito-0.17.3/cg-clone
--- old/cogito-0.17.2/cg-clone 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-clone 2006-06-18 02:16:21.000000000 +0200
@@ -118,6 +118,7 @@
fi
cg-branch-add origin "$location"
+mkdir -p "$_git/info"
echo $$ >"$_git/info/cg-fetch-initial"
echo $$ >"$_git/info/cg-fetch-earlydie"
cat >___ <<__EOT__
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-diff new/cogito-0.17.3/cg-diff
--- old/cogito-0.17.2/cg-diff 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-diff 2006-06-18 02:16:21.000000000 +0200
@@ -185,7 +185,7 @@
#ret=
# xargs on FreeBSD is hardcoded to --no-run-if-empty :/
if [ -s "$filter" ]; then
- cat "$filter" | path_xargs git-diff-index -m -r -p "$tree" | colorize | pager
+ cat "$filter" | path_xargs git-diff-index -m -r -p "$tree" -- | colorize | pager
else
git-diff-index -m -r -p "$tree" | colorize | pager
fi
@@ -205,7 +205,7 @@
# xargs on FreeBSD is hardcoded to --no-run-if-empty :/
if [ -s "$filter" ]; then
- cat "$filter" | path_xargs git-diff-tree -r -p "$id1" "$id2" | colorize | pager
+ cat "$filter" | path_xargs git-diff-tree -r -p "$id1" "$id2" -- | colorize | pager
else
git-diff-tree -r -p "$id1" "$id2" | colorize | pager
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-object-id new/cogito-0.17.3/cg-object-id
--- old/cogito-0.17.2/cg-object-id 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-object-id 2006-06-18 02:16:21.000000000 +0200
@@ -135,7 +135,7 @@
if [ "$show_parent" ]; then
- git-cat-file commit "$normid" | awk '/^parent/{print $2};/^$/{exit}'
+ git-rev-list --parents -n 1 "$normid" | tr ' ' '\n' | tail -n +2
exit 0
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-patch new/cogito-0.17.3/cg-patch
--- old/cogito-0.17.2/cg-patch 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-patch 2006-06-18 02:16:21.000000000 +0200
@@ -306,6 +306,7 @@
[ "$unidiff" ] && newsfile="$(mktemp -t gitapply.XXXXXX)"
gonefile="$(mktemp -t gitapply.XXXXXX)"
todo="$(mktemp -t gitapply.XXXXXX)"
+patchout="$(mktemp -t gitapply.XXXXXX)"
patchfifo="$(mktemp -t gitapply.XXXXXX)"
rm "$patchfifo" && mkfifo -m 600 "$patchfifo"
@@ -316,7 +317,7 @@
# just handle it all ourselves.
patch_args="-p$strip -N"
[ "$reverse" ] && patch_args="$patch_args -R"
-patch $patch_args <"$patchfifo" &
+patch $patch_args <"$patchfifo" >"$patchout" 2>&1 &
tee "$patchfifo" | {
redzone_reset
@@ -362,6 +363,7 @@
} >$todo
wait %1; ret=$?
+cat "$patchout"
IFS=$'\n' emptyfiles=($(git-ls-files --deleted | join -v 2 "$gonefile" -))
if [ "$unidiff" ]; then
@@ -396,7 +398,7 @@
done
' padding
-rm "$patchfifo" "$todo" "$gonefile"
+rm "$patchfifo" "$todo" "$gonefile" "$patchout"
[ "$unidiff" ] && rm "$newsfile"
exit $ret
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-push new/cogito-0.17.3/cg-push
--- old/cogito-0.17.2/cg-push 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-push 2006-06-18 02:16:21.000000000 +0200
@@ -69,8 +69,7 @@
sprembranch=":refs/heads/$rembranch"
if [ "${uri#http://}" != "$uri" -o "${uri#https://}" != "$uri" ]; then
- # git-http-push doesn't like $sprembranch
- git-http-push "$uri/" "$locbranch:$rembranch" "${tags[@]}"
+ git-http-push "$uri/" "$locbranch$sprembranch" "${tags[@]}"
elif [ "${uri#git+ssh://}" != "$uri" ]; then
send_pack_update "$name" "$(echo "$uri" | sed 's#^git+ssh://\([^/]*\)\(/.*\)$#\1:\2#')" "$locbranch$sprembranch" "${tags[@]}"
elif [ "${uri#rsync://}" != "$uri" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-rm new/cogito-0.17.3/cg-rm
--- old/cogito-0.17.2/cg-rm 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-rm 2006-06-18 02:16:21.000000000 +0200
@@ -48,7 +48,9 @@
if [ -d "$absfile" ]; then
if [ "$recursive" ]; then
echo "$file" >>"$TMPDIRFILE"
- git-ls-files "$absfile" >>"$TMPFILE"
+ git-ls-files "$absfile" | while IFS=$'' read path; do
+ echo "${path#$_git_relpath}"
+ done >>"$TMPFILE"
else
echo "$file is a directory (use cg-rm -r?)" >&2
error=1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cg-status new/cogito-0.17.3/cg-status
--- old/cogito-0.17.2/cg-status 2006-04-08 03:02:49.000000000 +0200
+++ new/cogito-0.17.3/cg-status 2006-06-18 02:16:21.000000000 +0200
@@ -203,7 +203,7 @@
if [ "$basepath" ]; then
while IFS=$'' read path; do
[ x"${path#$basepath}" != x"$path" ] &&
- echo "${path#$basepath}"
+ echo "${path#$_git_relpath}"
done
else
cat
@@ -217,14 +217,13 @@
commitignore=
[ -s "$_git/commit-ignore" ] && commitignore=1
- git-diff-index HEAD "$basepath" | cut -f5- -d' ' |
+ git-diff-index HEAD -- "${basepath:-.}" | cut -f5- -d' ' |
while IFS=$'\t' read -r mode file; do
if [ "$mode" = D ]; then
- [ "$(git-diff-files "$file")" ] && mode=!
+ [ "$(git-diff-files -- "$file")" ] && mode=!
elif [ "$mode" = M ] && [ "$commitignore" ]; then
fgrep -qx "$file" "$_git/commit-ignore" && mode=m
fi
- [ "$basepath" ] && file="${file#$basepath}"
should_show_flag "$mode" && echo "$mode $file"
done
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cogito-0.17.2/cogito.spec new/cogito-0.17.3/cogito.spec
--- old/cogito-0.17.2/cogito.spec 2006-04-08 03:12:34.000000000 +0200
+++ new/cogito-0.17.3/cogito.spec 2006-06-18 02:17:35.000000000 +0200
@@ -1,5 +1,5 @@
Name: cogito
-Version: 0.17.2
+Version: 0.17.3
Release: 1%{?dist}
Summary: The Cogito Version Control System
License: GPL
@@ -70,7 +70,7 @@
- Update summary and description
- Make architecture-independent
-* Wed Jul 6 2005 Chris Wright
participants (1)
-
root@suse.de