public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND][PATCH] Script for automated historical Git tree grafting
@ 2006-05-05 21:34 Petr Baudis
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Baudis @ 2006-05-05 21:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

This script enables Git users to easily graft the historical Git tree
(Bitkeeper history import) to the current history.

Signed-off-by: Petr Baudis <pasky@suse.cz>

---
 git-gethistory.sh |   40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/scripts/git-gethistory.sh b/scripts/git-gethistory.sh
new file mode 100755
index 0000000..97b3e78
--- /dev/null
+++ b/scripts/git-gethistory.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Graft the development history imported from BitKeeper to the current Git
+# history tree.
+#
+# Note that this will download about 260M.
+
+httpget="curl -O -C -"
+
+if [ -z "`which curl 2>/dev/null`" ]; then
+  httpget="wget -c"
+  if [ -z "`which wget 2>/dev/null`" ]; then
+    echo "Error: You need to have wget or curl installed so that I can fetch the history." >&2
+    exit 1
+  fi
+fi
+
+[ "$GIT_DIR" ] || GIT_DIR=.git
+if ! [ -d "$GIT_DIR" ]; then
+  echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
+  exit 1
+fi
+cd "$GIT_DIR"
+
+echo "[git-gethistory] Downloading the history"
+mkdir -p objects/pack
+cd objects/pack
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.idx
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.pack
+
+echo "[git-gethistory] Setting up the grafts"
+cd ../..
+mkdir -p info
+# master
+echo 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e7e173af42dbf37b1d946f9ee00219cb3b2bea6a >>info/grafts
+
+echo "[git-gethistory] Refreshing the dumb server info wrt. new packs"
+cd ..
+git-update-server-info


-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RESEND][PATCH] Script for automated historical Git tree grafting
@ 2006-06-08  1:33 Petr Baudis
  2006-07-05  8:50 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Petr Baudis @ 2006-06-08  1:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

This script enables Git users to easily graft the historical Git tree
(Bitkeeper history import) to the current history.

Signed-off-by: Petr Baudis <pasky@suse.cz>

---
 git-gethistory.sh |   40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/scripts/git-gethistory.sh b/scripts/git-gethistory.sh
new file mode 100755
index 0000000..97b3e78
--- /dev/null
+++ b/scripts/git-gethistory.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Graft the development history imported from BitKeeper to the current Git
+# history tree.
+#
+# Note that this will download about 260M.
+
+httpget="curl -O -C -"
+
+if [ -z "`which curl 2>/dev/null`" ]; then
+  httpget="wget -c"
+  if [ -z "`which wget 2>/dev/null`" ]; then
+    echo "Error: You need to have wget or curl installed so that I can fetch the history." >&2
+    exit 1
+  fi
+fi
+
+[ "$GIT_DIR" ] || GIT_DIR=.git
+if ! [ -d "$GIT_DIR" ]; then
+  echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
+  exit 1
+fi
+cd "$GIT_DIR"
+
+echo "[git-gethistory] Downloading the history"
+mkdir -p objects/pack
+cd objects/pack
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.idx
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.pack
+
+echo "[git-gethistory] Setting up the grafts"
+cd ../..
+mkdir -p info
+# master
+echo 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e7e173af42dbf37b1d946f9ee00219cb3b2bea6a >>info/grafts
+
+echo "[git-gethistory] Refreshing the dumb server info wrt. new packs"
+cd ..
+git-update-server-info


-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RESEND][PATCH] Script for automated historical Git tree grafting
@ 2006-06-17 21:26 Petr Baudis
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Baudis @ 2006-06-17 21:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

This script enables Git users to easily graft the historical Git tree
(Bitkeeper history import) to the current history.

Signed-off-by: Petr Baudis <pasky@suse.cz>

---

Hi...? Is anyone listening? Seems like third or fourth resending.

 git-gethistory.sh |   40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/scripts/git-gethistory.sh b/scripts/git-gethistory.sh
