Recovering from a loss of sync between git and svn

2 messages, 1 author, 2016-06-15 · open the first message on its own page

Recovering from a loss of sync between git and svn

From: Jon Seymour <hidden>
Date: 2016-06-15 22:56:25

G'day,

I managed to lose sync between the git-svn repo that I am using to
track an svn repo. In particular, the git-svn repo lost the content of
about 5 commits with the net result that the git-svn repo and the svn
repo it tracks have a difference of opinion about what the contents of
trunk are for the files involved in the missing commits.

The situation arose because I used --ignore-paths trunk on a
git-svn-fetch when I was trying to deal with an SVN user that had
copied trunk into the same SVN tag twice (which caused the source tree
to be duplicated under the trunk directory of the SVN tag).

I was hoping that --ignore-paths trunk would cause the git-svn copy of
the tag to exclude the unwanted copy of the trunk directory in the
tag. Instead, it appears to have caused my fetches of subsequent
commits to SVN trunk to be empty, resulting in divergence between by
git-svn repo and the SVN repo itself.

Does anyone have any tips about how I can fix this other than pulling
the entire SVN repo again?

jon.

Re: Recovering from a loss of sync between git and svn

From: Jon Seymour <hidden>
Date: 2016-06-15 22:56:25

Ah, answering my own question....

I can see git svn reset does exactly what I need.

jon.

On Mon, Mar 18, 2013 at 4:03 PM, Jon Seymour [off-list ref] wrote:
G'day,

I managed to lose sync between the git-svn repo that I am using to
track an svn repo. In particular, the git-svn repo lost the content of
about 5 commits with the net result that the git-svn repo and the svn
repo it tracks have a difference of opinion about what the contents of
trunk are for the files involved in the missing commits.

The situation arose because I used --ignore-paths trunk on a
git-svn-fetch when I was trying to deal with an SVN user that had
copied trunk into the same SVN tag twice (which caused the source tree
to be duplicated under the trunk directory of the SVN tag).

I was hoping that --ignore-paths trunk would cause the git-svn copy of
the tag to exclude the unwanted copy of the trunk directory in the
tag. Instead, it appears to have caused my fetches of subsequent
commits to SVN trunk to be empty, resulting in divergence between by
git-svn repo and the SVN repo itself.

Does anyone have any tips about how I can fix this other than pulling
the entire SVN repo again?

jon.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help