Mercurial > mozilla > hg > ProfileManager
comparison profilemanager/manager.py @ 46:df1b2e48dddb
handle hashing for clones only if they are added to profiles.ini
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 19:05:28 -0700 |
parents | 6feee8d04db4 |
children | 420becb84df7 |
comparison
equal
deleted
inserted
replaced
45:6feee8d04db4 | 46:df1b2e48dddb |
---|---|
98 if not os.path.isabs(dest): | 98 if not os.path.isabs(dest): |
99 dest = os.path.abspath(dest) | 99 dest = os.path.abspath(dest) |
100 dirname = dest | 100 dirname = dest |
101 name = os.path.basename(dest) | 101 name = os.path.basename(dest) |
102 else: | 102 else: |
103 dirname = name = dest | 103 name = dest |
104 relative = True | 104 relative = True |
105 if not os.path.dirname(dest): | 105 if add: |
106 dest = '%s.%s' % (self.hash(), dest) | 106 dirname = '%s.%s' % (self.hash(), name) |
107 dest = os.path.join(self.profile_dir, dest) | 107 dest = os.path.join(self.profile_dir, dest) |
108 | 108 |
109 # update profiles.ini | 109 # update profiles.ini |
110 if add: | 110 if add: |
111 self.add(name, dirname, relative) | 111 self.add(name, dirname, relative) |