threads / discuss / 5159

EGIT packed delta format reading

Subject: EGIT packed delta format reading

## tl;dr

4 messages between Aug 6, 2006 and Aug 7, 2006.

replies: 3people: 2as markdown or json

Robin Rosenberg· Aug 6, 2006, 18:37 UTC · lore
Hi,

I deciced to take Shawns Eclipse plugin for a run. There was some problem reading the pack files that seemed to work after applying the following fixes, i.e. I could connect to the project and the interal structures looks ok in the debugger as far as I can tell, but decorations don't work. That's as far as I've been testing up to now.

BTW. How should EGIT patches be formatted to distingish them from git patches? I'm sending this using StGit.

-- robin
Robin Rosenberg· Aug 6, 2006, 18:40 UTC · re: Robin Rosenberg · lore

[PATCH] Fixes to packed delta format reading.

From: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/jgit/lib/PatchDeltaStream.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
index 808e854..11a7679 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
@@ -105,7 +105,7 @@ public class PatchDeltaStream extends In
                             + " load delta base for patching.");
                     }
                     shift += n;
-                    expBaseLen += n;
+                    expBaseLen -= n;
                 }
             }
             finally
@@ -269,7 +269,7 @@ public class PatchDeltaStream extends In
         throws IOException
     {
         int r;
-        while ((r = read(buf, o, len)) > 0)
+        while ((r = deltaStream.read(buf, o, len)) > 0)
         {
             o += r;
             len -= r;
Shawn Pearce· Aug 7, 2006, 04:03 UTC · re: Robin Rosenberg · lore

Re: [PATCH] Fixes to packed delta format reading.

Show 27 quoted lines
> ---
> 
>  .../src/org/spearce/jgit/lib/PatchDeltaStream.java |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
> index 808e854..11a7679 100644
> --- a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
> +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
> @@ -105,7 +105,7 @@ public class PatchDeltaStream extends In
>                              + " load delta base for patching.");
>                      }
>                      shift += n;
> -                    expBaseLen += n;
> +                    expBaseLen -= n;
>                  }
>              }
>              finally
> @@ -269,7 +269,7 @@ public class PatchDeltaStream extends In
>          throws IOException
>      {
>          int r;
> -        while ((r = read(buf, o, len)) > 0)
> +        while ((r = deltaStream.read(buf, o, len)) > 0)
>          {
>              o += r;
>              len -= r;

Thanks. I actually found these Friday night when I started reviewing the code to double check its compliance with A Large Angry SCM's file format documentation. These were already made locally but I didn't push them out to my web repository yet. I'll do that shortly.

-- 
Shawn.
Shawn Pearce· Aug 7, 2006, 04:07 UTC · re: Robin Rosenberg · lore

Re: EGIT packed delta format reading

Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
Show 8 quoted lines
> Hi,
> 
> I deciced to take Shawns Eclipse plugin for a run. There was
> some problem reading the pack files that seemed to work after
> applying the following fixes, i.e. I could connect to the
> project and the interal structures looks ok in the debugger
> as far as I can tell, but decorations don't work. That's as
> far as I've been testing up to now.
I'll take a look at it again, as soon as I get the tree entry
sorting fixed.
 
> BTW. How should EGIT patches be formatted to distingish them
> from git patches? I'm sending this using StGit.

You can use StGit to send patches, or any other GIT based tool. After all, we're using GIT. :-)

As far as marking patches specifically as an egit/jgit patch you can send them directly to me and CC: the mailing list. The egit/jgit file names are pretty distinctive, just as the core GIT and Cogito file names are. I doubt folks will get confused as to which project a patch belongs to...

-- 
Shawn.

← back to recent threads