sapling/eden/hg-server/tests/test-hggit-outgoing.t
Durham Goode 98d9269874 server: copy hg to a new hg-server directory
Summary:
Create a fork of the Mercurial code that we can use to build server
rpms. The hg servers will continue to exist for a few more months while we move
the darkstorm and ediscovery use cases off them. In the mean time, we want to
start making breaking changes to the client, so let's create a stable copy of
the hg code to produce rpms for the hg servers.

The fork is based off c7770c78d, the latest hg release.

This copies the files as is, then adds some minor tweaks to get it to build:
- Disables some lint checks that appear to be bypassed by path
- sed replace eden/scm with eden/hg-server
- Removed a dependency on scm/telemetry from the edenfs-client tests since
  scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts
  with the hg-server conflict parser.

allow-large-files

Reviewed By: quark-zju

Differential Revision: D27632557

fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
2021-04-09 10:09:06 -07:00

136 lines
3.4 KiB
Perl

Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
$ fn_git_commit -m "add alpha"
$ git branch alpha
$ git show-ref
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
$ cd ..
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hgrepo
$ hg update -q master
$ echo beta > beta
$ hg add beta
$ fn_hg_commit -m 'add beta'
$ echo gamma > gamma
$ hg add gamma
$ fn_hg_commit -m 'add gamma'
$ hg book -r 574e2d660a7d7bbaf97251f694c8c8327f0db957 beta
$ hg outgoing | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
commit: 49480a0fbf45
bookmark: master
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ hg outgoing -r beta | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
$ hg outgoing -r master | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
commit: 49480a0fbf45
bookmark: master
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ cd ..
some more work on master from git
$ cd gitrepo
Check state of refs after outgoing
$ git show-ref
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
$ git checkout master
Already on 'master'
$ echo delta > delta
$ git add delta
$ fn_git_commit -m "add delta"
$ cd ..
$ cd hgrepo
this will fail # maybe we should try to make it work
$ hg outgoing
comparing with */gitrepo (glob)
abort: branch 'refs/heads/master' changed on the server, please pull and merge before pushing
[255]
let's pull and try again
$ hg pull 2>&1 | grep -v 'divergent bookmark'
pulling from */gitrepo (glob)
importing git objects into hg
$ hg outgoing | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
commit: 49480a0fbf45
bookmark: master
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ hg outgoing -r beta | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
$ hg outgoing -r master | grep -v 'searching for changes'
comparing with */gitrepo (glob)
commit: 574e2d660a7d
bookmark: beta
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
commit: 49480a0fbf45
bookmark: master
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ cd ..