Changeset - 189ce0d7b7c6
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-12 13:50:06
madski@unity3d.com
Transplanted from: 687d39da5e48
hg: improve 'Such branch %s does not exists' message
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -454,17 +454,17 @@ class MercurialRepository(BaseRepository
 
        start_raw_id = self._get_revision(start)
 
        start_pos = self.revisions.index(start_raw_id) if start else None
 
        end_raw_id = self._get_revision(end)
 
        end_pos = self.revisions.index(end_raw_id) if end else None
 

	
 
        if None not in [start, end] and start_pos > end_pos:
 
            raise RepositoryError("start revision '%s' cannot be "
 
            raise RepositoryError("Start revision '%s' cannot be "
 
                                  "after end revision '%s'" % (start, end))
 

	
 
        if branch_name and branch_name not in self.branches.keys():
 
            raise BranchDoesNotExistError('Such branch %s does not exists for'
 
            raise BranchDoesNotExistError('Branch %s not found in'
 
                                  ' this repository' % branch_name)
 
        if end_pos is not None:
 
            end_pos += 1
 

	
 
        slice_ = reversed(self.revisions[start_pos:end_pos]) if reverse else \
 
            self.revisions[start_pos:end_pos]
0 comments (0 inline, 0 general)