Commit graph

6 commits

Author SHA1 Message Date
Shawn O. Pearce 6bb5b3291d Implemented branch handling and basic tree support in fast-import.
This provides the basic data structures needed to store trees in
memory while we are processing them for a branch.  What we are
attempting to do is track one complete tree for each branch that
the frontend has registered with us through the 'newb' (new_branch)
command.  When the frontend edits that tree through 'updf' or 'delf'
commands we'll mark the affected tree(s) as being dirty and recompute
their objects during 'comt' (commit).

Currently the protocol is decidedly _not_ user friendly.  I crashed
fast-import by giving it bad input data from Perl.  I may try to
improve upon it, or at least upon its error handling.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:03 -05:00
Shawn O. Pearce 6143f0644e Added basic command handler to fast-import.
Moved the new_blob logic off into a new subroutine and
invoked it when getting the 'blob' command.

Added statistics dump to STDERR when the program terminates listing
what it did at a high level.  This is somewhat interesting.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:03 -05:00
Shawn O. Pearce ac47a738a7 Refactored fast-import's internals for future additions.
Too many globals variables were being used not not enough
code was resuable to process trees and commits so this is
a simple refactoring of the existing blob processing code
to get into a state that will be easier to handle trees
and commits in.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:02 -05:00
Shawn O. Pearce 27d6d29035 Cleaned up memory allocation for object_entry structs.
Although its easy to ask the user to tell us how many objects they
will need, its probably better to dynamically grow the object table
in large units.  But if the user can give us a hint as to roughly
how many objects then we can still use it during startup.

Also stopped printing the SHA1 strings to stdout as no user is
currently making use of that facility.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:02 -05:00
Shawn O. Pearce 8bcce30126 Added automatic index generation to fast-import.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:01 -05:00
Shawn O. Pearce db5e523fdd Created fast-import, a tool to quickly generating a pack from blobs.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-14 02:15:01 -05:00