aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/rcs.py
blob: fac4b0b9b8cfe0487d65b779a7fba7f40bb98faf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
def rcs_by_name(rcs_name):
    """Return the module for the RCS with the given name"""
    if rcs_name == "Arch":
        import arch
        return arch
    elif rcs_name == "bzr":
        import bzr
        return bzr
    elif rcs_name == "None":
        import no_rcs
        return no_rcs

def detect(dir):
    """Return the module for the rcs being used in this directory"""
    import arch
    import bzr
    if arch.detect(dir):
        return arch
    elif bzr.detect(dir):
        return bzr
    import no_rcs
    return no_rcs