public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Script for automated historical Git tree grafting
@ 2006-04-07  0:47 Petr Baudis
  2006-04-07  0:52 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Baudis @ 2006-04-07  0:47 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] 4+ messages in thread

* Re: [PATCH] Script for automated historical Git tree grafting
  2006-04-07  0:47 [PATCH] Script for automated historical Git tree grafting Petr Baudis
@ 2006-04-07  0:52 ` Andrew Morton
  2006-04-08  3:09   ` Petr Baudis
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-04-07  0:52 UTC (permalink / raw)
  To: Petr Baudis; +Cc: torvalds, linux-kernel

Petr Baudis <pasky@suse.cz> wrote:
>
> This script enables Git users to easily graft the historical Git tree
>  (Bitkeeper history import) to the current history.

What impact will that have on the (already rather poor) performance of
git-whatchanged, gitk, etc?

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

* Re: [PATCH] Script for automated historical Git tree grafting
  2006-04-07  0:52 ` Andrew Morton
@ 2006-04-08  3:09   ` Petr Baudis
  2006-04-08 20:04     ` Nicholas Miell
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Baudis @ 2006-04-08  3:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: torvalds, linux-kernel, git

Dear diary, on Fri, Apr 07, 2006 at 02:52:46AM CEST, I got a letter
where Andrew Morton <akpm@osdl.org> said that...
> Petr Baudis <pasky@suse.cz> wrote:
> >
> > This script enables Git users to easily graft the historical Git tree
> >  (Bitkeeper history import) to the current history.
> 
> What impact will that have on the (already rather poor) performance of
> git-whatchanged, gitk, etc?

Negative. ;-)

I didn't try gitk myself, but according to Nick Riviera it eats 1.6G...
Otherwise, assuming that you have at least git-1.2.5, git-whatchanged on
the whole tree should be roughly equally fast as it was before grafting,
but git-whatchanged on individual paths is _significantly_ slower.

That said, 1.3.0rc2 should already have Linus' optimization which should
fix or at least mitigate the performance hit on narrowed-down
git-whatchanged.

-- 
				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	[flat|nested] 4+ messages in thread

* Re: [PATCH] Script for automated historical Git tree grafting
  2006-04-08  3:09   ` Petr Baudis
@ 2006-04-08 20:04     ` Nicholas Miell
  0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Miell @ 2006-04-08 20:04 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Andrew Morton, torvalds, linux-kernel, git

On Sat, 2006-04-08 at 05:09 +0200, Petr Baudis wrote:
> Dear diary, on Fri, Apr 07, 2006 at 02:52:46AM CEST, I got a letter
> where Andrew Morton <akpm@osdl.org> said that...
> > Petr Baudis <pasky@suse.cz> wrote:
> > >
> > > This script enables Git users to easily graft the historical Git tree
> > >  (Bitkeeper history import) to the current history.
> > 
> > What impact will that have on the (already rather poor) performance of
> > git-whatchanged, gitk, etc?
> 
> Negative. ;-)
> 
> I didn't try gitk myself, but according to Nick Riviera it eats 1.6G...
> Otherwise, assuming that you have at least git-1.2.5, git-whatchanged on
> the whole tree should be roughly equally fast as it was before grafting,
> but git-whatchanged on individual paths is _significantly_ slower.
> 
> That said, 1.3.0rc2 should already have Linus' optimization which should
> fix or at least mitigate the performance hit on narrowed-down
> git-whatchanged.

Actually, it ate more than 1.6G -- that was just the resident size, and
it likes to allocate more memory in between you closing the window and
it finally exiting (or, you killing it before it OOMs the box, whichever
comes first).

qgit has absolutely no problem with the grafted full history, though,
and those previously mentioned rev-list changes by Linus should fix
git-whatchanged.







Unfortunately, this does nothing to fix the disturbing lack of useless
Simpsons trivia knowledge in the git community. Keith Packard made the
same mistake last week.

-- 
Nicholas Miell <nmiell@comcast.net>


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

end of thread, other threads:[~2006-04-08 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-07  0:47 [PATCH] Script for automated historical Git tree grafting Petr Baudis
2006-04-07  0:52 ` Andrew Morton
2006-04-08  3:09   ` Petr Baudis
2006-04-08 20:04     ` Nicholas Miell

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