Skip to content

Commit 9bab297

Browse files
committed
Updated documentation for branch attribute for Hg
1 parent 5034651 commit 9bab297

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Please note that it is now recommended to declare the _same_ `format_version` in
121121

122122
#### GoCD server version from 19.4.0 and beyond
123123

124-
Supports `format_version` value of `5`. In this version, support of `username` and `encrypted_password` for [git](#git-material-update) and [hg](#hg-material-update) material has been added.
124+
Supports `format_version` value of `5`. In this version, support of `username` and `encrypted_password` for [git](#git-material-update) and [hg](#hg-material-update) material has been added. In addition to that, [hg](#hg-material-update) will also support `branch` attribute.
125125

126126
Using a newer `format_version` includes all the behavior of the previous versions too.
127127

@@ -533,14 +533,16 @@ All scm materials can have filter object:
533533
"auto_update": false,
534534
"name": "gitMaterial1",
535535
"type": "git",
536-
"shallow_clone": true
536+
"shallow_clone": true,
537+
"username": "user1",
538+
"encrypted_password": "encrypted_value"
537539
}
538540
```
539541
<a name="git-material-update"/>
540542

541543
For **GoCD >= 19.4.0 and `format_version: 5` and above**:
542544

543-
You need to specify `username` and `encrypted_password` explicitly as such
545+
You are advised to utilize `username` and `encrypted_password` for passing in material credentials as:
544546

545547
```json
546548
{
@@ -590,14 +592,17 @@ Instead of `encrypted_password` you may specify `password` but `encrypted_passwo
590592
"destination": "dir1",
591593
"auto_update": false,
592594
"name": "hgMaterial1",
593-
"type": "hg"
595+
"type": "hg",
596+
"username": "user1",
597+
"encrypted_password": "encrypted_value",
598+
"branch": "feature"
594599
}
595600
```
596601
<a name="hg-material-update"/>
597602

598603
For **GoCD >= 19.4.0 and `format_version: 5` and above**:
599604

600-
You need to specify `username` and `encrypted_password` explicitly as such
605+
You are advised to utilize `username` and `encrypted_password` for passing in material credentials as:
601606

602607
```json
603608
{
@@ -606,9 +611,16 @@ You need to specify `username` and `encrypted_password` explicitly as such
606611
"encrypted_password": "encrypted_value"
607612
}
608613
```
609-
610614
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
611615

616+
In addition to that, you can also leverage `branch` attribute to specify the branch for material
617+
618+
```json
619+
{
620+
"branch": "feature"
621+
}
622+
```
623+
612624
## Perforce
613625

614626
```json

0 commit comments

Comments
 (0)