Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 6562202978877440: Issue 1778 - Generate proper build numbers when working with Git repositories (Closed)

Created:
Jan. 12, 2015, 6:43 p.m. by Wladimir Palant
Modified:
Jan. 13, 2015, 12:57 p.m.
Reviewers:
Sebastian Noack
Visibility:
Public.

Description

Issue 1778 - Generate proper build numbers when working with Git repositories

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M packager.py View 1 chunk +11 lines, -4 lines 2 comments Download

Messages

Total messages: 3
Wladimir Palant
Jan. 12, 2015, 6:43 p.m. (2015-01-12 18:43:32 UTC) #1
Sebastian Noack
http://codereview.adblockplus.org/6562202978877440/diff/5629499534213120/packager.py File packager.py (right): http://codereview.adblockplus.org/6562202978877440/diff/5629499534213120/packager.py#newcode27 packager.py:27: from buildtools.ensure_dependencies import Mercurial, Git It seems that you ...
Jan. 13, 2015, 9:12 a.m. (2015-01-13 09:12:25 UTC) #2
Wladimir Palant
Jan. 13, 2015, 12:56 p.m. (2015-01-13 12:56:53 UTC) #3
http://codereview.adblockplus.org/6562202978877440/diff/5629499534213120/pack...
File packager.py (right):

http://codereview.adblockplus.org/6562202978877440/diff/5629499534213120/pack...
packager.py:27: from buildtools.ensure_dependencies import Mercurial, Git
On 2015/01/13 09:12:25, Sebastian Noack wrote:
> It seems that you only need Git.istype() and Mercurial.istype(), which are
both
> implemented as a simple one-liner.

As the OP explained in the pull request, these aren't guaranteed to stay
one-liners forever. At some point we might decide to support more complicated
setups as well (repositories with multiple extensions being the most obvious
scenario, so the extension wouldn't be at the repository root). So I decided to
share that logic rather than duplicating it.

Note that I didn't add getting a numerical revision ID to ensure_dependencies.py
for the exact reason you outlined - this isn't a proper VCS abstraction layer
right now, merely a quick hack to avoid duplicating code.

Powered by Google App Engine
This is Rietveld