Mercurial > kallithea
comparison rhodecode/lib/middleware/simplegit.py @ 3960:5293d4bbb1ea
Merged dev into stable/default/master branch
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Jun 2013 00:31:11 +0200 |
parents | 3563bb7b4b82 f5a1314886ec |
children | a5888ca796b5 |
comparison
equal
deleted
inserted
replaced
3879:51596d9ef2f8 | 3960:5293d4bbb1ea |
---|---|
53 return | 53 return |
54 | 54 |
55 self.progress("counting objects: %d, done.\n" % len(objects_iter)) | 55 self.progress("counting objects: %d, done.\n" % len(objects_iter)) |
56 dulserver.write_pack_objects(dulserver.ProtocolFile(None, write), | 56 dulserver.write_pack_objects(dulserver.ProtocolFile(None, write), |
57 objects_iter) | 57 objects_iter) |
58 messages = [] | 58 messages = ['thank you for using rhodecode'] |
59 messages.append('thank you for using rhodecode') | |
60 | 59 |
61 for msg in messages: | 60 for msg in messages: |
62 self.progress(msg + "\n") | 61 self.progress(msg + "\n") |
63 # we are done | 62 # we are done |
64 self.proto.write("0000") | 63 self.proto.write("0000") |
95 | 94 |
96 def is_git(environ): | 95 def is_git(environ): |
97 path_info = environ['PATH_INFO'] | 96 path_info = environ['PATH_INFO'] |
98 isgit_path = GIT_PROTO_PAT.match(path_info) | 97 isgit_path = GIT_PROTO_PAT.match(path_info) |
99 log.debug('pathinfo: %s detected as GIT %s' % ( | 98 log.debug('pathinfo: %s detected as GIT %s' % ( |
100 path_info, isgit_path != None) | 99 path_info, isgit_path is not None) |
101 ) | 100 ) |
102 return isgit_path | 101 return isgit_path |
103 | 102 |
104 | 103 |
105 class SimpleGit(BaseVCSController): | 104 class SimpleGit(BaseVCSController): |
220 repo=repo_name, user_id=user.user_id | 219 repo=repo_name, user_id=user.user_id |
221 ) | 220 ) |
222 # store the make_lock for later evaluation in hooks | 221 # store the make_lock for later evaluation in hooks |
223 extras.update({'make_lock': make_lock, | 222 extras.update({'make_lock': make_lock, |
224 'locked_by': locked_by}) | 223 'locked_by': locked_by}) |
225 # set the environ variables for this request | 224 |
226 os.environ['RC_SCM_DATA'] = json.dumps(extras) | |
227 fix_PATH() | 225 fix_PATH() |
228 log.debug('HOOKS extras is %s' % extras) | 226 log.debug('HOOKS extras is %s' % extras) |
229 baseui = make_ui('db') | 227 baseui = make_ui('db') |
230 self.__inject_extras(repo_path, baseui, extras) | 228 self.__inject_extras(repo_path, baseui, extras) |
231 | 229 |