Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hg_sage.pull/push() to non-default server with multiple branches #1371

Closed
jonhanke opened this issue Dec 2, 2007 · 5 comments
Closed

hg_sage.pull/push() to non-default server with multiple branches #1371

jonhanke opened this issue Dec 2, 2007 · 5 comments

Comments

@jonhanke
Copy link

jonhanke commented Dec 2, 2007

I noticed that the push() method was missing in sage-2.8.14, so here is a
patch. I also added current_branch() and list_branches() for the
convenience of those who may want to manage multiple branches
simultaneously.

I was also interested in being able to have a separate default outgoing
repository for convenient backups, but there is an organizational issue here
-- SAGE has hardcoded its default branch (on the server) as sage-main, so if
one wanted to manage multiple branches from the same repository (as might
happen if there were several branches being simultaneously pulled/pushed to
on the same server) they will break the default scheme. So I forced the
hardcoded default server to use only the "main" branch (and updated the
hardcoded server to be sagemath.org instead of sage.math.washington.edu).

For example, suppose one wants to have a server with two branches: sage-main
and sage-other on the non-default server math.awesome.edu. Then the way
things are coded now, sage-main would update from sage-main, and
sage-other would update from sage-other. If we were connecting to the
default sagemath.org, then both branches would update from sage-main.
(WARNING TO MAINTAINER: This means that if the default server is changed,
one must also explicitly change the DEFAULT_SERVER variable in
BRANCH_PATH/sage/misc/hg.py)

If a non-default outgoing server is set, then commands like hg_sage.bundle() will use it for determining the relevant changesets, so a bundle to commit to sagemath.org would meet to specify the incoming server explicity. For example, this bundle was created with:

hg_sage.bundle("push_bundle--Dec_2_2007", url=hg_sage.pull_url())

Finally, I didn't really understand where the default_server was set, so I
added support to set them from shell variables SAGE_INCOMING_SERVER and
SAGE_OUTGOING_SERVER (with no trailing '/', in mercurial path format to the
'...../devel' directory). However I was careful to preserve the default
behavior when no settings are present. Any comments are appreciated!

Component: interfaces

Keywords: push, mercurial, branches

Issue created by migration from https://trac.sagemath.org/ticket/1371

@jonhanke
Copy link
Author

jonhanke commented Dec 2, 2007

Attachment: push_bundle--Dec_2_2007.hg.gz

Changesets

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-2.10, sage-2.9 Dec 4, 2007
@rlmill rlmill mannequin added the s: needs review label Dec 22, 2007
@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Jan 22, 2008

comment:4

This should be applied, assuming that it does not change the default behaviour. (It should not.) It does look like there is an incorrectly indented line, but compiling should catch that.

I do worry about the copyright change, though -- I thought we agreed to give all the copyright's to William Stein, to ease future license changes. We should check if Jon Hanke is okay with that?

@ncalexan ncalexan mannequin changed the title hg_sage.pull/push() to non-default server with multiple branches [with mostly positive review] hg_sage.pull/push() to non-default server with multiple branches Jan 22, 2008
@williamstein
Copy link
Contributor

comment:5

I do worry about the copyright change, though -- I thought we agreed
to give all the copyright's to William Stein, to ease future license
changes. We should check if Jon Hanke is okay with that?

We did not agree to do that. Some people did, but it is completely
optional. The key requirement is that all code in the core Sage library
be licensed "GPL V2 or greater". The copyright holder can be anybody.

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Feb 9, 2008

comment:6

After discussion with William at SD7, this should be applied.

@ncalexan ncalexan mannequin changed the title [with mostly positive review] hg_sage.pull/push() to non-default server with multiple branches hg_sage.pull/push() to non-default server with multiple branches Feb 9, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 10, 2008

comment:7

Merged in Sage 2.10.2.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants