git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* incremental fast-import
@ 2007-07-26 21:47 Julian Phillips
  2007-07-27  0:51 ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Julian Phillips @ 2007-07-26 21:47 UTC (permalink / raw)
  To: Shawn O. Pearce, git

Sorry to be going on about fast-import again ...

I seem to be missing something though.  I can't seem to get it to work 
when run in an incremental manner.

I have a saved stream of fast-import commands.  Every time I run this 
through fast import I get the exact same marks file out.  This is good.

However if I feed it in in two chunks, then nearly all of the SHA1s 
generated in the second run are different to those produced in a single 
pass.  In addition I get a pair of "warning: Not updating 
refs/heads/BUG_101_BRANCH (new tip <some sha1> does not contain <other 
sha1>)" messages.  This is not so good.

I'm using the --import-marks and --export-marks options.  Is there 
something else I need to do to be able to run fast-import in an 
incremental manner?

-- 
Julian

  ---
A fool must now and then be right by chance.

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

* Re: incremental fast-import
  2007-07-26 21:47 incremental fast-import Julian Phillips
@ 2007-07-27  0:51 ` Shawn O. Pearce
  2007-07-27  7:44   ` Simon 'corecode' Schubert
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-07-27  0:51 UTC (permalink / raw)
  To: Julian Phillips; +Cc: git

Julian Phillips <julian@quantumfyre.co.uk> wrote:
> I seem to be missing something though.  I can't seem to get it to work 
> when run in an incremental manner.
> 
> I have a saved stream of fast-import commands.  Every time I run this 
> through fast import I get the exact same marks file out.  This is good.
> 
> However if I feed it in in two chunks, then nearly all of the SHA1s 
> generated in the second run are different to those produced in a single 
> pass.  In addition I get a pair of "warning: Not updating 
> refs/heads/BUG_101_BRANCH (new tip <some sha1> does not contain <other 
> sha1>)" messages.  This is not so good.
> 
> I'm using the --import-marks and --export-marks options.  Is there 
> something else I need to do to be able to run fast-import in an 
> incremental manner?

I'm guessing you didn't restart the branches at the start of the
second import.  You need to do something like this to get the import
going again:

  commit refs/heads/BUG_101_BRANCH
  from refs/heads/BUG_101_BRANCH^0
  ...

or because you imported the marks you can use a mark:

  commit refs/heads/BUG_101_BRANCH
  from :18981
  ...

where 18981 was the last revision on BUG_101_BRANCH that the frontend
had imported during the last run.


fast-import doesn't assume the local branches already exist.
It actually assumes its importing from scratch every time.  The
frontend tool needs to restart the branch if that is what it wants.

In other words, by splitting the file in half you actually also
split the history in half, and got two root commits, one of which
was in the middle of your history.  :-(

-- 
Shawn.

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

* Re: incremental fast-import
  2007-07-27  0:51 ` Shawn O. Pearce
@ 2007-07-27  7:44   ` Simon 'corecode' Schubert
  0 siblings, 0 replies; 3+ messages in thread
From: Simon 'corecode' Schubert @ 2007-07-27  7:44 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Julian Phillips, git

Shawn O. Pearce wrote:
> fast-import doesn't assume the local branches already exist.
> It actually assumes its importing from scratch every time.  The
> frontend tool needs to restart the branch if that is what it wants.

Is there a compelling reason for this behavior?  Shouldn't be so complicated to get an overview on which branches already exist?

Right now I have to do this with a side channel to fast-import, asking the git repo directly, and then "recreating" the branch, etc.  Works, but could be nicer, I guess.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

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

end of thread, other threads:[~2007-07-27  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 21:47 incremental fast-import Julian Phillips
2007-07-27  0:51 ` Shawn O. Pearce
2007-07-27  7:44   ` Simon 'corecode' Schubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).