Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc2, 0.4rc3, and 0.4rc4

hggtk/commit: switch cwd to repo root if repo is merging

Changeset 07a173314f17

Parent 73fbe9116e7b

by TK Soh

Changes to one file · Browse files at 07a173314f17 Showing diff from parent 73fbe9116e7b Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
294
295
296
 
 
 
 
 
 
 
297
298
299
 
330
331
332
 
 
333
334
 
 
335
 
294
295
296
297
298
299
300
301
302
303
304
305
306
 
337
338
339
340
341
342
 
343
344
345
@@ -294,6 +294,13 @@
  u = ui.ui()   u.updateopts(debug=False, traceback=False)   repo = hg.repository(u, path=root) + + # move cwd to repo root if repo is merged, so we can show + # all the changed files + if len(repo.workingctx().parents()) > 1 and repo.root != cwd: + cwd = repo.root + repo = hg.repository(u, path=cwd) + files = [cwd]     ct = repo.ui.config('tortoisehg', 'commit', 'internal')   if ct != 'internal': @@ -330,6 +337,9 @@
   if __name__ == "__main__":   import sys + from hglib import rootpath +   opts = {} - opts['root'] = len(sys.argv) > 1 and sys.argv[1] or '' + opts['cwd'] = len(sys.argv) > 1 and sys.argv[1] or os.getcwd() + opts['root'] = rootpath(opts['cwd'])   run(**opts)