Git rebase合并冲突无法继续(Git rebase merge conflict cannot continue)
我正在试图改变'dev'来赶上'master'分支。
$ git checkout dev $ git rebase master First, rewinding head to replay your work on top of it... Applying: Corrected compilation problems that came from conversion from SVN. Using index info to reconstruct a base tree... M src/com/.... <stdin>:125: trailing whitespace. /** <stdin>:126: trailing whitespace. * <stdin>:127: trailing whitespace. */ <stdin>:128: trailing whitespace. package com.... <stdin>:129: trailing whitespace. warning: squelched 117 whitespace errors warning: 122 lines add whitespace errors. Falling back to patching base and 3-way merge... Auto-merging src/com/.... CONFLICT (content): Merge conflict in src/com/... Failed to merge in the changes. Patch failed at 0001 Corrected compilation problems that came from conversion from SVN. When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To check out the original branch and stop rebasing run "git rebase --abort". $ vi src/com/..... { fixed the merge issue on one file } $ git add -A . $ git rebase --continue src/com/....: needs merge You must edit all merge conflicts and then mark them as resolved using git add $ vi src/com.... { verified, no >>> or <<< left, no merge markers } $ git rebase --continue Applying: Corrected compilation problems that came from conversion from SVN. No changes - did you forget to use 'git add'? If there is nothing left to stage, chances are that something else already introduced the same changes; you might want to skip this patch. When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To check out the original branch and stop rebasing run "git rebase --abort".
有任何想法吗?
I'm trying to rebase 'dev' to catch up to 'master' branch.
$ git checkout dev $ git rebase master First, rewinding head to replay your work on top of it... Applying: Corrected compilation problems that came from conversion from SVN. Using index info to reconstruct a base tree... M src/com/.... <stdin>:125: trailing whitespace. /** <stdin>:126: trailing whitespace. * <stdin>:127: trailing whitespace. */ <stdin>:128: trailing whitespace. package com.... <stdin>:129: trailing whitespace. warning: squelched 117 whitespace errors warning: 122 lines add whitespace errors. Falling back to patching base and 3-way merge... Auto-merging src/com/.... CONFLICT (content): Merge conflict in src/com/... Failed to merge in the changes. Patch failed at 0001 Corrected compilation problems that came from conversion from SVN. When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To check out the original branch and stop rebasing run "git rebase --abort". $ vi src/com/..... { fixed the merge issue on one file } $ git add -A . $ git rebase --continue src/com/....: needs merge You must edit all merge conflicts and then mark them as resolved using git add $ vi src/com.... { verified, no >>> or <<< left, no merge markers } $ git rebase --continue Applying: Corrected compilation problems that came from conversion from SVN. No changes - did you forget to use 'git add'? If there is nothing left to stage, chances are that something else already introduced the same changes; you might want to skip this patch. When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To check out the original branch and stop rebasing run "git rebase --abort".
Any ideas?
原文:https://stackoverflow.com/questions/14410421
最满意答案
你说:
我的视图控制器在转换完成后仍然被删除,还是仍然存在,但在屏幕之外?
这里有两个完全不同的问题。
首先,有一个视图控制器层次结构的问题。 当您呈现一个新的视图控制器时,旧的视图控制器始终保存在视图控制器层次结构中,以便当您解散它时,它仍然存在。 但是,当你解雇时,被解雇的视图控制器将被从视图控制器层次结构中移除(除非你做了一些不寻常的事情,比如在某处保留自己的强引用),它将被释放。
其次,视图层次结构有一个单独的问题。 呈现时,
UIPresentationController
指示呈现视图控制器的视图是否保留在视图层次结构中。 默认情况下,它将它保留在视图层次结构中,但通常情况下,如果要进行模式化的全屏“呈现”,UIPresentationController
指定一个UIPresentationController
子类,告知它在转换完成时删除呈现视图控制器的视图。
例如,当呈现视图控制器的视图不透明并覆盖整个屏幕时,执行自定义模式“呈现”转换时,您的
UIViewControllerTransitioningDelegate
不仅会提供动画控制器,还会指定一个演示控制器:func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { return YourAnimationController(...) } func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { return YourAnimationController(...) } func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { return PresentationController(presentedViewController: presented, presenting: presenting) }
该演示文稿控制器可能非常小,只是告诉它删除演示者的视图:
class PresentationController: UIPresentationController { override var shouldRemovePresentersView: Bool { return true } }
You said:
is my view controller still get removed after the transition finishes or is it still there but off the screen?
There are two completely separate issues here.
First, there is a question of the view controller hierarchy. When you present a new view controller, the old view controller is always kept in the view controller hierarchy so that when you dismiss back to it, it will still be there. However, when you dismiss, the dismissed view controller will be removed from the view controller hierarchy and (unless you do something unusual, like keeping your own strong reference to it somewhere) it will be deallocated.
Second, there is a separate question of the view hierarchy. When presenting, the
UIPresentationController
dictates whether the presenting view controller's view remains in the view hierarchy or not. By default, it keeps it in the view hierarchy, but generally if doing a modal, full-screen "present", you'd specify aUIPresentationController
subclass that tells it to remove the presenting view controller's view when the transition is done.
For example, when doing a custom modal "present" transition where the presented view controller's view is opaque and covers the whole screen, then your
UIViewControllerTransitioningDelegate
would not only supply the animation controllers, but also specify a presentation controller:func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { return YourAnimationController(...) } func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { return YourAnimationController(...) } func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { return PresentationController(presentedViewController: presented, presenting: presenting) }
And that presentation controller might be fairly minimal, only telling it to remove the presenter's view:
class PresentationController: UIPresentationController { override var shouldRemovePresentersView: Bool { return true } }
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
如何在自定义尺寸的中心呈现模态视图控制器?(How to present a modal view controller with custom size in center?)[2021-11-06]
我没有找到从模态控制器本身做到的方法,所以我创建了一个类和一个扩展方法: public class ModalViewController : UIViewController { public SizeF OriginalViewSize { get; private set; } void Initialize () { ModalPresentationStyle = UIModalPresentationStyle.FormSheet; } ... -
使用自定义转换时,视图控制器是否完全被删除?(Does a view controller get removed entirely when using a custom transition?)[2023-06-16]
你说: 我的视图控制器在转换完成后仍然被删除,还是仍然存在,但在屏幕之外? 这里有两个完全不同的问题。 首先,有一个视图控制器层次结构的问题。 当您呈现一个新的视图控制器时,旧的视图控制器始终保存在视图控制器层次结构中,以便当您解散它时,它仍然存在。 但是,当你解雇时,被解雇的视图控制器将被从视图控制器层次结构中移除(除非你做了一些不寻常的事情,比如在某处保留自己的强引用),它将被释放。 其次,视图层次结构有一个单独的问题。 呈现时, UIPresentationController指示呈现视图控制器的视图 ... -
通常情况下,您会将storyboardId提供给destinationController,并从sourceViewController中像这样调用它: //push next view UIStoryboard *storyboard = self.storyboard; YourViewControllerClass *destVC = [storyboard instantiateViewControllerWithIdentifier:@"StoryboardID"]; [self.navigati ...
-
我没有真正的答案,因为这似乎是一个实际的Apple Bug。 来自这个论坛的雷达已经提交并显示出解决问题的黑客手段。 这是我所做的: 首先,我将这个扩展添加到UIViewController中,以在我当前的视图层次结构中设置顶视图,以使其框架与UIWindows框架相匹配,从而有效地旋转视图。 extension UIViewController { func rotateTopView(view:UIView) { if let superview = view.superview ...
-
在委托的方法中执行此操作,您将返回自定义动画控制器。 例如,您可以实现自定义init方法: - (id
)animationControllerForPresentedController:(UIViewController *)presented presentingControl ... -
这似乎是一个iOS8错误。 我找到了一个解决方案,但它是贫民窟。 转换后视图应该在屏幕上但不是,它需要像这样添加回窗口: BOOL canceled = [transitionContext transitionWasCancelled]; [transitionContext completeTransition:!canceled]; if (!canceled) { [[UIApplication sharedApplication].keyWindow addSubview: toV ...
-
不幸的是,你不能使用segue执行你的模态ViewController的解雇,它的一种方式(将在ios6中改变)。 只需执行自定义的dismiss-animation并在动画的完成块中的parentViewController上调用dismissModalViewControllerAnimated:NO。 Unfortunately you can't use the segue to perform the dismiss of your modal ViewController its jut one ...
-
使用新的iOS 7转换API,您无法将fromViewController.view保留在toViewController.view下,因为一旦动画完成,就会私有地管理containerView。 你能做什么却是这样的...... UIView *containerView = [transitionContext containerView]; UIViewController *fromViewController = [transitionContext viewControllerForKey:U ...