Mercurial > hgsubversion
comparison hgsubversion/svnmeta.py @ 1355:79e319fe767d
svnmeta: add method to determine whether we will skip a particular branch
author | Sean Farley <sean@farley.io> |
---|---|
date | Mon, 24 Mar 2014 11:20:57 -0500 |
parents | ecce8aef4b21 |
children | a17d8874a099 |
comparison
equal
deleted
inserted
replaced
1354:b803ef977748 | 1355:79e319fe767d |
---|---|
387 'uuid': self.uuid, | 387 'uuid': self.uuid, |
388 'path': path, | 388 'path': path, |
389 'rev': revnum, | 389 'rev': revnum, |
390 } | 390 } |
391 return extra | 391 return extra |
392 | |
393 def skipbranch(self, name): | |
394 '''Returns whether or not we're skipping a branch.''' | |
395 # sometimes it's easier to pass the path instead of just the branch | |
396 # name, so we test for that here | |
397 if name: | |
398 bname = self.split_branch_path(name) | |
399 if bname != (None, None, None): | |
400 name = bname[1] | |
401 | |
402 # if the mapped branch == '' and the original branch name == '' then we | |
403 # won't commit this branch | |
404 return name and not self.branchmap.get(name, True) | |
392 | 405 |
393 def mapbranch(self, extra, close=False): | 406 def mapbranch(self, extra, close=False): |
394 if close: | 407 if close: |
395 extra['close'] = 1 | 408 extra['close'] = 1 |
396 mapped = self.branchmap.get(extra.get('branch', 'default')) | 409 mapped = self.branchmap.get(extra.get('branch', 'default')) |