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

rpcserver: implement update for non-repo dirs

Changeset f74f68ddb6b4

Parent a1be664eb8d6

by Adrian Buehlmann

Changes to 2 files · Browse files at f74f68ddb6b4 Showing diff from parent a1be664eb8d6 Diff from another changeset...

 
27
28
29
30
 
31
32
33
34
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
37
38
 
27
28
29
 
30
31
 
 
 
 
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@@ -27,12 +27,24 @@
 ui.ui.write_err = write_err    def update_thgstatus(path): - print "update thgstatus for path '%s'" % path + print "update_thgstatus(%s)" % path   root = paths.find_root(path) - if root is None: - return - shlib.update_thgstatus(ui.ui(), root, wait=False) - shlib.shell_notify([path]) + _ui = ui.ui(); + if root is not None: + shlib.update_thgstatus(_ui, root, wait=False) + shlib.shell_notify([path]) + print "updated repo %s" % root + else: + roots = [] + for f in os.listdir(path): + r = paths.find_root(os.path.join(path, f)) + if r is not None: + roots.append(r) + for r in roots: + shlib.update_thgstatus(_ui, r, wait=False) + shlib.shell_notify([r]) + print "updated repo %s" % r + print "update_thgstatus(%s) finished." % path    class PipeServer:   def __init__(self):
 
479
480
481
482
483
484
485
486
487
488
489
490
491
492
 
 
493
494
495
 
479
480
481
 
 
 
 
 
 
 
 
 
 
 
482
483
484
485
486
@@ -479,17 +479,8 @@
    if (cmd == "thgstatus")   { - std::string hgroot = GetHgRepoRoot(cwd); - if (hgroot.empty()) - { - hgcmd += " --all"; - } - else - { - Dirstatecache::invalidate(hgroot); - Thgstatus::update(cwd); - return; - } + Thgstatus::update(cwd); + return;   }     LaunchCommand(hgcmd, cwd);