git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn: both merged commits and original commits are showing up in  branches after migration
@ 2010-07-09  2:58 Bradley Wagner
  2010-07-09  3:33 ` Bradley Wagner
  2010-07-12 17:34 ` Bradley Wagner
  0 siblings, 2 replies; 5+ messages in thread
From: Bradley Wagner @ 2010-07-09  2:58 UTC (permalink / raw)
  To: git

I've done a migration using "git-svn init" and "git-svn fetch". After
the migration, I did a "git log refs/remotes/svn/6.7" and found that
it listed both the commits that I merged into the 6.7 branch and the
original commits to the trunk/master even though the SVN history
obviously only has what was merged into that branch. Any idea why the
Git branch has both (see below)? I did notice that the merged commits
seem to have extra metadata in the "Merge" property.

Results of "git log /path/to/6.7":

commit 6e18557b8f7e7173d26df7dd1857362c27eb3ab1
Merge: e36cfba c8a400c
Author: <author>
Date:   Fri Jun 25 21:00:19 2010 +0000

    PROJ-6648 (Merged from Trunk): Updated the API version in build file

    git-svn-id:
file:///Users/Developers/git_transition/svn_repo/6.7@14254
f4356f54-06d4-464e-91d3-36485834cb4b

commit c8a400c3ef8ac113dd325382bedd073bfedc3dd1
Author: <author>
Date:   Fri Jun 25 20:39:33 2010 +0000

    PROJ-6648: Updated the API version in build file

    git-svn-id:
file:///Users/Developers/git_transition/svn_repo/trunk@14253
f4356f54-06d4-464e-91d3-36485834cb4b


commit 9b968ba82f6f850919c41702dc024703e5721b7e
Merge: <author2>
Author: Mike Strauch <mike.strauch@hannonhill.com>
Date:   Fri Jun 25 14:45:30 2010 +0000

    PROJ-6819: (Merged from Trunk) Reverted changes from last commit
where initialize and teardown were called on each sftpshuttle
invocation.  Now using a strategy where

    git-svn-id:
file:///Users/Developers/git_transition/svn_repo/6.7@14251
f4356f54-06d4-464e-91d3-36485834cb4b


commit c628db12ef8136cdf22749058e8d8682d0021b8b
Author: <author2>
Date:   Thu Jun 24 20:10:53 2010 +0000

    PROJ-6819: Reverted changes from last commit where initialize and
teardown were called on each sftpshuttle invocation.  Now using a
strategy where the retries counter

    git-svn-id:
file:///Users/Developers/git_transition/svn_repo/trunk@14240
f4356f54-06d4-464e-91d3-36485834cb4b

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

* Re: git-svn: both merged commits and original commits are showing up  in branches after migration
  2010-07-09  2:58 git-svn: both merged commits and original commits are showing up in branches after migration Bradley Wagner
@ 2010-07-09  3:33 ` Bradley Wagner
  2010-07-12 17:34 ` Bradley Wagner
  1 sibling, 0 replies; 5+ messages in thread
From: Bradley Wagner @ 2010-07-09  3:33 UTC (permalink / raw)
  To: git

Note: I could understand how the log could contain commits to the
trunk from *before* the branch was made, but not commits to the trunk
after the branch was made that were eventually merged into the branch
in a separate commit.

