Re: [geonode] Security Merge (hi ltucker and groldan!)
- From:
- David Winslow
- Date:
- 2010-07-21 @ 15:07
I forgot to mention yesterday that "git rebase" is a fairly destructive
operation; it actually modifies history, unlike most of git's operations
which add new commits without affecting pre-existing ones.
In particular, the checksum for a commit (which git log and other tools
use to determine what commit are "unmerged" between branches) depends on
that commit's predecessors (recursively, all the way to the root of the
history tree). Rebasing a commit, even if it doesn't require
modifications due to merge conflicts, changes that lineage and removes
git's ability to determine that branch A and branch B have commits in
common. For example, if I rebase a branch, and Gabriel merges the
result onto his copy of the original branch, we'll have an even more
tangled history than before. (Fortunately, Gabriel is likely to get a
clue that something is wrong when he has a huge set of merge conflicts
to deal with.)
What this means then, is that when a branch is rebased, the "proper"
thing to do is to abandon the previous version of the branch (and it's
really important to get everyone who's using it to do likewise). The
rebase command does this for you by default, but it can't affect remote
repositories (which is a really good reason to avoid rebasing commits
that have already been pushed to a public repository). When I sent out
the mail earlier I really should have added "Luke and Gabriel, please
use these rebased branches as alternatives to the old versions, and
whatever you do, don't merge them back onto the originals."
So, if you guys decide to use Gabriel's version as the base and merge
the Django-side work onto it, I'd recommend something like:
$ git remote add dwins git://github.com/dwins/geonode.git
$ git fetch dwins gs_security_rebase
$ git fetch dwins dj_acl_service
$ git checkout dwins/gs_security_rebase -b gs_security_rebase
$ git merge dwins/dj_acl_service
Throw in some conflict resolution, and this should produce a revision
with the Django stuff AND the GeoServer stuff that is based on a
relatively recent version of our "trunk" development line. If there is
work left to do, I'd suggest doing that work on this merged branch.
--
David Winslow
OpenGeo - http://opengeo.org/
Re: [geonode] Security Merge (hi ltucker and groldan!)
- From:
- David Winslow
- Date:
- 2010-07-21 @ 15:37
On 07/21/2010 11:07 AM, David Winslow wrote:
> $ git remote add dwins git://github.com/dwins/geonode.git
> $ git fetch dwins gs_security_rebase
> $ git fetch dwins dj_acl_service
> $ git checkout dwins/gs_security_rebase -b gs_security_rebase
> $ git merge dwins/dj_acl_service
>
Oops, the fetch commands should have looked like:
$ git fetch dwins gs_security_rebase:gs_security_rebase
$ git fetch dwins dj_acl_service:dj_acl_service
Otherwise git will just assign them the temporary name "FETCH_HEAD"
which is subject to reassignment the next time you fetch.
--
David Winslow
OpenGeo - http://opengeo.org/