Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hggtk: fix erroneous repo root in thgstatus

If os.getcwd() was below a repo root, a wrong root path
was fed into hg.repository. Fixed by using paths from
thgutil.

Changeset f3d138570120

Parent 3e239ecc4b02

by Adrian Buehlmann

Changes to one file · Browse files at f3d138570120 Showing diff from parent 3e239ecc4b02 Diff from another changeset...

 
7
8
9
10
 
11
12
13
14
15
16
17
 
18
19
20
 
 
 
 
 
 
21
22
23
 
37
38
39
40
 
41
42
43
 
7
8
9
 
10
11
12
13
14
15
16
 
17
18
 
 
19
20
21
22
23
24
25
26
27
 
41
42
43
 
44
45
46
47
@@ -7,17 +7,21 @@
 '''update TortoiseHg status cache'''    from mercurial import hg -from thgutil import shlib +from thgutil import paths, shlib  import os    def cachefilepath(repo):   return repo.join("thgstatus")    def run(_ui, *pats, **opts): - path = '.' + root = paths.find_root()   if opts.get('repository'): - path = opts.get('repository') - repo = hg.repository(_ui, path) + root = opts.get('repository') + if root is None: + _ui.status("no repository\n") + return + + repo = hg.repository(_ui, root)     if opts.get('remove'):   try: @@ -37,7 +41,7 @@
  return     wait = opts.get('delay') is not None - shlib.update_thgstatus(_ui, path, wait=wait) + shlib.update_thgstatus(_ui, root, wait=wait)     if opts.get('notify'):   shlib.shell_notify(opts.get('notify'))