RE: Branches branch_5x and master have force-updated heads (!)

2016-01-24 Thread Uwe Schindler
Hi,

Sorry, of course I meant "fetch". :-)

Sorry for confusion: I replaced my local branch with the one from origin. There 
are several ways to do this:

- Your solution with fetch and then hard reset
- Delete local branch and then pull or fetch

The history is not diverged, I checked this :-) I know how this looks like in 
the log viewer! 

The Jenkins servers were also handling this correct (they did exactly what you 
said), just a bit more complicated to be prepared to such hard shit (and also 
to clean up working copy to the completely resettled state):

Building remotely on lucene in workspace 
/home/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.x-Java7
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.apache.org/lucene-solr.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/lucene-solr.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > git://git.apache.org/lucene-solr.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch_5x^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch_5x^{commit} # timeout=10
Checking out Revision 104f7c9c938939e829782410958a302574e4d5a4 
(refs/remotes/origin/branch_5x)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 104f7c9c938939e829782410958a302574e4d5a4
 > git rev-list 1ebe07b770a72ad1a03a35a1d8ab7b09b5331323 # timeout=10

Uwe

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -Original Message-
> From: Dawid Weiss [mailto:dawid.we...@gmail.com]
> Sent: Sunday, January 24, 2016 6:39 PM
> To: dev@lucene.apache.org
> Subject: Re: Branches branch_5x and master have force-updated heads (!)
> 
> > (as I had no changes in my checkout, I just pulled the branches from
> remote replacing the local one)
> 
> I don't know what you did, but it it wasn't pulling ;) Here is a bit
> of git parlance overview:
> 
> - You "fetch" new commits and reference updates (git fetch origin).
> - A "pull" is basically fetch + merge remote tracking branch.
> 
> If you did in fact pull then you should see diverged history (your
> local branch reference and the remote it's tracking wouldn't be on the
> same commit). Something like this:
> 
> $ git status
> 
> # On branch master
> # Your branch and 'origin/master' have diverged,
> # and have 3 and 9 different commits each, respectively.
> #   (use "git pull" to merge the remote branch into yours)
> 
> Perhaps what you did was you "reset" the local branch (reference) to
> the updated remote? If you didn't (and you know you didn't have any
> commits) you should reset it:
> 
> git fetch origin
> git checkout master
> git reset --hard origin/master
> git checkout branch_5x
> git reset --hard origin/branch_5x
> 
> This ensures your local branch references are pointing at the latest
> commits on their remote counterparts.
> 
> Dawid
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



Re: Branches branch_5x and master have force-updated heads (!)

2016-01-24 Thread Dawid Weiss
> (as I had no changes in my checkout, I just pulled the branches from remote 
> replacing the local one)

I don't know what you did, but it it wasn't pulling ;) Here is a bit
of git parlance overview:

- You "fetch" new commits and reference updates (git fetch origin).
- A "pull" is basically fetch + merge remote tracking branch.

If you did in fact pull then you should see diverged history (your
local branch reference and the remote it's tracking wouldn't be on the
same commit). Something like this:

$ git status

# On branch master
# Your branch and 'origin/master' have diverged,
# and have 3 and 9 different commits each, respectively.
#   (use "git pull" to merge the remote branch into yours)

Perhaps what you did was you "reset" the local branch (reference) to
the updated remote? If you didn't (and you know you didn't have any
commits) you should reset it:

git fetch origin
git checkout master
git reset --hard origin/master
git checkout branch_5x
git reset --hard origin/branch_5x

This ensures your local branch references are pointing at the latest
commits on their remote counterparts.

Dawid

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



RE: Branches branch_5x and master have force-updated heads (!)

2016-01-24 Thread Uwe Schindler
Hi,

Thanks!
(as I had no changes in my checkout, I just pulled the branches from remote 
replacing the local one)

Uwe

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -Original Message-
> From: Dawid Weiss [mailto:dawid.we...@gmail.com]
> Sent: Sunday, January 24, 2016 6:06 PM
> To: dev@lucene.apache.org
> Subject: Branches branch_5x and master have force-updated heads (!)
> 
> Hello,
> 
> Several people reported problems with the fact that git history
> included the "wipeout-and-revert" pair of commits imported from the
> SVN history. The problems seem to be:
> 
> 1) every file has a pair of two commits (removal/ restore),
> 
> 2) not every tool shows file history past the removal point.
> 
> Since we're still within the "migration weekend" and because this is
> relatively easy to fix I think it was worth repairing while we still
> can.
> 
> I cherry picked all commits that have happened since the migration on
> master and branch_5x and re-applied them on top of the commit
> immediately preceding the wipeout (for each branch correspondingly).
> Then I updated references to master and branch_5x on the repository.
> Look at the attached commit tree to see what it looks like for
> branch_5x.
> 
> Please note that the use of "--force" with "git push" is generally a
> big no-no -- this really is a special case and fixup of a problem that
> could grow into a larger one.
> 
> If you already have a clone of the repo then remote references will be
> updated for you on "git fetch". You should then rebase your changes on
> top of these new heads. If you don't know how, it's better to create a
> new branch and cherry pick commit-by-commit from your old branch.
> 
> Apologies for the problem.
> 
> Dawid


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org