After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697818 - [PATCH] Add "shallow_clone" option
[PATCH] Add "shallow_clone" option
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2013-04-11 16:11 UTC by Colin Walters
Modified: 2013-05-15 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add shallow clone option (2.09 KB, patch)
2013-04-11 16:12 UTC, Colin Walters
none Details | Review
updated patch (2.29 KB, patch)
2013-04-11 18:52 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2013-04-11 16:11:29 UTC
This just maps to --depth=1 for git at the moment; I didn't
bother with other version control systems because to be honest
they're basically irrelevant.

Using this option is a *lot* faster to just get an initial
build going.  gdk-pixbuf's git repo is an 100MB download, but only
1.8 currently with depth 1.
---
 jhbuild/config.py             |  1 +
 jhbuild/versioncontrol/git.py | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
Comment 1 Colin Walters 2013-04-11 16:12:16 UTC
Created attachment 241273 [details] [review]
Add shallow clone option
Comment 2 Colin Walters 2013-04-11 18:52:32 UTC
Created attachment 241294 [details] [review]
updated patch

We also need to use the specified branch for the original checkout, which is an optimization when not using this option too.
Comment 3 Zeeshan Ali 2013-05-08 20:55:33 UTC
Review of attachment 241294 [details] [review]:

If i understood the code correctly, the 'shallow_clone' is not the default. If that is correct, ACK.

::: jhbuild/config.py
@@ +60,3 @@
                 'use_local_modulesets', 'ignore_suggests', 'modulesets_dir',
                 'mirror_policy', 'module_mirror_policy', 'dvcs_mirror_dir',
+                'shallow_clone',

why dedicate one line for this key only?
Comment 4 Colin Walters 2013-05-08 21:04:33 UTC
Fixed with unnecessary whitespace deleted.
Comment 5 Zeeshan Ali 2013-05-08 22:59:29 UTC
Cool, please update the status of patch too next time :)
Comment 6 Thomas Bechtold 2013-05-09 08:49:47 UTC
Seems that changeset 40b70d75563f783cf41c403e7c797ab683803c52 from jhbuild breaks jhbuild for me. When I try to build wayland, I get:

$ jhbuild buildone wayland
Traceback (most recent call last):
  • File "/home/tom/.local/bin/jhbuild", line 32 in <module>
    jhbuild.main.main(sys.argv[1:])
  • File "/home/tom/.local/lib/python2.7/site-packages/jhbuild/main.py", line 131 in main
    config = jhbuild.config.Config(options.configfile)
  • File "/home/tom/.local/lib/python2.7/site-packages/jhbuild/config.py", line 227 in __init__
    self.load(filename)
  • File "/home/tom/.local/lib/python2.7/site-packages/jhbuild/config.py", line 307 in load
    setattr(self, name, config[name])
KeyError: 'shallow_clone'

Comment 8 Marcin Wojdyr 2013-05-15 13:59:04 UTC
I've just noticed this change. that's cool, I have a similar option for bazaar in my customized jhbuild. In Bazaar it is called lightweight checkout (option --light) . I'll make it use shallow_clone and send a patch soon.