1492 ignore=True, update=False) |
1492 ignore=True, update=False) |
1493 locker.unlock() |
1493 locker.unlock() |
1494 dirs = [x for x in names.keys() if os.path.isdir(x)] |
1494 dirs = [x for x in names.keys() if os.path.isdir(x)] |
1495 for file in allFiles: |
1495 for file in allFiles: |
1496 name = os.path.normcase(file.path) |
1496 name = os.path.normcase(file.path) |
1497 if file.is_versioned: |
1497 if self.__isVersioned(file): |
1498 if name in names: |
1498 if name in names: |
1499 names[name] = self.canBeCommitted |
1499 names[name] = self.canBeCommitted |
1500 dn = name |
1500 dn = name |
1501 while os.path.splitdrive(dn)[1] != os.sep and \ |
1501 while os.path.splitdrive(dn)[1] != os.sep and \ |
1502 dn != repodir: |
1502 dn != repodir: |
1566 allFiles = client.status(dname, recurse=True, get_all=True, |
1566 allFiles = client.status(dname, recurse=True, get_all=True, |
1567 ignore=True, update=False) |
1567 ignore=True, update=False) |
1568 locker.unlock() |
1568 locker.unlock() |
1569 for file in allFiles: |
1569 for file in allFiles: |
1570 name = os.path.normcase(file.path) |
1570 name = os.path.normcase(file.path) |
1571 if file.is_versioned: |
1571 if self.__isVersioned(file): |
1572 if name in names: |
1572 if name in names: |
1573 names[name] = self.canBeCommitted |
1573 names[name] = self.canBeCommitted |
1574 self.statusCache[name] = self.canBeCommitted |
1574 self.statusCache[name] = self.canBeCommitted |
1575 else: |
1575 else: |
1576 self.statusCache[name] = self.canBeAdded |
1576 self.statusCache[name] = self.canBeAdded |
1577 except pysvn.ClientError: |
1577 except pysvn.ClientError: |
1578 locker.unlock() # ignore pysvn errors |
1578 locker.unlock() # ignore pysvn errors |
1579 |
1579 |
1580 return names |
1580 return names |
|
1581 |
|
1582 def __isVersioned(self, status): |
|
1583 """ |
|
1584 Private method to check, if the given status indicates a |
|
1585 versioned state. |
|
1586 |
|
1587 @param status status object to check (pysvn.PysvnStatus) |
|
1588 @return flag indicating a versioned state (boolean) |
|
1589 """ |
|
1590 return status["text_status"] in [ |
|
1591 pysvn.wc_status_kind.normal, |
|
1592 pysvn.wc_status_kind.added, |
|
1593 pysvn.wc_status_kind.missing, |
|
1594 pysvn.wc_status_kind.deleted, |
|
1595 pysvn.wc_status_kind.replaced, |
|
1596 pysvn.wc_status_kind.modified, |
|
1597 pysvn.wc_status_kind.merged, |
|
1598 pysvn.wc_status_kind.conflicted, |
|
1599 ] |
1581 |
1600 |
1582 def clearStatusCache(self): |
1601 def clearStatusCache(self): |
1583 """ |
1602 """ |
1584 Public method to clear the status cache. |
1603 Public method to clear the status cache. |
1585 """ |
1604 """ |