On Thu, Jul 8, 2010 at 10:58 PM, Bradley Wagner
<bradley.wagner@hannonhill.com> wrote:
> I've done a migration using "git-svn init" and "git-svn fetch". After
> the migration, I did a "git log refs/remotes/svn/6.7" and found that
> it listed both the commits that I merged into the 6.7 branch and the
> original commits to the trunk/master even though the SVN history
> obviously only has what was merged into that branch. Any idea why the
> Git branch has both (see below)? I did notice that the merged commits
> seem to have extra metadata in the "Merge" property.
>
> Results of "git log /path/to/6.7":
>
> commit 6e18557b8f7e7173d26df7dd1857362c27eb3ab1
> Merge: e36cfba c8a400c
> Author: <author>
> Date:   Fri Jun 25 21:00:19 2010 +0000
>
>    PROJ-6648 (Merged from Trunk): Updated the API version in build file
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/6.7@14254
> f4356f54-06d4-464e-91d3-36485834cb4b
>
> commit c8a400c3ef8ac113dd325382bedd073bfedc3dd1
> Author: <author>
> Date:   Fri Jun 25 20:39:33 2010 +0000
>
>    PROJ-6648: Updated the API version in build file
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/trunk@14253
> f4356f54-06d4-464e-91d3-36485834cb4b
>
>
> commit 9b968ba82f6f850919c41702dc024703e5721b7e
> Merge: <author2>
> Author: Mike Strauch <mike.strauch@hannonhill.com>
> Date:   Fri Jun 25 14:45:30 2010 +0000
>
>    PROJ-6819: (Merged from Trunk) Reverted changes from last commit
> where initialize and teardown were called on each sftpshuttle
> invocation.  Now using a strategy where
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/6.7@14251
> f4356f54-06d4-464e-91d3-36485834cb4b
>
>
> commit c628db12ef8136cdf22749058e8d8682d0021b8b
> Author: <author2>
> Date:   Thu Jun 24 20:10:53 2010 +0000
>
>    PROJ-6819: Reverted changes from last commit where initialize and
> teardown were called on each sftpshuttle invocation.  Now using a
> strategy where the retries counter
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/trunk@14240
> f4356f54-06d4-464e-91d3-36485834cb4b
>

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

* Re: git-svn: both merged commits and original commits are showing up  in branches after migration
  2010-07-09  2:58 git-svn: both merged commits and original commits are showing up in branches after migration Bradley Wagner
  2010-07-09  3:33 ` Bradley Wagner
@ 2010-07-12 17:34 ` Bradley Wagner
  2010-07-12 18:24   ` Jonathan Nieder
  1 sibling, 1 reply; 5+ messages in thread
From: Bradley Wagner @ 2010-07-12 17:34 UTC (permalink / raw)
  To: git

I'm getting ready to switch over to Git entirely and wanted to make
sure this was expected behavior. It appears to be based on the
presence of the "Merge" property but I'm still not exactly sure why
the original commit would show up in the branch history.

I asked the same question on StackOverflow:
http://stackoverflow.com/questions/3229024/git-commits-to-master-branch-showing-up-in-other-branches.

On Thu, Jul 8, 2010 at 10:58 PM, Bradley Wagner
<bradley.wagner@hannonhill.com> wrote:
> I've done a migration using "git-svn init" and "git-svn fetch". After
> the migration, I did a "git log refs/remotes/svn/6.7" and found that
> it listed both the commits that I merged into the 6.7 branch and the
> original commits to the trunk/master even though the SVN history
> obviously only has what was merged into that branch. Any idea why the
> Git branch has both (see below)? I did notice that the merged commits
> seem to have extra metadata in the "Merge" property.
>
> Results of "git log /path/to/6.7":
>
> commit 6e18557b8f7e7173d26df7dd1857362c27eb3ab1
> Merge: e36cfba c8a400c
> Author: <author>
> Date:   Fri Jun 25 21:00:19 2010 +0000
>
>    PROJ-6648 (Merged from Trunk): Updated the API version in build file
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/6.7@14254
> f4356f54-06d4-464e-91d3-36485834cb4b
>
> commit c8a400c3ef8ac113dd325382bedd073bfedc3dd1
> Author: <author>
> Date:   Fri Jun 25 20:39:33 2010 +0000
>
>    PROJ-6648: Updated the API version in build file
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/trunk@14253
> f4356f54-06d4-464e-91d3-36485834cb4b
>
>
> commit 9b968ba82f6f850919c41702dc024703e5721b7e
> Merge: <author2>
> Author: Mike Strauch <mike.strauch@hannonhill.com>
> Date:   Fri Jun 25 14:45:30 2010 +0000
>
>    PROJ-6819: (Merged from Trunk) Reverted changes from last commit
> where initialize and teardown were called on each sftpshuttle
> invocation.  Now using a strategy where
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/6.7@14251
> f4356f54-06d4-464e-91d3-36485834cb4b
>
>
> commit c628db12ef8136cdf22749058e8d8682d0021b8b
> Author: <author2>
> Date:   Thu Jun 24 20:10:53 2010 +0000
>
>    PROJ-6819: Reverted changes from last commit where initialize and
> teardown were called on each sftpshuttle invocation.  Now using a
> strategy where the retries counter
>
>    git-svn-id:
> file:///Users/Developers/git_transition/svn_repo/trunk@14240
> f4356f54-06d4-464e-91d3-36485834cb4b
>



-- 
Hannon Hill - Put Us to the Test
bradley.wagner@hannonhill.com | http://www.hannonhill.com

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

* Re: git-svn: both merged commits and original commits are showing up in branches after migration
  2010-07-12 17:34 ` Bradley Wagner
