On Aug 14, 2014, at 3:58 AM, Lawrence Velázquez <[email protected]> wrote:

I thought that "port sync" failed immediately if any of the source syncs exited with a failure status, but I may have been misinterpreting the output I saw, since my git-svn repository is last in my sources list.

I double-checked; what happens is that PortIndex will not be run for a
git-svn source if "git svn rebase" fails. This happens fairly commonly
— for example, if there are unstaged changes in your working tree.

Ignoring the failure does feel a little wrong. One alternative would
be to bookend the update operation with "git stash" and "git stash
pop". Manual merge resolution might be required after the pop, but
that wouldn't be any worse than what Subversion does currently.


My original patch to add this that's in trac somewhere (#27485 it looks like) did this, but others thought stash/stash pop was bad so I removed it and just got in the habit of committing everything locally instead (since it's going back to svn there's definitely no issue in commit --amending liberally). I think we still pull --rebase on the non-git-svn case so that mode can't really work to manage a local repo that's pulled from itself.

The pushd/popd came from the existing svn support, since it makes no sense in a system() call I assumed it was intentionally done for the output vs a single cd at the start (system -W didn't exist yet back then I think).

As for the working directory, the special casing to handle all the possibilities (is the git root dports/ or a full macports checkout where dports is a level in? what about a completely different non-macports.org git repo layout?) meant you were basically rewriting all the git logic but not as thorough, so just cding in was the best way. Different versions of git also had different arguments for setting the gitdir and working dir, and I think early releases didn't have a workingdir flag at all.

Thanks,
Eric
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to