GithubHelp home page GithubHelp logo

endevor-cli's Introduction

Edo - Endevor SCM CLI

Edo is scm tool for managing elements in Endevor SCM inventory on a local PC.

description

Edo is used to provide similar user experience as git cli. It has basic commands implemented as decribed below.

To get list of commands and help run

edo --help

You can init repository from specific Endevor environment (accessed thru Endevor WebService).

edo init http://host:port/EndevorService/rest/CONFIG

Checkout specific subsystem/sandbox.

edo checkout ENV-1-SYS-SUB

In edo terminology, this is called stage and can be further refered as STAGE. Edo database can have two stages (for one subsystem), remote and local. Remote stage refers to the content which is located in Endevor. Local stage refers to content which is on local PC and can be updated by user.

Fetch elements from Endevor to remote stage can be done this way.

edo fetch

After fetch, merge of the remote stage into his local stage should be done.

edo merge

To make work easier, use pull commnand to execute fetch and merge in one command.

edo pull

Edo doesn't have staging area as git. All the merging is done in working directory.

Therefore after each merge, execute commit to commit changes into his local stage.

edo commit

To check current status of working directory against local stage, run status. It also shows if there is any difference between local and remote stage (if fetch was run and wasn't merged, or if new files were introduced).

edo status

To update Endevor inventory, execute push command. Message is required for push, which is used as ccid and comment in Endevor. Ccid is first word in the message and if the word is longer than 12 character, it's truncated to 12.

edo push -m 'ccid comment'

installation

Clone this git repository

git clone https://github.com/dankox/endevor-cli.git

With NPM, run install to get all the packages, build for compilation and link to make the command available for use in command line.

npm install

npm run build

npm link

endevor-cli's People

Contributors

dankox avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

alex-dumitru

endevor-cli's Issues

Update local stage to have same base as remote

Update to local stage, commit, push, to have the same base (rsha1/bsha1) as remote stage.

Main reason for it is that there is a problem when merge is done on stage/index which has several commits on the same file, the base version will be incorrect (it could have previous version which was committed but not pushed and is not common with remote).

This will change commits more to a stage area or save than git-like commits. Will make it easier for merging different stages too.

Proposed solution:
When commit is done, only lsha1 is updated.
If merge was executed before (MERGE exists), base sha1 will be updated only if index from MERGE has the same stage name as local stage. This guarantee that when merge from different stage (e.g.: production with base level 100) is done, it won't copy the base from it.

Base sha1 on remote and local should be the same. If changed on remote, it will be updated during merge/commit.

Push confirms the fingerprints and afterwards check differences between local and remote stage lsha1. Different ones are pushed.

pull on non-existent element

When doing pull on non-existent element it might get stuck.

Need to check if it's only on elements which has the name presented but not under that type, or if the problem is with non-existent directory in that time, or what....

do commit after pull up from the map

When you do a pull request for element which is not in your stage, it is grabbed from up in the map.
But it is added only into remote stage, while local stage doesn't have it.

In this specific situation that file looked like user commit a delete action on it (as it's not in local index but it is in remote index). To resolve this, we should do automatic commit of that element into the index (similarly as when there is no index at all in the beginning).

problem when user doesn't have access to retrieve, but has list access

If user does a pull on subsystem where he can list elements, but can't do retrieve, what will happen is, that it will create index but cannot populate it.

However, if it's first pull, that means, also local index is created, which puts repo into a state, where there are uncommited stuff and it can't be reset or discarded....

**proposed solution: **
after the fetch is done, retrieve of elements should be done, and if it fails, that element will be removed from the fetched index.
if previous index was presented, maybe keep it, and do it only for newly fetched index

pull on stage after pull on element problem

There might be a problem, when you do pull on element which is up in the map and it's grabbed to the remote stage, that after this action you can run regular edo pull.

What this do is, that it will fetch index in checked out stage, and because this element is not there, it might remove it from there.

Not sure if this is resolvable, maybe enhance messages to suggest user after such pull (the first one) to do push to remote repo to checked out stage.
Or maybe during the second pull/fetch, we should do list on elements not included and check if they are up in map or not with this fingerprint.

change user, config for repo

user should be able to change username/password for specific repo.

could be done thru command like:
edo config -u user
edo config -c new_config

problem with push when pull from up in the map

when pushing element which was pulled from higher in the map (e.g.: prod), is not working, because it thinks that this element was in the remote stage (e.g.: dev)

when pull done again, it will probably do the thing...

Weird error message during edo checkout, when there's already a stage checked out and fetched

I have an empty folder, I did my edo init,
and then:
edo checkout DEV-1-ESCM180-XUEYU010,
edo fetch,

now when I run checkout on another stage, for example edo checkout DEV-1-ESCM180-XUEYU01,
I get error messages below:

yx666766@8CWL0Z2 MINGW64 /c/experiments/edo/test2
$ edo checkout DEV-1-ESCM180-XUEYU01
Changes detected in working directory, commit removal of file: './ASMPGM/BAD'
Changes detected in working directory, commit removal of file: './COBCOPY/CPY'
Changes detected in working directory, commit removal of file: './ASMPGM/C1BM4201'
Changes detected in working directory, commit removal of file: './ASMPGM/C1GA0020'
Changes detected in working directory, commit removal of file: './ASMPGM/C1GL0000'
Changes detected in working directory, commit removal of file: './ISPM/RENM'
Changes detected in working directory, commit removal of file: './ISPM/TESTADD2'
Error while running checkout!
Error: You have to save or discard your changes before checkout other stage.
at Function. (C:\experiments\edo\endevor-cli\lib\api\EdoCheckoutApi.js:97:31)
at Generator.throw ()
at rejected (C:\experiments\edo\endevor-cli\lib\api\EdoCheckoutApi.js:6:65)

These error messages are really strange to me. I'm not really sure what I'm supposed to do by reading these messages.

I'm on refactor branch.

edo build - implementation

Would be nice to have build command implemented, which would run generate on checked out stage.

It would required some checks for number of files/elements involved in this operation, so user will not accidentally run it on PRD or something like that and regenerate everything.
Maybe --force/-f parameter to force if too many files/elements.

edo pull without --no-signout ?

There might be request to do retrieves in Endevor without no-signout option, which bypass updating MCF in Endevor.
This might be useful for certain users, when they require such information to have in Endevor.

Possible solution could be config file update with "hard" retrieve and ccid/comment option set. It would by used when fetch/pull is done.
Other solution could be with additional arguments to fetch/pull commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.