git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn: problem with svn cp trunk/subdir tags/subdir_1.0
@ 2013-04-29 12:46 Ilya Basin
  2013-04-29 13:00 ` Ilya Basin
  2013-05-02 18:19 ` Ilya Basin
  0 siblings, 2 replies; 3+ messages in thread
From: Ilya Basin @ 2013-04-29 12:46 UTC (permalink / raw)
  To: Git mailing list; +Cc: Ray Chen, Eric Wong

After fixing --preserve-empty-dirs plus --stdlayout a new problem
arised:
When creating a tag or branch from a subdir, a disjoint branch
is created. Then git-svn re-imports the commits using this dir as
strip path.

Why? I would instead keep the current commit as parent, delete
everything except the subdir and move its contents to root directory.

During this re-import the variable %added_placeholder is not up to
date. Because the branch is disjoint, this variable should be empty in
the beginning, but it's not.
Because of that git-svn tries to delete non-existent .gitignore files
and dies.

I think, if a disjoint branch is created, %added_placeholder should be
pushed and cleared. A new set of paths starting with "trunk/" will be
added to it during re-import.
When re-import is done, we should translate the paths to
"tags/subdir_1.0/" and merge with the original %added_placeholder.

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

* Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0
  2013-04-29 12:46 git-svn: problem with svn cp trunk/subdir tags/subdir_1.0 Ilya Basin
@ 2013-04-29 13:00 ` Ilya Basin
  2013-05-02 18:19 ` Ilya Basin
  1 sibling, 0 replies; 3+ messages in thread
From: Ilya Basin @ 2013-04-29 13:00 UTC (permalink / raw)
  To: Git mailing list; +Cc: Ray Chen, Eric Wong

IB> After fixing --preserve-empty-dirs plus --stdlayout a new problem
IB> arised:
IB> When creating a tag or branch from a subdir, a disjoint branch
IB> is created. Then git-svn re-imports the commits using this dir as
IB> strip path.

IB> Why? I would instead keep the current commit as parent, delete
IB> everything except the subdir and move its contents to root directory.

IB> During this re-import the variable %added_placeholder is not up to
IB> date. Because the branch is disjoint, this variable should be empty in
IB> the beginning, but it's not.
IB> Because of that git-svn tries to delete non-existent .gitignore files
IB> and dies.

IB> I think, if a disjoint branch is created, %added_placeholder should be
IB> pushed and cleared. A new set of paths starting with "trunk/" will be
IB> added to it during re-import.
IB> When re-import is done, we should translate the paths to
IB> "tags/subdir_1.0/" and merge with the original %added_placeholder.

A simpler approach would be to store paths in %added_placeholder
already translated from "trunk/subdir/" to "tags/subdir_1.0/".
But in the beginning of re-import Fetcher doesn't know the new branch
name.

-- 

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

* Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0
  2013-04-29 12:46 git-svn: problem with svn cp trunk/subdir tags/subdir_1.0 Ilya Basin
  2013-04-29 13:00 ` Ilya Basin
@ 2013-05-02 18:19 ` Ilya Basin
  1 sibling, 0 replies; 3+ messages in thread
From: Ilya Basin @ 2013-05-02 18:19 UTC (permalink / raw)
  To: Eric Wong, Junio C Hamano; +Cc: Git mailing list

IB> When creating a tag or branch from a subdir, a disjoint branch
IB> is created. Then git-svn re-imports the commits using this dir as
IB> strip path.

IB> Why? I would instead keep the current commit as parent, delete
IB> everything except the subdir and move its contents to root directory.

Even worse, git-svn does doble work, failing to find the parent branch:
The revision is imported 3 times (2 times creating the same SHA)

    r8803 = 7bfe8f8d950edd645c6f15193e639953c0b936ac (refs/remotes/trunk)
    Found possible branch point: file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/trunk/GUI => file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/tags/GUI_4.0.25, 8803
    Initializing parent: refs/remotes/tags/GUI_4.0.25@8803
    r6 = de89d3fd4dff9c44f1c79a316364196d0c81c9f6 (refs/remotes/tags/GUI_4.0.25@8803)
    ...
    r8803 = ffc46ad0e967636f2000d354481c0419a4c6cec4 (refs/remotes/tags/GUI_4.0.25@8803)
    Found branch parent: (refs/remotes/tags/GUI_4.0.25) ffc46ad0e967636f2000d354481c0419a4c6cec4
    Following parent with do_switch
    Successfully followed parent
    r8804 = 2cbe962f0fb58c3f2d236ca918941e353da45af4 (refs/remotes/tags/GUI_4.0.25)
    ...


    r8923 = ad38e54ca9bb6b26654571bb14d17301484437dc (refs/remotes/tags/GUI_4.0.26)
    r8924 = e1932e8fdeab291f54ed06064da3ae7eb1e3eddb (refs/remotes/trunk)
    Found possible branch point: file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/trunk/GUI => file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/tags/GUI_4.0.26, 8925
    Initializing parent: refs/remotes/tags/GUI_4.0.26@8925
    r6 = de89d3fd4dff9c44f1c79a316364196d0c81c9f6 (refs/remotes/tags/GUI_4.0.26@8925)
    ...
    r8803 = ffc46ad0e967636f2000d354481c0419a4c6cec4 (refs/remotes/tags/GUI_4.0.26@8925)
    r8805 = dac5886451f64e63d70b307bcc6f0c8ccf9c9882 (refs/remotes/tags/GUI_4.0.26@8925)
    ...

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

end of thread, other threads:[~2013-05-02 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 12:46 git-svn: problem with svn cp trunk/subdir tags/subdir_1.0 Ilya Basin
2013-04-29 13:00 ` Ilya Basin
2013-05-02 18:19 ` Ilya Basin

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).