~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Matthieu Moy
  • Date: 2006-08-06 15:09:48 UTC
  • mto: (1998.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1999.
  • Revision ID: Matthieu.Moy@imag.fr-20060806150948-6bb9550a89d54324
Fixed merge to work nicely with -r revno:N:path

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        """
179
179
        return True
180
180
 
 
181
    def get_branch(self):
 
182
        """When the revision specifier contains a branch location, return it.
 
183
        
 
184
        Otherwise, return None.
 
185
        """
 
186
        return None
 
187
 
181
188
# private API
182
189
 
183
190
class RevisionSpec_int(RevisionSpec):
218
225
    def needs_branch(self):
219
226
        return self.spec.find(':') == -1
220
227
 
 
228
    def get_branch(self):
 
229
        if self.spec.find(':') == -1:
 
230
            return None
 
231
        else:
 
232
            return self.spec[self.spec.find(':')+1:]
 
233
 
221
234
SPEC_TYPES.append(RevisionSpec_revno)
222
235
 
223
236