Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.5, 0.6, and 0.7

hgtk: find repo root when running from sub-directory

Changeset 0071554cadee

Parent bfc4ae953cf3

by TK Soh

Changes to one file · Browse files at 0071554cadee Showing diff from parent bfc4ae953cf3 Diff from another changeset...

Change 1 of 1 Show Entire File contrib/​hgtk Stacked
 
141
142
143
 
 
 
 
144
145
146
147
 
148
149
150
151
152
153
154
155
 
 
 
156
157
158
 
 
159
160
161
 
141
142
143
144
145
146
147
148
 
149
 
150
151
152
153
154
 
 
 
 
155
156
157
158
159
160
161
162
163
164
165
@@ -141,21 +141,25 @@
  except:   raise   + path = hglib.rootpath(os.getcwd()) + if options['repository']: + path = options['repository'] +   if cmd not in nonrepo_commands.split(): - cmdoptions['root'] = os.path.abspath(options['repository'])   try: - repo = hg.repository(ui, path=cmdoptions['root']) + repo = hg.repository(ui, path=path)   except RepoError, inst:   # try to guess the repo from first of file args   root = None   if args: - root=hglib.rootpath(args[0]) - if root: - cmdoptions['root'] = os.path.abspath(root) - repo = hg.repository(ui, path=cmdoptions['root']) + path = hglib.rootpath(args[0]) + if path: + repo = hg.repository(ui, path=path)   else:   raise RepoError(_("There is no Mercurial repository here"   " (.hg not found)")) + cmdoptions['root'] = os.path.abspath(path) +   try:   return func(ui, *args, **cmdoptions)   except TypeError, inst: