Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Move noms-merge into noms commit tool #2535

Closed
cmasone-attic opened this issue Sep 8, 2016 · 8 comments
Closed

Move noms-merge into noms commit tool #2535

cmasone-attic opened this issue Sep 8, 2016 · 8 comments
Assignees
Labels

Comments

@cmasone-attic
Copy link
Contributor

cmasone-attic commented Sep 8, 2016

The new interface will be:

noms merge [--policy=l|r|a] [--out-ds-name=<name>] [--parent=<obj>] <db-spec> <left-obj> <right-obj>

  <db-spec>   : database in which named datasets live
  <left-obj>  : path to an object descending from <parent>
  <right-obj> : path to an object descending from <parent>

See Spelling Objects at https://github.com/attic-labs/noms/blob/master/doc/spelling.md for details on the <db-spec>, <left-obj>, <right-obj> and --parent arguments.

Flags:

--policy
    If unset, any merge conflict is fatal. Can be set to one of 'l', 'r', or 'a' which will resolve conflicts by choosing the Value from <left-obj>, <right-obj>, or asking the user respectively
--out-ds-name (= "")
    output dataset to write to - if empty, defaults to printing the hash of the merged object to stdout
--parent (= "")
    common ancestor of <left-obj> and <right-obj> (required unless left-obj and right-obj are Datasets)
--quiet  (= false)
    silence progress output
@cmasone-attic cmasone-attic self-assigned this Sep 8, 2016
@cmasone-attic
Copy link
Contributor Author

@aboodman The above is the current, desired API, right?

@aboodman
Copy link
Contributor

aboodman commented Sep 8, 2016

Hm, the idea of this creating its own commit seems in conflict with factoring out noms commit. But it's required in the case where the inputs are datasets, if you want to reflect the merge by having two parents in the merge commit.

@aboodman
Copy link
Contributor

aboodman commented Sep 8, 2016

Ideas? @rafael-atticlabs ?

@cmasone-attic
Copy link
Contributor Author

I mean...it can still craft the merge Commit and emit the hash of that object. Then noms commit just needs to understand what to do if it sees that the hash is already a Commit?

@aboodman
Copy link
Contributor

aboodman commented Sep 8, 2016

I mean what metadata will it put there?

On Thu, Sep 8, 2016 at 1:26 PM, cmasone-attic notifications@github.com
wrote:

I mean...it can still craft the merge Commit and emit the hash of that
object. Then noms commit just needs to understand what to do if it sees
that the hash is already a Commit?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2535 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAE6BNcrX7yvjEVWnoneUAKwgDbBlBCpks5qoG9mgaJpZM4J4YOs
.

@cmasone-attic
Copy link
Contributor Author

hm. true. Open to ideas :-)

@aboodman
Copy link
Contributor

aboodman commented Sep 8, 2016

Also it wont actually work with commit because commit (as currently being
implemented) because both tools think they are the ones building the commit.

On Thu, Sep 8, 2016 at 1:32 PM, Aaron Boodman aa@attic.io wrote:

I mean what metadata will it put there?

On Thu, Sep 8, 2016 at 1:26 PM, cmasone-attic notifications@github.com
wrote:

I mean...it can still craft the merge Commit and emit the hash of that
object. Then noms commit just needs to understand what to do if it sees
that the hash is already a Commit?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2535 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAE6BNcrX7yvjEVWnoneUAKwgDbBlBCpks5qoG9mgaJpZM4J4YOs
.

@cmasone-attic
Copy link
Contributor Author

POR: noms commit --merge or similar. I'll flesh out what the command line args should look like once I look at noms commit in more detail

@cmasone-attic cmasone-attic changed the title Move noms-merge into noms tool Move noms-merge into noms commit tool Sep 12, 2016
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Sep 15, 2016
Once we integrate noms-merge into the `noms commit` command, this
function will allow us to stop requiring users to pass in the common
ancestor to be used when merging. The code can just find it and merge
away.

Toward attic-labs#2535
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Sep 15, 2016
Once we integrate noms-merge into the `noms commit` command, this
function will allow us to stop requiring users to pass in the common
ancestor to be used when merging. The code can just find it and merge
away.

Toward attic-labs#2535
cmasone-attic added a commit that referenced this issue Sep 15, 2016
Once we integrate noms-merge into the `noms commit` command, this
function will allow us to stop requiring users to pass in the common
ancestor to be used when merging. The code can just find it and merge
away.

Toward #2535
@cmasone-attic cmasone-attic added P1 and removed P0 labels Sep 16, 2016
@ghost ghost added P0 and removed P1 labels Sep 19, 2016
@ghost ghost mentioned this issue Sep 20, 2016
@cmasone-attic cmasone-attic added P1 and removed P0 labels Sep 20, 2016
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Oct 27, 2016
Add optional merging functionality to noms commit.
noms commit --merge <database> <left-dataset-name> <right-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <right-dataset-name>. All the existing options to
`noms commit` are supported, to allow users to add metadata to the
Commit object that winds up in the Database.

Users can optionally provide a third Dataset name to commit to instead.

Fixes attic-labs#2535
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Oct 27, 2016
Add optional merging functionality to noms commit.
noms commit --merge <database> <left-dataset-name> <right-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <right-dataset-name>. All the existing options to
`noms commit` are supported, to allow users to add metadata to the
Commit object that winds up in the Database.

Users can optionally provide a third Dataset name to commit to instead.

Fixes attic-labs#2535
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Oct 27, 2016
Add optional merging functionality to noms commit.
noms commit --merge <database> <left-dataset-name> <right-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <right-dataset-name>. All the existing options to
`noms commit` are supported, to allow users to add metadata to the
Commit object that winds up in the Database.

Users can optionally provide a third Dataset name to commit to instead.

Fixes attic-labs#2535
cmasone-attic added a commit that referenced this issue Oct 27, 2016
Add optional merging functionality to noms commit.
noms merge <database> <left-dataset-name> <right-dataset-name> <output-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <output-dataset-name>.

Fixes #2535
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants