# Is there an updated version of git-vcs-p4?

4 messages from 2010-09-13 to 2010-09-13. Participants: Tor Arvid Lund, Sverre Rabbelier, Daniel Barkalow.
Thread: https://gitlist.dev/t/25090

## Tor Arvid Lund, 2010-09-13 09:04

Subject: Is there an updated version of git-vcs-p4?
Message-ID: <AANLkTi=okJRFeBhbURB8Ez4Vb65fNdacKeko+4sx9ihy@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DokJRFeBhbURB8Ez4Vb65fNdacKeko%2B4sx9ihy%40mail.gmail.com

```
Hello, Daniel (and list). I wonder if I might ask you if you have an
"updated" version of git-vcs-p4? Or otherwise, if anyone can hold my
hand while I try to implement what I need... :)

I'm having trouble getting exporting to work. Looking at the C code, I
quickly realize that there's _much_ I don't know anything about, but
it seems to me that vcs-p4.c needs to support the "refspec "
capability. Am I on the right track?

My reasoning so far: the version of vcs-p4.c that I have, contained a
prefixcmp for "export ". This made "git push" barf with the current
version of transport-helper.c, so I did something like this:

diff --git a/vcs-p4/vcs-p4.c b/vcs-p4/vcs-p4.c
index a4613a6..29d761b 100644
--- a/vcs-p4/vcs-p4.c
+++ b/vcs-p4/vcs-p4.c
@@ -1213,7 +1213,18 @@ int main(int argc, const char **argv)
                        }
                        printf("\n");
                        fflush(stdout);
-               } else if (!prefixcmp(buf.buf, "export ")) {
+               } else if (!strcmp(buf.buf, "export")) {
+                       printf("\n"); // no export-marks file
+                       printf("\n"); // no import-marks file either
+                       fflush(stdout);


This got me one step further, but it now produces an empty argument
list to fast-export (in the transport-helper function
push_refs_with_export), because the data->refspecs is NULL. It seems
to get set in get_helper when it encounters the "refspec " cap (which
vcs-p4 does not support).

So - is this "refspec " thingy what needs to be implemented, or am I
lost in space here? :)

-Tor Arvid-

```

## Sverre Rabbelier, 2010-09-13 18:53

Subject: Re: Is there an updated version of git-vcs-p4?
Message-ID: <AANLkTi=x7T+VgnC0s7L+un5UORc2LwisSF-EPrh8RAE0@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3Dx7T%2BVgnC0s7L%2Bun5UORc2LwisSF-EPrh8RAE0%40mail.gmail.com
In-Reply-To: <AANLkTi=okJRFeBhbURB8Ez4Vb65fNdacKeko+4sx9ihy@mail.gmail.com>

```
Heya,

On Mon, Sep 13, 2010 at 11:04, Tor Arvid Lund <torarvid@gmail.com> wrote:
> I'm having trouble getting exporting to work. Looking at the C code, I
> quickly realize that there's _much_ I don't know anything about, but
> it seems to me that vcs-p4.c needs to support the "refspec "
> capability. Am I on the right track?
>
> My reasoning so far: the version of vcs-p4.c that I have, contained a
> prefixcmp for "export ". This made "git push" barf with the current
> version of transport-helper.c, so I did something like this:

The export capability that is now in git is different from the one
Daniel sketched initially. It's not really done for prime time anyway
(see my email to Shawn about it not working). If you're interested in
working on the git remote-helper infrastructure, let me know, and I
can tell you more about how it works in #git-devel on freenode.net for
example :).

-- 
Cheers,

Sverre Rabbelier

```

## Tor Arvid Lund, 2010-09-13 20:18

Subject: Re: Is there an updated version of git-vcs-p4?
Message-ID: <AANLkTi=2iHCcTM-x9_BjPLXsZuX+QaSasd7TmNiBLs6t@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3D2iHCcTM-x9_BjPLXsZuX%2BQaSasd7TmNiBLs6t%40mail.gmail.com
In-Reply-To: <AANLkTi=x7T+VgnC0s7L+un5UORc2LwisSF-EPrh8RAE0@mail.gmail.com>

```
On Mon, Sep 13, 2010 at 8:53 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> The export capability that is now in git is different from the one
> Daniel sketched initially. It's not really done for prime time anyway
> (see my email to Shawn about it not working). If you're interested in
> working on the git remote-helper infrastructure, let me know, and I
> can tell you more about how it works in #git-devel on freenode.net for
> example :).

Hi! Yeah, well I'm interested in getting it to work, and I'm happy to
do smallish patches and testing. But my C knowledge is basic'ish (as
in - used it a bit at school, almost never after that), and my
knowledge of the git core code is almost non-existant :-/

But shoot away, and I'll try and see if I get a feel for it :)

I'll hang out at #git-devel (as torarvid).

See you there :)

-Tor Arvid-

```

## Daniel Barkalow, 2010-09-13 21:24

Subject: Re: Is there an updated version of git-vcs-p4?
Message-ID: <alpine.LNX.2.00.1009131625450.14365@iabervon.org>
URL: https://gitlist.dev/e/alpine.LNX.2.00.1009131625450.14365%40iabervon.org
In-Reply-To: <AANLkTi=okJRFeBhbURB8Ez4Vb65fNdacKeko+4sx9ihy@mail.gmail.com>

```
On Mon, 13 Sep 2010, Tor Arvid Lund wrote:

> Hello, Daniel (and list). I wonder if I might ask you if you have an
> "updated" version of git-vcs-p4? Or otherwise, if anyone can hold my
> hand while I try to implement what I need... :)

I haven't done anything on it in ages (you probably have my latest 
version), and I never really got the export code to do all of the special 
things needed at my site. I haven't really been following all of the 
latest stuff Sverre's been doing, but I should still be able to explain 
things about the C and Perforce stuff if you have questions on that front.

	-Daniel
*This .sig left intentionally blank*

```
