Commit Graph

20 Commits

Author SHA1 Message Date
Michael Gottesman
3db9496ba8 Merge pull request #18136 from gottesmm/pr-1c14db6a57d92099c80917effc957420deb6b60d
[update-checkout] print(json.dumps(...)) => json.dump(..., sys.stdout)
2018-07-24 13:45:58 -07:00
Michael Gottesman
aa4bd9c14d [update-checkout] Change dump-hashes to dump a update-checkout config file rather than a textual dump format.
Previously -dump-hashes dumped the current state of the hashes in a format like
the following:

$REPO_NAME $HASH $SUBJECT

While this dumps the relevant information, it is not machine parseable. Instead
in this commit, we dump out the hashes into a update-checkout config json file
with a scheme name of repro. Thus to reproduce the current repository state on
someone else's machine, you don't need to type in the exact hashes. Instead, one
can just do:

```
$ ./swift/utils/update-checkout -dump-hashes > repro.json
```

and then give the repro.json file to another swift developer. They then can run:

```
$ ./swift/utils/update-checkout -config=repro.json -scheme=repro
```

which will checkout all of the appropriate hashes for each repository to
reproduce the build on the other user's machine.
2018-07-22 15:33:36 -07:00
Michael Gottesman
860a06af87 [update-checkout] print(json.dumps(...)) => json.dump(..., sys.stdout) 2018-07-22 15:33:23 -07:00
Dan Zheng
07a8cf39d8 [update-checkout] Skip cloning repos not specified in scheme. (#17949)
Previously, if a branch scheme did not specify a branch for a repository,
update-checkout would crash. It's implied that all repositories should be
cloned by all schemes, which is not necessarily the case.

Now, repositories not specified in a scheme are not cloned.

Addresses SR-8060.
2018-07-13 20:57:52 -07:00
Huon Wilson
16a4605781 [update-checkout] Require --scheme for --match-timestamp.
Without a --scheme, --match-timestamp would only look back in time from the HEAD
of each sibling repository which means those repositories will never go forward
in time when the swift repo does. This is probably not what one wants when, for
instance, bisecting and generally trying to do historical builds. Finding the
--scheme behaviour in the first place is slightly non-obvious, passing that flag
is easy to forget, and the non---scheme behaviour is probably not particularly
useful, so let's just force --scheme to be passed.

Fixes https://bugs.swift.org/browse/SR-7468 and rdar://problem/39520842
2018-04-30 18:54:10 +10:00
Robert Widmann
451516df4d Merge pull request #8818 from Bouke/patch-2
Shallow clone specific branch
2017-12-15 23:24:54 -05:00
Alper Çugun
51b258abef Fix indent errors surfaced by linter. 2017-11-11 09:58:47 +01:00
Alper Çugun
e15a65b0ca Changed all of the sample to any of the sample. 2017-11-11 09:58:47 +01:00
Alper Çugun
a42e8b379b Change check to see whether certain repositories have been checked out. 2017-11-11 09:58:47 +01:00
Alper Cugun
03646fd07f Check if the checkout has been --clone'd yet
As requested in SR-6312 a simple diagnostic to catch the error of not passing --clone the first time you run update-checkout. Checks whether there is just one directory (i.e. the swift/ directory) in SWIFT_SOURCE_ROOT and prints a message.
2017-11-11 09:58:47 +01:00
Rahul Ranjan
3458d452d8 Include git fetch for tags in update checkout by default (#12455)
* include git fetch for tags in update checkout by default

* remove extra call to git tags fetch

* fix python lint E501 error
2017-10-19 08:44:53 -07:00
Tiago Martinho
56da4a95c0 [update_checkout] Add success message to script 2017-10-01 20:25:15 +02:00
Graydon Hoare
421c62ea2d [update_checkout] Only --match-timestamp with @swift-ci merges on some repos 2017-05-25 09:40:12 -07:00
Bouke Haarsma
c290081bab Wrap line to stay within line limit 2017-05-19 19:53:14 +02:00
Jordan Rose
b7404a8276 [update-checkout] Allow --dump-hashes to skip directories.
If I don't have certain things checked out, it shouldn't crash.
2017-05-03 18:02:09 -07:00
Bouke Haarsma
08a69d91f3 Shallow clone specific branch
This allows one to say `./utils/update-checkout --clone --skip-history --scheme swift-3.1-branch`. This would otherwise fail, as it would do a shallow clone of master, which doesn't contain `swift-3.1-branch`.
2017-04-17 20:37:39 +02:00
practicalswift
d15c229d30 [gardening] Use sys.exit instead of exit 2017-04-11 09:37:55 +02:00
Hugh Bellamy
36645a0976 Address FIXMES for cleaning up imports in build-script and friends 2017-04-01 09:54:01 +07:00
Hugh Bellamy
ae220c4025 Move code from update_checkout global main block to main()
Required, as we now directly call the main() function in
`update_checkout.py` from `update-checkout`
2017-03-31 09:55:21 +07:00
Hugh Bellamy
d0cc071237 Move functionality of update-checkout to a update_checkout.py 2017-03-31 09:50:15 +07:00