All of lore.kernel.org
 help / color / mirror / Atom feed
* git svn clone clone php/pear/Net_LDAP2 misses tags and branches
@ 2015-10-25 14:43 Christian Weiske
  2015-10-25 15:32 ` Edmundo Carmona Antoranz
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Weiske @ 2015-10-25 14:43 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

Hi,


Using git 2.6.2 to clone an SVN repository misses out branches and tags.

The clone command:

$ git svn clone --trunk=trunk --tags=tags --branches=branches
  --prefix=origin/
  https://svn.php.net/repository/pear/packages/Net_LDAP2 -r 255346

The final repository's tag and branch list is empty.

There are tags and branches, though - see the web interface at
http://svn.php.net/viewvc/pear/packages/Net_LDAP2/

What am I doing wrong here?

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches
  2015-10-25 14:43 git svn clone clone php/pear/Net_LDAP2 misses tags and branches Christian Weiske
@ 2015-10-25 15:32 ` Edmundo Carmona Antoranz
  2015-10-25 16:30   ` Christian Weiske
  0 siblings, 1 reply; 5+ messages in thread
From: Edmundo Carmona Antoranz @ 2015-10-25 15:32 UTC (permalink / raw)
  To: Christian Weiske; +Cc: git

Using -r single-revision-number (against tha same repo), I was not
able to pull much (on that revision only the standard layout was set
up so nothing would come out for git)

Did you try with -r revision-number:HEAD?


.
.
.
r255572 = 73d7692d844ee6baae8b4b2e5fc0f07a4118d09e (refs/remotes/svn/trunk)
       M       package2.xml
r255574 = d1f380277cb6a4d096d71e3a83942bb17dabf041 (refs/remotes/svn/trunk)
Found possible branch point:
https://svn.php.net/repository/pear/packages/Net_LDAP2/trunk =>
https://svn.php.net/repository/pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2
, 255574
Found branch parent: (refs/remotes/svn/tags/RELEASE_2_0_0RC2)
d1f380277cb6a4d096d71e3a83942bb17dabf041
Following parent with do_switch
       D       LICENSE
       D       tests/ldif_data/unsorted_w50_WIN.ldif
Successfully followed parent
W: -empty_dir: LICENSE
W: -empty_dir: tests/ldif_data/unsorted_w50_WIN.ldif
r255575 = d37158da793aee8692a6dca23870b9d2e3baaf18
(refs/remotes/svn/tags/RELEASE_2_0_0RC2)
       M       package2.xml
r255576 = 05d71ac6543430b119232714334b3d836d20bfc8 (refs/remotes/svn/trunk)
       M       package2.xml
       M       LDAP2/Entry.php
.
.
.


On Sun, Oct 25, 2015 at 8:43 AM, Christian Weiske <cweiske@cweiske.de> wrote:
> Hi,
>
>
> Using git 2.6.2 to clone an SVN repository misses out branches and tags.
>
> The clone command:
>
> $ git svn clone --trunk=trunk --tags=tags --branches=branches
>   --prefix=origin/
>   https://svn.php.net/repository/pear/packages/Net_LDAP2 -r 255346
>
> The final repository's tag and branch list is empty.
>
> There are tags and branches, though - see the web interface at
> http://svn.php.net/viewvc/pear/packages/Net_LDAP2/
>
> What am I doing wrong here?
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -=≡ Geeking around in the name of science since 1982 ≡=-

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

* Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches
  2015-10-25 15:32 ` Edmundo Carmona Antoranz
@ 2015-10-25 16:30   ` Christian Weiske
  2015-10-25 18:48     ` Christian Weiske
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Weiske @ 2015-10-25 16:30 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Hello Edmundo,


> Using -r single-revision-number (against tha same repo), I was not
> able to pull much (on that revision only the standard layout was set
> up so nothing would come out for git)

It's actually the standard layout here; I only used the single
parameters to rule out problems with --stdlayout.


> Did you try with -r revision-number:HEAD?

Good idea. I tried it, and now I have the tags and branches:

$ git svn clone --stdlayout
  https://svn.php.net/repository/pear/packages/Net_LDAP2
  -r 255346:HEAD
...

$ cd Net_LDAP2
$ git br -a
* master
  remotes/origin/implementingPagedSearches_PHP5.4
  remotes/origin/tags/Net_LDAP2-2.0.10
  remotes/origin/tags/Net_LDAP2-2.0.12
...
  remotes/origin/trunk

