How to checkout specific revision (e.g. an old one) with gclient?

4,318 views
Skip to first unread message

Van Thu

unread,
Feb 24, 2014, 12:10:54 PM2/24/14
to chromi...@chromium.org
Hi, I am new to chromium.
I follow the instruction from http://www.chromium.org/developers/how-tos/get-the-code, to get the code,
as I am on linux (Ubuntu 12.04), I get the code with the following steps:

fetch --nohooks chromium --nosvn=True # as I am not a committer
./build/install-build-deps.sh
gclient sync

in the src directory (I've checkout'ed), I do 'gclient sync --revision src@1000', but the return is: 'Checked out revision 31256.' 
On the link, I see "Using the last known good revision (LKGR)", so I think that if safesync_url is the problem, it makes gclient ignores --revision options, so I delete the 'safesync_url' from '.gclient' file, the content of '.gclient' becomes
  1 solutions = [
  2   { "name"        : "src",
  3     "url"         : "http://src.chromium.org/svn/trunk/src",
  4     "deps_file"   : "DEPS",
  5     "managed"     : True,
  6     "custom_deps" : {
  7     },
  8   },
  9 ]
 10 cache_dir = None

And, I do 'gclient sync --revision src@1000' again, but result is still the same.

So, What would be the problem?, this is really annoying.

Robert Flack

unread,
Feb 24, 2014, 1:21:38 PM2/24/14
to van...@gmail.com, Chromium-dev
Change managed to False and then gclient sync will only update the sub repositories to the necessary versions for the version of 'src' you have checked out, and you can manually checkout whatever revision you want in src.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Stefan Zager

unread,
Feb 24, 2014, 1:48:03 PM2/24/14
to fla...@chromium.org, van...@gmail.com, Chromium-dev
Robert's comment about 'managed' is correct, but that .gclient file
looks wrong. Unless you have a very good reason, you should not be
using an svn-based checkout. I'm surprised that running 'fetch' would
produce that .gclient file.

I suggest you make sure your copy of depot_tools is up-to-date, and try running:

fetch --nohooks --dry-run chromium --nosvn=True

Take a look at the 'gclient config' command it spits out; if it
doesn't contain this URL:

https://chromium.googlesource.com/chromium/src.git

... then please file a bug.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-dev...@chromium.org.
Reply all
Reply to author
Forward
0 new messages