git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Eddy Petrișor" <eddy.petrisor@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 0/3] git-svn-externals PoC (in a sh script)
Date: Wed, 10 Sep 2008 16:56:10 +0300	[thread overview]
Message-ID: <60381eeb0809100656u1117cfb6i72e327495d513f9c@mail.gmail.com> (raw)
In-Reply-To: <20080829092927.GA7500@yp-box.dyndns.org>

(Please keep the CC. Thanks)

2008/8/29 Eric Wong <normalperson@yhbt.net>:
> Eddy Petrișor <eddy.petrisor@gmail.com> wrote:
>> Hello,
>
> Hi Eddy,

Hello and sorry for the late reply.

(I was on a small vacation away from the computer in the last two weeks.)

>> I have started a while back working on support for svn:externals
>> support for git-svn, but since I'm not that satisfied with the current
>> status of the patch, I haven't modified git-svn itself and just left
>> the sh script I made as a PoC as it was.
>>
>> There's still work to be done to it, but I the current version is
>> functional enough to be probably found useful by more people than
>> myself.
>
> Cool.
>
> I definitely like the separate script approach.  Not sure if you read my
> posts, your PoC seems inline with my thoughts on handling externals be
> seen here:
>
> http://article.gmane.org/gmane.comp.version-control.git/91283
> http://article.gmane.org/gmane.comp.version-control.git/91293

WRT the revision pinning, it seems to me that is enough to locate that
revision on the URI in question and checkout that revision. Still I am
unsure if it would be wise to (stash +) svn rebase + checkout the
pinned version (+ stash pop), since one would needlessly pull newer
stuff as the remote svn HEAD advances, but the pinned version might
simply stagnate.


I already have/wrote some code that follows the remote HEAD or a
specific for the necessary, but I am unsure if is still present in the
PoC script, is not that hard (in sh - a "svn info" on the URI, not on
the local copy would reveal the real revision of the HEAD).

>> Current status follows:
>>
>>     Current functionality:
>>      - fetches all the externals of an already svn-fetched repo
>>      - support for svn:externals refresh
>>      - if the location of the external has changed, the current working
>>        copy will be placed aside and a new directory will be created
>>        instead
>>      - if the remote URI is the same (maybe a verison bump, there will
>>        be a 'git svn rebase'
>>      - remove support (useful for testing purposes or clean restarts)
>>      - avoid zombie externals at all costs - in some repos empty
>>        svn:externals might exist; svn ignores such externals, so git should
>>        do the same
>>
>>     TODO:
>>      - take into account the revision of an external, if it exists
>>      - do not do deep svn cloning, to avoid legthy operations, just pull HEAD
>>        (this actually needs changes in git-svn itself)
>
> git svn clone -r<latest_revision_number> URL should work if you extract
> the revision number easily.

Why was I under the impression that this wasn't working? Or was I
expecting a shallow repo?

> Specifying "-rHEAD" will only work if the
> branch of the external you're tracking was the last modified revision in
> the repository, so it's not very useful.

as I already said, "svn info URI" can return the real revision, no
need to ness with the pseudo-revision HEAD.

>  "svn log" seems to have the
> same semantics as git-svn as far as -rHEAD being useful or not...
>
>>      - use/create shallow copies to git svn repos (one revision should be enough
>>        for most externals)
>>      - use submodules for externals
>
> I'm not sure if mapping submodules to externals is a good idea
> because externals don't require exact revisions and submodules do.

I don't think I can follow you. Externals actually require exact
revisions or can be made to pretend as if they do in git-svn context
with continuous HEAD refresh.

> There's also an issue I was just made aware of two days ago with
> submodules and git-svn that I haven't had time to work on.
>
> Another user also privately reported a bug to me about git-svn having
> trouble dcommitting when using submodules.  I've attached the test case
> here in case you have any thoughts on how to handle this (I think the
> easiest would be to ignore submodules on dcommit entirely).

Probably, and try later to tackle the problem.

>> Any comments are welcome.
>
> Also some small portability issues: "grep -q" is definitely unportable
> in my experience.  There are probably some more that I am missing my eye
> at this time of night...

Will fix it.

-- 
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein

  parent reply	other threads:[~2008-09-10 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-29  0:02 [PATCH 0/3] git-svn-externals PoC (in a sh script) Eddy Petrișor
2008-08-29  0:02 ` [PATCH] git svn: should not display zombie externals Eddy Petrișor
2008-08-29  0:02   ` [PATCH] First crude implementation of git-svn-externals Eddy Petrișor
2008-08-29  0:02     ` [PATCH] added a test frame for git-svn-externals.sh Eddy Petrișor
2008-08-29  0:16 ` [PATCH 0/3] git-svn-externals PoC (in a sh script) Eddy Petrișor
2008-08-29  9:29 ` Eric Wong
2008-09-01  6:20   ` RFH: git-svn and submodules Eric Wong
2008-09-10 13:56   ` Eddy Petrișor [this message]
2008-09-10 13:59     ` [PATCH 0/3] git-svn-externals PoC (in a sh script) Eddy Petrișor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60381eeb0809100656u1117cfb6i72e327495d513f9c@mail.gmail.com \
    --to=eddy.petrisor@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).