You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by eribeiro <gi...@git.apache.org> on 2017/01/24 18:26:12 UTC

[GitHub] zookeeper pull request #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt g...

GitHub user eribeiro opened a pull request:

    https://github.com/apache/zookeeper/pull/155

    ZOOKEEPER-2573: Modify Info.REVISION to adapt git repo

    @rakeshadr Hi, I have created this PR. The commit can be cherry picked on master too.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/eribeiro/zookeeper ZOOKEEPER-2573-3.5

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/155.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #155
    
----
commit 7ca175dfadf5220a3495e3e19de4b933df37fc50
Author: Edward Ribeiro <ed...@gmail.com>
Date:   2016-12-28T17:21:31Z

    ZOOKEEPER-2573: Modify Info.REVISION to adapt git repo

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper pull request #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt g...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zookeeper/pull/155


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper issue #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt git repo

Posted by eribeiro <gi...@git.apache.org>.
Github user eribeiro commented on the issue:

    https://github.com/apache/zookeeper/pull/155
  
    Thanks for your patience and support @rakeshadr. 
    
    Indeed, I tried to `git apply` the patch: https://github.com/apache/zookeeper/pull/155.diff on branch-3.4 and it failed as you wrote before. :disappointed:
    
    **Oddly enough**, if I apply this patch to master or branch-3.5 (`git apply 155.diff`) then switched to branch-3.4 the did a `git cherry-pick <commit>` and it worked. But I am suspicious if this was okay (I did a quick test here now).
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper issue #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt git repo

Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:

    https://github.com/apache/zookeeper/pull/155
  
    Thanks @eribeiro.
    +1 LGTM, I will merge this shortly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper pull request #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt g...

Posted by eribeiro <gi...@git.apache.org>.
Github user eribeiro commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/155#discussion_r97746755
  
    --- Diff: src/java/main/org/apache/zookeeper/version/util/VerGen.java ---
    @@ -149,11 +150,9 @@ public static void main(String[] args) {
                             "Invalid version number format, must be \"x.y.z(-.*)?\"");
                     System.exit(1);
                 }
    -            int rev;
    -            try {
    -                rev = Integer.parseInt(args[1]);
    -            } catch (NumberFormatException e) {
    -                rev = -1;
    +            String rev = args[1];
    +            if (rev == null || rev.trim().isEmpty()) {
    +                rev = "-1";
                 }
    --- End diff --
    
    Oh, really sorry about that. :disappointed: I squashed the commits from #137, but for whatever reason this latest change didn't make through. :thinking: Well, gonna change now. Thanks for pointing out! 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper pull request #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt g...

Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/155#discussion_r97743121
  
    --- Diff: src/java/main/org/apache/zookeeper/version/util/VerGen.java ---
    @@ -149,11 +150,9 @@ public static void main(String[] args) {
                             "Invalid version number format, must be \"x.y.z(-.*)?\"");
                     System.exit(1);
                 }
    -            int rev;
    -            try {
    -                rev = Integer.parseInt(args[1]);
    -            } catch (NumberFormatException e) {
    -                rev = -1;
    +            String rev = args[1];
    +            if (rev == null || rev.trim().isEmpty()) {
    +                rev = "-1";
                 }
    --- End diff --
    
    Else block is missing. Could you add rev.trim() function.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---