pmezard / hgforest-crew
Branch of hg forest extension (http://hg.akoha.org/hgforest) working with hg crew repository
Clone this repository (size: 105.9 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/pmezard/hgforest-crew/
| commit 78: | 97152eaa30fa |
| parent 77: | de0d2b10ed66 |
| branch: | default |
fpull -p option for partial forests
2 years ago
Changed (Δ1.1 KB):
raw changeset »
forest.py (17 lines added, 12 lines removed)
test-forest (12 lines added, 0 lines removed)
test-forest.out (24 lines added, 0 lines removed)
| … | … | @@ -996,17 +996,20 @@ def pull(ui, top, source="default", path |
996 |
996 |
try: |
997 |
997 |
tree.getrepo(ui) |
998 |
998 |
except RepoError: |
999 |
# Need to clone |
|
1000 |
quiet = ui.quiet |
|
1001 |
try: |
|
1002 |
ui.quiet = True # Hack to shut up qclone's ui.status() |
|
1003 |
qclone(ui=ui, |
|
1004 |
source=srcpath, sroot=source, |
|
1005 |
dest=destpath, rpath=rpath, |
|
1006 |
opts=opts) |
|
1007 |
except util.Abort, err: |
|
1008 |
ui.warn(_("skipped: %s\n") % err) |
|
1009 |
|
|
999 |
if opts['partial']: |
|
1000 |
ui.status(_("repository not previously cloned, skipping\n")) |
|
1001 |
else: |
|
1002 |
# Need to clone |
|
1003 |
quiet = ui.quiet |
|
1004 |
try: |
|
1005 |
ui.quiet = True # Hack to shut up qclone's ui.status() |
|
1006 |
qclone(ui=ui, |
|
1007 |
source=srcpath, sroot=source, |
|
1008 |
dest=destpath, rpath=rpath, |
|
1009 |
opts=opts) |
|
1010 |
except util.Abort, err: |
|
1011 |
ui.warn(_("skipped: %s\n") % err) |
|
1012 |
ui.quiet = quiet |
|
1010 |
1013 |
return |
1011 |
1014 |
try: |
1012 |
1015 |
commands.pull(ui, tree.getrepo(ui), srcpath, **opts) |
| … | … | @@ -1295,7 +1298,9 @@ def uisetup(ui): |
1295 |
1298 |
_('hg foutgoing [OPTION]... [DEST]')), |
1296 |
1299 |
"^fpull" : |
1297 |
1300 |
(pull, |
1298 |
[ |
|
1301 |
[('p', 'partial', False, |
|
1302 |
_("do not clone source repositories not previously cloned")), |
|
1303 |
walkhgopts, snapfileopts] + cmd_options(ui, 'pull', remove=('f',)), |
|
1299 |
1304 |
_('hg fpull [OPTION]... [SOURCE]')), |
1300 |
1305 |
"^fpush" : |
1301 |
1306 |
(push, |
| … | … | @@ -201,3 +201,15 @@ hg init circular/a/a |
201 |
201 |
ln -s . circular/a/b |
202 |
202 |
ln -s .. circular/a/c |
203 |
203 |
hg fstatus -R circular |
204 |
||
205 |
echo "# fpull --partial" |
|
206 |
hg init partial |
|
207 |
hg init partial/a |
|
208 |
echo "a" >partial/a/f |
|
209 |
hg init partial/b |
|
210 |
echo "b" >partial/b/f |
|
211 |
hg commit --cwd partial/a -A -m init -d "0 0" |
|
212 |
hg commit --cwd partial/b -A -m init -d "0 0" |
|
213 |
hg fclone partial partial-clone | sed "s@\(/private\)*$HGTMP@HGTMP@g" |
|
214 |
rm -rf partial-clone/b |
|
215 |
hg --cwd partial-clone fpull --partial | sed "s@\(/private\)*$HGTMP@HGTMP@g" |
Up to file-list test-forest.out:
| … | … | @@ -886,3 +886,27 @@ a |
886 |
886 |
|
887 |
887 |
[a/a] |
888 |
888 |
|
889 |
# fpull --partial |
|
890 |
adding f |
|
891 |
adding f |
|
892 |
[.] |
|
893 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
894 |
||
895 |
[a] |
|
896 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
897 |
||
898 |
[b] |
|
899 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
900 |
||
901 |
[.] |
|
902 |
pulling from HGTMP/test-forest/partial |
|
903 |
no changes found |
|
904 |
||
905 |
[a] |
|
906 |
pulling from HGTMP/test-forest/partial/a |
|
907 |
searching for changes |
|
908 |
no changes found |
|
909 |
||
910 |
[b] |
|
911 |
repository not previously cloned, skipping |
|
912 |