@ 2010-07-12 18:24   ` Jonathan Nieder
  2010-07-12 18:31     ` Bradley Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Nieder @ 2010-07-12 18:24 UTC (permalink / raw)
  To: Bradley Wagner; +Cc: git

Hi Bradley,

Bradley Wagner wrote:
> On Thu, Jul 8, 2010 at 10:58 PM, Bradley Wagner wrote:

>> I've done a migration using "git-svn init" and "git-svn fetch". After
>> the migration, I did a "git log refs/remotes/svn/6.7" and found that
>> it listed both the commits that I merged into the 6.7 branch and the
>> original commits to the trunk/master even though the SVN history
>> obviously only has what was merged into that branch.

Yes, this is intentional.  If you try ‘gitk --all’, you can see
the history of all branches, where they branched from, and so on.

As far as I know the svn:mergeinfo is not actually used until
a merge.  Instead, git-svn uses subversion’s file copy tracking
information to follow history past a branch point; see the
find_parent_branch function in the git-svn script for details.

Hope that helps,
Jonathan

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

* Re: git-svn: both merged commits and original commits are showing up  in branches after migration
  2010-07-12 18:24   ` Jonathan Nieder
@ 2010-07-12 18:31     ` Bradley Wagner
  0 siblings, 0 replies; 5+ messages in thread
From: Bradley Wagner @ 2010-07-12 18:31 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

Thanks!

Seemed weird at first that I would see both the original commit and
the merge. I'm realizing now that this is the way Git handles merges,
however, so I guess it's just trying to apply the same logic during
the svn 2 git migration by utilizing the svn:merge-info to "re-create"
the branch history.

I noticed that this did not happen in branches created before we
upgraded to the SVN version that supported merge tracking.

On Mon, Jul 12, 2010 at 2:24 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi Bradley,
>
> Bradley Wagner wrote:
>> On Thu, Jul 8, 2010 at 10:58 PM, Bradley Wagner wrote:
>
>>> I've done a migration using "git-svn init" and "git-svn fetch". After
>>> the migration, I did a "git log refs/remotes/svn/6.7" and found that
>>> it listed both the commits that I merged into the 6.7 branch and the
>>> original commits to the trunk/master even though the SVN history
>>> obviously only has what was merged into that branch.
>
> Yes, this is intentional.  If you try ‘gitk --all’, you can see
> the history of all branches, where they branched from, and so on.
>
> As far as I know the svn:mergeinfo is not actually used until
> a merge.  Instead, git-svn uses subversion’s file copy tracking
> information to follow history past a branch point; see the
> find_parent_branch function in the git-svn script for details.
>
> Hope that helps,
> Jonathan
>

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

end of thread, other threads:[~2010-07-12 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-09  2:58 git-svn: both merged commits and original commits are showing up in branches after migration Bradley Wagner
2010-07-09  3:33 ` Bradley Wagner
2010-07-12 17:34 ` Bradley Wagner
2010-07-12 18:24   ` Jonathan Nieder
2010-07-12 18:31     ` Bradley Wagner

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