diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -706,10 +706,9 @@ class Project(object): | |||
706 | # commits are not yet merged upstream. We do not want | 706 | # commits are not yet merged upstream. We do not want |
707 | # to rewrite the published commits so we punt. | 707 | # to rewrite the published commits so we punt. |
708 | # | 708 | # |
709 | syncbuf.info(self, | 709 | syncbuf.fail(self, |
710 | "branch %s is published but is now %d commits behind", | 710 | "branch %s is published (but not merged) and is now %d commits behind" |
711 | branch.name, | 711 | % (branch.name, len(upstream_gain))) |
712 | len(upstream_gain)) | ||
713 | return | 712 | return |
714 | elif pub == head: | 713 | elif pub == head: |
715 | # All published commits are merged, and thus we are a | 714 | # All published commits are merged, and thus we are a |
@@ -728,7 +727,7 @@ class Project(object): | |||
728 | last_mine = None | 727 | last_mine = None |
729 | cnt_mine = 0 | 728 | cnt_mine = 0 |
730 | for commit in local_changes: | 729 | for commit in local_changes: |
731 | commit_id, committer_email = commit.split(' ', 2) | 730 | commit_id, committer_email = commit.split(' ', 1) |
732 | if committer_email == self.UserEmail: | 731 | if committer_email == self.UserEmail: |
733 | last_mine = commit_id | 732 | last_mine = commit_id |
734 | cnt_mine += 1 | 733 | cnt_mine += 1 |
@@ -1132,7 +1131,10 @@ class Project(object): | |||
1132 | dst = os.path.join(dotgit, name) | 1131 | dst = os.path.join(dotgit, name) |
1133 | if relink: | 1132 | if relink: |
1134 | os.remove(dst) | 1133 | os.remove(dst) |
1135 | os.symlink(relpath(src, dst), dst) | 1134 | if os.path.islink(dst) or not os.path.exists(dst): |
1135 | os.symlink(relpath(src, dst), dst) | ||
1136 | else: | ||
1137 | raise GitError('cannot overwrite a local work tree') | ||
1136 | except OSError, e: | 1138 | except OSError, e: |
1137 | if e.errno == errno.EPERM: | 1139 | if e.errno == errno.EPERM: |
1138 | raise GitError('filesystem must support symlinks') | 1140 | raise GitError('filesystem must support symlinks') |