/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/repo.py

  • Committer: Tim Marston
  • Date: 2016-12-13 21:40:34 UTC
  • Revision ID: tim@ed.am-20161213214034-nd5t7ztnlrjd627i
fix add command and generic filename expansion/resolution to expend to
homedir-relative filename and absolute filename based on original filename, as
specified, rather than a fully, symlink-resolved filename.  So, e.g., if ~/bob
was a symlink to ~/fred, then ~/bob/a would resolve to the relative filename
bob/a, becuase it is inside the homedir (it would resolve to fred/a otherwise)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
 
22
22
import os
23
 
from . import the, util
24
 
from .vcs.vcs import Vcs
 
23
import the, util
 
24
from vcs.vcs import Vcs
25
25
 
26
26
 
27
27
class Repo:
46
46
                        for vcs in Vcs.vcses:
47
47
                                instance = Vcs.instantiate_vcs( vcs, self.full_dir )
48
48
                                if instance.has_authority():
49
 
                                        if the.verbose >= 2: print("repo vcs: %s" % vcs)
 
49
                                        if the.verbose >= 2: print "repo vcs: %s" % vcs
50
50
                                        self.vcs = instance
51
51
                                        break
52
52
                        if self.vcs == False:
57
57
        def set_vcs( self, vcs ):
58
58
                if Vcs.vcses.count( vcs ) == 1:
59
59
                        self.vcs = Vcs.instantiate_vcs( vcs, self.full_dir )
60
 
                        if the.verbose >= 2: print("repo vcs: %s" % vcs)
 
60
                        if the.verbose >= 2: print "repo vcs: %s" % vcs
61
61
                else:
62
62
                        raise the.program.FatalError( 'unknown vcs requested: %s' % vcs )
63
63