Unfortunately i can't find a way to make it explicitly show it will do a
svn rename, but it does do it, so that makes this solution not very useful
either i guess.


--- git ---
[master svntest] % git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

renamed:    test -> moo

[master svntest] % git commit -m "woof"
[master 6e2c0b3] woof
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename test => moo (100%)
[master svntest] % git svn dcommit
Committing to https://.../trunk ...
R test => moo
Committed r3
D test
A moo
W: -empty_dir: trunk/test
r3 = 0ae41e170cf7d07ec3679eb85d55c068617e0a66 (refs/remotes/trunk)


----- svn ---

[trunk] % svn log --diff -v
------------------------------------------------------------------------
r3 | thomas | 2014-02-18 14:32:07 +0100 (Tue, 18 Feb 2014) | 1 line
Changed paths:
   A /trunk/moo (from /trunk/test:2)
   D /trunk/test

woof


On Tue, Feb 18, 2014 at 2:22 PM, Benson Margulies <[email protected]>wrote:

> Let me be specific. If I am sitting in a git clone that has been set
> up with git svn, and I use git apply to apply the output of git
> format-patch, if I dcommit, is the autodetection going to result in an
> svn mv?
>
>
> On Tue, Feb 18, 2014 at 8:20 AM, Thomas Matthijs <[email protected]> wrote:
> > Git does not track renames, but can show/detect it, the magic options
> are -C
> > and -M  for diff/show etc
> >
> >
> >
> > On Tue, Feb 18, 2014 at 2:16 PM, Benson Margulies <[email protected]
> >
> > wrote:
> >>
> >> I tried using git apply on a patch (from github's .patch URL)  that
> >> included a rename. no sign of a rename; just a delete and an add. I
> >> feel like I'm missing something.
> >>
> >> On Tue, Feb 18, 2014 at 7:36 AM, Shai Erera <[email protected]> wrote:
> >> > The problem I see is that if you generate a patch using 'git diff', it
> >> > applies just fine to svn (if you generate it w/ --no-prefix) without
> any
> >> > warnings about missing files due the rename. Wanted to warn the
> >> > community
> >> > about it, so that when committers assign themselves to PRs, they
> review
> >> > the
> >> > patch closer and detect manually if a rename as happened.
> >> >
> >> > We could decide that renames are done in a separate commit, but it's
> not
> >> > always possible.
> >> >
> >> > So mainly, FYI.
> >> >
> >> > And if someone has an idea for a script/ant-target we could write to
> >> > detect
> >> > this case, that would be awesome.
> >> >
> >> > Shai
> >> >
> >> >
> >> > On Tue, Feb 18, 2014 at 2:31 PM, Thomas Matthijs <[email protected]>
> >> > wrote:
> >> >>
> >> >> Github pull requests can be treated as individual cherry picked patch
> >> >> sets
> >> >> really, not branch merges ? (ie rebased) from there on out you're in
> >> >> svn
> >> >> land. No need to "merge".
> >> >>
> >> >> But indeed, it tries to detect it based on the file content, and
> >> >> doesn't
> >> >> work 100% as manual svn moves.
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Feb 18, 2014 at 1:27 PM, Benson Margulies
> >> >> <[email protected]>
> >> >> wrote:
> >> >>>
> >> >>> Well, git-svn has a heap of warnings against using it for merges;
> it's
> >> >>> also a really bad idea when renaming a whole package, as it does it
> >> >>> one-file-at-a-time.
> >> >>>
> >> >>> If you have a workflow that works with the ASF mirror and svn,
> please
> >> >>> write it up on the Wiki!
> >> >>>
> >> >>>
> >> >>> On Tue, Feb 18, 2014 at 7:23 AM, Thomas Matthijs <[email protected]>
> >> >>> wrote:
> >> >>> >
> >> >>> > On Tue, Feb 18, 2014 at 1:18 PM, Shai Erera <[email protected]>
> >> >>> > wrote:
> >> >>> >>
> >> >>> >>
> >> >>> >> Second, has anyone perhaps found a way to overcome that issue? I
> >> >>> >> thought
> >> >>> >> about maybe writing a script to detect that, looking at the patch
> >> >>> >> file, but
> >> >>> >> it seems hard to detect that the deleted Foo is the new Bar. If
> >> >>> >> it's
> >> >>> >> just
> >> >>> >> rename, maybe, but if part of the rename the code changed a lot
> ...
> >> >>> >> it
> >> >>> >> becomes harder.
> >> >>> >
> >> >>> >
> >> >>> > Probably not the answer you want but
> >> >>> > If you use the git-svn bridge it should detect the rename and
> commit
> >> >>> > it
> >> >>> > in
> >> >>> > svn as a move/copy
> >> >>> >
> >> >>> > https://www.kernel.org/pub/software/scm/git/docs/git-svn.html
> >> >>>
> >> >>>
> ---------------------------------------------------------------------
> >> >>> To unsubscribe, e-mail: [email protected]
> >> >>> For additional commands, e-mail: [email protected]
> >> >>>
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to