mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
98d9269874
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
129 lines
3.3 KiB
Perl
129 lines
3.3 KiB
Perl
#require py2
|
|
#chg-compatible
|
|
|
|
$ enable grepdiff
|
|
|
|
Setup repo
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
|
|
Commit some things
|
|
$ echo "string one" > root
|
|
$ hg ci -Am "string one in root"
|
|
adding root
|
|
$ echo "string one" > a
|
|
$ hg ci -Am "string one in a"
|
|
adding a
|
|
$ echo "string two" > root
|
|
$ hg ci -m "string two in root"
|
|
$ echo "string three" >> a
|
|
$ hg ci -m "string three in a"
|
|
$ echo "int" >> root
|
|
$ hg ci -m "int in root"
|
|
$ echo "string" >> a
|
|
$ hg ci -m "string in a"
|
|
|
|
Perform a grepdiff without a modifier over the whole repo
|
|
$ hg log --rev "grepdiff('string \wne')" -p
|
|
commit: 66a661e5ba18
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string one in root
|
|
|
|
diff -r 000000000000 -r 66a661e5ba18 root
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/root Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -0,0 +1,1 @@
|
|
+string one
|
|
|
|
commit: e4e29c42d1c9
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string one in a
|
|
|
|
diff -r 66a661e5ba18 -r e4e29c42d1c9 a
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/a Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -0,0 +1,1 @@
|
|
+string one
|
|
|
|
commit: f90b5c1dcd6f
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string two in root
|
|
|
|
diff -r e4e29c42d1c9 -r f90b5c1dcd6f root
|
|
--- a/root Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/root Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -1,1 +1,1 @@
|
|
-string one
|
|
+string two
|
|
|
|
Perform a "remove" grepdiff over a limited set of files
|
|
$ hg log --rev "grepdiff('remove:string', root)" -p
|
|
commit: f90b5c1dcd6f
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string two in root
|
|
|
|
diff -r e4e29c42d1c9 -r f90b5c1dcd6f root
|
|
--- a/root Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/root Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -1,1 +1,1 @@
|
|
-string one
|
|
+string two
|
|
|
|
|
|
Perform an "add" grepdiff over the whole repo
|
|
$ hg log --rev "grepdiff('add:two')" -p
|
|
commit: f90b5c1dcd6f
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string two in root
|
|
|
|
diff -r e4e29c42d1c9 -r f90b5c1dcd6f root
|
|
--- a/root Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/root Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -1,1 +1,1 @@
|
|
-string one
|
|
+string two
|
|
|
|
|
|
Perform a "delta" grepdiff over the whole repo with another revset used
|
|
$ hg log --rev "(desc(int):66a661e5ba18d30421a634ea43371c34ee8a8677) and grepdiff('delta:string')" -p
|
|
commit: 0173332b5f0e
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string three in a
|
|
|
|
diff -r f90b5c1dcd6f -r 0173332b5f0e a
|
|
--- a/a Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/a Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -1,1 +1,2 @@
|
|
string one
|
|
+string three
|
|
|
|
commit: e4e29c42d1c9
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string one in a
|
|
|
|
diff -r 66a661e5ba18 -r e4e29c42d1c9 a
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/a Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -0,0 +1,1 @@
|
|
+string one
|
|
|
|
commit: 66a661e5ba18
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: string one in root
|
|
|
|
diff -r 000000000000 -r 66a661e5ba18 root
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
+++ b/root Thu Jan 01 00:00:00 1970 +0000
|
|
@@ -0,0 +1,1 @@
|
|
+string one
|
|
|