new file mode 100755
index 0000000..97b3e78
--- /dev/null
+++ b/scripts/git-gethistory.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Graft the development history imported from BitKeeper to the current Git
+# history tree.
+#
+# Note that this will download about 260M.
+
+httpget="curl -O -C -"
+
+if [ -z "`which curl 2>/dev/null`" ]; then
+  httpget="wget -c"
+  if [ -z "`which wget 2>/dev/null`" ]; then
+    echo "Error: You need to have wget or curl installed so that I can fetch the history." >&2
+    exit 1
+  fi
+fi
+
+[ "$GIT_DIR" ] || GIT_DIR=.git
+if ! [ -d "$GIT_DIR" ]; then
+  echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
+  exit 1
+fi
+cd "$GIT_DIR"
+
+echo "[git-gethistory] Downloading the history"
+mkdir -p objects/pack
+cd objects/pack
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.idx
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-cc3517351ecce3ef7ba010559992bdfc10b7acd4.pack
+
+echo "[git-gethistory] Setting up the grafts"
+cd ../..
+mkdir -p info
+# master
+echo 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e7e173af42dbf37b1d946f9ee00219cb3b2bea6a >>info/grafts
+
+echo "[git-gethistory] Refreshing the dumb server info wrt. new packs"
+cd ..
+git-update-server-info


-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RESEND][PATCH] Script for automated historical Git tree grafting
  2006-06-08  1:33 [RESEND][PATCH] Script for automated historical Git tree grafting Petr Baudis
@ 2006-07-05  8:50 ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2006-07-05  8:50 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Linus Torvalds, Linux Kernel Mailing List

Hi Petr,

> This script enables Git users to easily graft the historical Git tree
> (Bitkeeper history import) to the current history.

it would be nice if you can specify a local location for the history
tree, because some people might already downloaded it.

And what about the tags of the history tree. It seems that these are
missing. We need to copy them, too.

Regards

Marcel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RESEND][PATCH] Script for automated historical Git tree grafting
@ 2006-09-24 17:57 Petr Baudis
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Baudis @ 2006-09-24 17:57 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel

This script enables Git users to easily graft the historical Git tree
(Bitkeeper history import) to the current history. It will also record
the appropriate tags in your refs tree as suggested by Marcel Holtmann.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

  Yet another resend, this time with actual difference! :-)

  I have pondered adding support for "local grafting" suggested by
Marcel Holtmann but setting up the tags properly would be impossible
in that case and overally you are much better off just setting manually
alternates and the single line in grafts file.

 scripts/git-gethistory.sh |   47 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/scripts/git-gethistory.sh b/scripts/git-gethistory.sh
new file mode 100755
index 0000000..2f19372
--- /dev/null
+++ b/scripts/git-gethistory.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Graft the development history imported from BitKeeper to the current Git
+# history tree.
+#
+# Note that this will download about 160M.
+
+httpget="curl -O -C -"
+if [ -z "`which curl 2>/dev/null`" ]; then
+	httpget="wget -c"
+	if [ -z "`which wget 2>/dev/null`" ]; then
+		echo "Error: You need to have wget or curl installed so that I can fetch the history." >&2
+		exit 1
+	fi
+fi
+
+[ "$GIT_DIR" ] || GIT_DIR=.git
+if ! [ -d "$GIT_DIR" ]; then
+	echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
+	exit 1
+fi
+cd "$GIT_DIR"
+export GIT_DIR="$(pwd)"
+
+echo "[git-gethistory] Downloading the history"
+mkdir -p objects/pack
+cd objects/pack
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-4d27038611fe7755938efd4a2745d5d5d35de1c1.idx
+$httpget http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/objects/pack/pack-4d27038611fe7755938efd4a2745d5d5d35de1c1.pack
+
+echo "[git-gethistory] Setting up the grafts"
+cd "$GIT_DIR"
+mkdir -p info
+# master
+echo 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e7e173af42dbf37b1d946f9ee00219cb3b2bea6a >>info/grafts
+
+echo "[git-gethistory] Setting up tag refs"
+cd "$GIT_DIR"
+git-ls-remote http://www.kernel.org/pub/scm/linux/kernel/git/tglx/history.git | \
+	grep refs/tags | grep -v '\^{}$' | \
+	while read obj ref; do
+		git-update-ref "$ref" "$obj"
+	done
+
+echo "[git-gethistory] Refreshing the dumb server info wrt. new packs"
+cd "$GIT_DIR"
+git-update-server-info

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-09-24 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08  1:33 [RESEND][PATCH] Script for automated historical Git tree grafting Petr Baudis
2006-07-05  8:50 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2006-09-24 17:57 Petr Baudis
2006-06-17 21:26 Petr Baudis
2006-05-05 21:34 Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox