Show More
@@ -5232,12 +5232,23 b' def root(ui, repo, **opts):' | |||
|
5232 | 5232 | |
|
5233 | 5233 | Print the root directory of the current repository. |
|
5234 | 5234 | |
|
5235 | .. container:: verbose | |
|
5236 | ||
|
5237 | Template: | |
|
5238 | ||
|
5239 | The following keywords are supported in addition to the common template | |
|
5240 | keywords and functions. See also :hg:`help templates`. | |
|
5241 | ||
|
5242 | :hgpath: String. Path to the .hg directory. | |
|
5243 | :storepath: String. Path to the directory holding versioned data. | |
|
5244 | ||
|
5235 | 5245 | Returns 0 on success. |
|
5236 | 5246 | """ |
|
5237 | 5247 | opts = pycompat.byteskwargs(opts) |
|
5238 | 5248 | with ui.formatter('root', opts) as fm: |
|
5239 | 5249 | fm.startitem() |
|
5240 | 5250 | fm.write('reporoot', '%s\n', repo.root) |
|
5251 | fm.data(hgpath=repo.path, storepath=repo.spath) | |
|
5241 | 5252 | |
|
5242 | 5253 | @command('serve', |
|
5243 | 5254 | [('A', 'accesslog', '', _('name of access log file to write to'), |
@@ -101,7 +101,9 b' Repository root:' | |||
|
101 | 101 | $ hg root -Tjson | sed 's|\\\\|\\|g' |
|
102 | 102 | [ |
|
103 | 103 | { |
|
104 |
" |
|
|
104 | "hgpath": "$TESTTMP/t/.hg", | |
|
105 | "reporoot": "$TESTTMP/t", | |
|
106 | "storepath": "$TESTTMP/t/.hg/store" | |
|
105 | 107 | } |
|
106 | 108 | ] |
|
107 | 109 |
@@ -719,6 +719,14 b' Test clone from the repository in (emula' | |||
|
719 | 719 | $ hg -R src debugrevlog -c | egrep 'format|flags' |
|
720 | 720 | format : 0 |
|
721 | 721 | flags : (none) |
|
722 | $ hg root -R src -T json | sed 's|\\\\|\\|g' | |
|
723 | [ | |
|
724 | { | |
|
725 | "hgpath": "$TESTTMP/src/.hg", | |
|
726 | "reporoot": "$TESTTMP/src", | |
|
727 | "storepath": "$TESTTMP/src/.hg" | |
|
728 | } | |
|
729 | ] | |
|
722 | 730 | $ hg clone -U -q src dst |
|
723 | 731 | $ hg -R dst log -q |
|
724 | 732 | 0:e1bab28bca43 |
@@ -21,6 +21,14 b" share shouldn't have a store dir" | |||
|
21 | 21 | $ cd repo2 |
|
22 | 22 | $ test -d .hg/store |
|
23 | 23 | [1] |
|
24 | $ hg root -Tjson | sed 's|\\\\|\\|g' | |
|
25 | [ | |
|
26 | { | |
|
27 | "hgpath": "$TESTTMP/repo2/.hg", | |
|
28 | "reporoot": "$TESTTMP/repo2", | |
|
29 | "storepath": "$TESTTMP/repo1/.hg/store" | |
|
30 | } | |
|
31 | ] | |
|
24 | 32 | |
|
25 | 33 | share shouldn't have a full cache dir, original repo should |
|
26 | 34 |
General Comments 0
You need to be logged in to leave comments.
Login now