Thanks!


Is there a way to convert the tags branches into real tags
automatically?


-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches
  2015-10-25 16:30   ` Christian Weiske
@ 2015-10-25 18:48     ` Christian Weiske
  2015-10-25 19:25       ` Edmundo Carmona Antoranz
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Weiske @ 2015-10-25 18:48 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

Hello Christian,


> > Did you try with -r revision-number:HEAD?
> 
> Good idea. I tried it, and now I have the tags and branches:

Unfortunately, the tag branches only have a single commit and have no
relation to the trunk branch:

$ git log --oneline origin/tags/Net_LDAP2-2.0.12
0bc9db1 Tagging the 2.0.12 release
$

What can I do against that?

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: git svn clone clone php/pear/Net_LDAP2 misses tags and branches
  2015-10-25 18:48     ` Christian Weiske
@ 2015-10-25 19:25       ` Edmundo Carmona Antoranz
  0 siblings, 0 replies; 5+ messages in thread
From: Edmundo Carmona Antoranz @ 2015-10-25 19:25 UTC (permalink / raw)
  To: Christian Weiske; +Cc: git

I think there's something "odd" in the way that branch was created. If
I take a look at another branch:

$ svn log -v --stop-on-copy
https://svn.php.net/repository/pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2
------------------------------------------------------------------------
r255575 | cvs2svn | 2008-03-20 03:37:53 -0600 (Thu, 20 Mar 2008) | 1 line
Changed paths:
  A /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2 (from
/pear/packages/Net_LDAP2/trunk:255574)
  D /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2/LICENSE
  D /pear/packages/Net_LDAP2/tags/RELEASE_2_0_0RC2/tests/ldif_data/unsorted_w50_WIN.ldif

This commit was manufactured by cvs2svn to create tag 'RELEASE_2_0_0RC2'.
------------------------------------------------------------------------

We can see that it looks as if there was a single 'cp' operation for
the whole root of the branch from trunk.

And the log for that branch (on git) does show the history coming from trunk.


On the branch you are talking about:

$ svn log -v --stop-on-copy
https://svn.php.net/repository/pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12
------------------------------------------------------------------------
r318475 | beni | 2011-10-27 07:49:00 -0600 (Thu, 27 Oct 2011) | 1 line
Changed paths:
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/Entry.php
(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/Entry.php:318466)
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/Filter.php
(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/Filter.php:318470)
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/LDIF.php
(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/LDIF.php:318466)
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/Net/LDAP2/RootDSE.php
(from /pear/packages/Net_LDAP2/trunk/Net/LDAP2/RootDSE.php:318466)
.
.
.
   A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/tests/ldif_data/unsorted_w50.ldif
(from /pear/packages/Net_LDAP2/trunk/tests/ldif_data/unsorted_w50.ldif:318466)
  A /pear/packages/Net_LDAP2/tags/Net_LDAP2-2.0.12/tests/ldif_data/unsorted_w50_WIN.ldif
(from /pear/packages/Net_LDAP2/trunk/tests/ldif_data/unsorted_w50_WIN.ldif:3184
66)

Tagging the 2.0.12 release
------------------------------------------------------------------------


And this tells me that the way the branch was created is not the same
as in the other branch (files picked from different revisions?). I
guess that's what is making git-svn get "confused".

I guess you could just create a real git tag on a new revision coming
from trunk revision 318466, replace the files with the right revisions
(the ones that were pulled from another revision) and live with it.

On Sun, Oct 25, 2015 at 12:48 PM, Christian Weiske <cweiske@cweiske.de> wrote:
> Hello Christian,
>
>
>> > Did you try with -r revision-number:HEAD?
>>
>> Good idea. I tried it, and now I have the tags and branches:
>
> Unfortunately, the tag branches only have a single commit and have no
> relation to the trunk branch:
>
> $ git log --oneline origin/tags/Net_LDAP2-2.0.12
> 0bc9db1 Tagging the 2.0.12 release
> $
>
> What can I do against that?
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -=≡ Geeking around in the name of science since 1982 ≡=-

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

end of thread, other threads:[~2015-10-25 19:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25 14:43 git svn clone clone php/pear/Net_LDAP2 misses tags and branches Christian Weiske
2015-10-25 15:32 ` Edmundo Carmona Antoranz
2015-10-25 16:30   ` Christian Weiske
2015-10-25 18:48     ` Christian Weiske
2015-10-25 19:25       ` Edmundo Carmona Antoranz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.